Added option to cycle fit mode to sidebar
This commit is contained in:
parent
579e59e7df
commit
5882998c20
3 changed files with 13 additions and 0 deletions
|
@ -104,6 +104,7 @@ App.Presenters.PostContentPresenter = function(
|
|||
render: render,
|
||||
addNewPostNote: addNewPostNote,
|
||||
updatePostNotesSize: updatePostNotesSize,
|
||||
cycleFitMode: cycleFitMode,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -178,6 +178,7 @@ App.Presenters.PostPresenter = function(
|
|||
function attachSidebarEvents() {
|
||||
$el.find('#sidebar .delete').click(deleteButtonClicked);
|
||||
$el.find('#sidebar .feature').click(featureButtonClicked);
|
||||
$el.find('#sidebar .fit-mode').click(fitModeButtonClicked);
|
||||
$el.find('#sidebar .edit').click(editButtonClicked);
|
||||
$el.find('#sidebar .history').click(historyButtonClicked);
|
||||
$el.find('#sidebar .add-favorite').click(addFavoriteButtonClicked);
|
||||
|
@ -215,6 +216,11 @@ App.Presenters.PostPresenter = function(
|
|||
}
|
||||
}
|
||||
|
||||
function fitModeButtonClicked(e) {
|
||||
e.preventDefault();
|
||||
postContentPresenter.cycleFitMode();
|
||||
}
|
||||
|
||||
function featurePost() {
|
||||
promise.wait(api.post('/posts/' + post.id + '/feature'))
|
||||
.then(function(response) {
|
||||
|
|
|
@ -267,6 +267,12 @@ if (forceHttpInPermalinks > 0) {
|
|||
</a>
|
||||
</li>
|
||||
<% } %>
|
||||
|
||||
<li>
|
||||
<a class="fit-mode" href="#">
|
||||
Cycle fit mode
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<% } %>
|
||||
|
||||
|
|
Loading…
Reference in a new issue