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,
|
render: render,
|
||||||
addNewPostNote: addNewPostNote,
|
addNewPostNote: addNewPostNote,
|
||||||
updatePostNotesSize: updatePostNotesSize,
|
updatePostNotesSize: updatePostNotesSize,
|
||||||
|
cycleFitMode: cycleFitMode,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,7 @@ App.Presenters.PostPresenter = function(
|
||||||
function attachSidebarEvents() {
|
function attachSidebarEvents() {
|
||||||
$el.find('#sidebar .delete').click(deleteButtonClicked);
|
$el.find('#sidebar .delete').click(deleteButtonClicked);
|
||||||
$el.find('#sidebar .feature').click(featureButtonClicked);
|
$el.find('#sidebar .feature').click(featureButtonClicked);
|
||||||
|
$el.find('#sidebar .fit-mode').click(fitModeButtonClicked);
|
||||||
$el.find('#sidebar .edit').click(editButtonClicked);
|
$el.find('#sidebar .edit').click(editButtonClicked);
|
||||||
$el.find('#sidebar .history').click(historyButtonClicked);
|
$el.find('#sidebar .history').click(historyButtonClicked);
|
||||||
$el.find('#sidebar .add-favorite').click(addFavoriteButtonClicked);
|
$el.find('#sidebar .add-favorite').click(addFavoriteButtonClicked);
|
||||||
|
@ -215,6 +216,11 @@ App.Presenters.PostPresenter = function(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fitModeButtonClicked(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
postContentPresenter.cycleFitMode();
|
||||||
|
}
|
||||||
|
|
||||||
function featurePost() {
|
function featurePost() {
|
||||||
promise.wait(api.post('/posts/' + post.id + '/feature'))
|
promise.wait(api.post('/posts/' + post.id + '/feature'))
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
|
|
|
@ -267,6 +267,12 @@ if (forceHttpInPermalinks > 0) {
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a class="fit-mode" href="#">
|
||||||
|
Cycle fit mode
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue