Moved [F]ullscreen hotkey to PostContentPresenter
This commit is contained in:
parent
6b6acb0bbf
commit
64ae9a7c74
2 changed files with 14 additions and 13 deletions
|
@ -5,6 +5,7 @@ App.Presenters.PostContentPresenter = function(
|
||||||
jQuery,
|
jQuery,
|
||||||
util,
|
util,
|
||||||
promise,
|
promise,
|
||||||
|
keyboard,
|
||||||
presenterManager,
|
presenterManager,
|
||||||
postNotesPresenter) {
|
postNotesPresenter) {
|
||||||
|
|
||||||
|
@ -35,6 +36,18 @@ App.Presenters.PostContentPresenter = function(
|
||||||
updatePostNotesSize();
|
updatePostNotesSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
keyboard.keyup('f', function() {
|
||||||
|
var $wrapper = $target.find('.object-wrapper');
|
||||||
|
if ($wrapper.data('full')) {
|
||||||
|
$wrapper.css({maxWidth: $wrapper.attr('data-width') + 'px', width: 'auto'});
|
||||||
|
$wrapper.data('full', false);
|
||||||
|
} else {
|
||||||
|
$wrapper.css({maxWidth: null, width: $wrapper.attr('data-width')});
|
||||||
|
$wrapper.data('full', true);
|
||||||
|
}
|
||||||
|
updatePostNotesSize();
|
||||||
|
});
|
||||||
|
|
||||||
jQuery(window).resize(updatePostNotesSize);
|
jQuery(window).resize(updatePostNotesSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,6 +85,7 @@ App.DI.register('postContentPresenter', [
|
||||||
'jQuery',
|
'jQuery',
|
||||||
'util',
|
'util',
|
||||||
'promise',
|
'promise',
|
||||||
|
'keyboard',
|
||||||
'presenterManager',
|
'presenterManager',
|
||||||
'postNotesPresenter'],
|
'postNotesPresenter'],
|
||||||
App.Presenters.PostContentPresenter);
|
App.Presenters.PostContentPresenter);
|
||||||
|
|
|
@ -135,20 +135,7 @@ App.Presenters.PostPresenter = function(
|
||||||
editButtonClicked(null);
|
editButtonClicked(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
keyboard.keyup('f', function() {
|
|
||||||
var $wrapper = $el.find('.object-wrapper');
|
|
||||||
if ($wrapper.data('full')) {
|
|
||||||
$wrapper.css({maxWidth: $wrapper.attr('data-width') + 'px', width: 'auto'});
|
|
||||||
$wrapper.data('full', false);
|
|
||||||
} else {
|
|
||||||
$wrapper.css({maxWidth: null, width: $wrapper.attr('data-width')});
|
|
||||||
$wrapper.data('full', true);
|
|
||||||
}
|
|
||||||
postContentPresenter.updatePostNotesSize();
|
|
||||||
});
|
|
||||||
|
|
||||||
attachSidebarEvents();
|
attachSidebarEvents();
|
||||||
|
|
||||||
attachLinksToPostsAround();
|
attachLinksToPostsAround();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue