v1.18.x
barisusakli 10 years ago
parent 7e3e7edfd4
commit 72f80dd330

@ -46,21 +46,22 @@ define('composer/preview', function() {
preview.handleToggler = function(postContainer) { preview.handleToggler = function(postContainer) {
function hidePreview() { function hidePreview() {
previewContainer.addClass('hide'); togglePreview(false);
writeContainer.addClass('maximized');
showBtn.removeClass('hide');
$('.write').focus();
localStorage.setItem('composer:previewToggled', true); localStorage.setItem('composer:previewToggled', true);
} }
function showPreview() { function showPreview() {
previewContainer.removeClass('hide'); togglePreview(true);
writeContainer.removeClass('maximized'); localStorage.removeItem('composer:previewToggled');
showBtn.addClass('hide'); }
function togglePreview(show) {
previewContainer.toggleClass('hide', !show);
writeContainer.toggleClass('maximized', !show);
showBtn.toggleClass('hide', show);
$('.write').focus(); $('.write').focus();
localStorage.removeItem('composer:previewToggled'); preview.matchScroll(postContainer);
} }
var showBtn = postContainer.find('.write-container .toggle-preview'), var showBtn = postContainer.find('.write-container .toggle-preview'),

Loading…
Cancel
Save