[DE] hidded menu "Hide title bar"

This commit is contained in:
Maxim Kadushkin 2017-04-10 16:40:48 +03:00
parent bf95ec509e
commit acd5224632
2 changed files with 17 additions and 17 deletions

View file

@ -268,7 +268,7 @@ define([
toolbar.listStyles.on('click', _.bind(this.onListStyleSelect, this));
toolbar.listStyles.on('contextmenu', _.bind(this.onListStyleContextMenu, this));
toolbar.styleMenu.on('hide:before', _.bind(this.onListStyleBeforeHide, this));
toolbar.mnuitemHideTitleBar.on('toggle', _.bind(this.onHideTitleBar, this));
// toolbar.mnuitemHideTitleBar.on('toggle', _.bind(this.onHideTitleBar, this));
toolbar.mnuitemHideStatusBar.on('toggle', _.bind(this.onHideStatusBar, this));
toolbar.mnuitemHideRulers.on('toggle', _.bind(this.onHideRulers, this));
toolbar.btnFitPage.on('toggle', _.bind(this.onZoomToPageToggle, this));
@ -1922,15 +1922,15 @@ define([
}
},
onHideTitleBar: function(item, checked) {
var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
headerView && headerView.setVisible(!checked);
Common.localStorage.setItem('de-hidden-title', checked ? 1 : 0);
Common.NotificationCenter.trigger('layout:changed', 'header');
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
// onHideTitleBar: function(item, checked) {
// var headerView = this.getApplication().getController('Viewport').getView('Common.Views.Header');
// headerView && headerView.setVisible(!checked);
//
// Common.localStorage.setItem('de-hidden-title', checked ? 1 : 0);
//
// Common.NotificationCenter.trigger('layout:changed', 'header');
// Common.NotificationCenter.trigger('edit:complete', this.toolbar);
// },
onHideStatusBar: function(item, checked) {
var headerView = this.getApplication().getController('Statusbar').getView('Statusbar');

View file

@ -1707,10 +1707,10 @@ define([
caption: this.textCompactView,
checkable: true
}),
this.mnuitemHideTitleBar = new Common.UI.MenuItem({
caption: this.textHideTitleBar,
checkable: true
}),
// this.mnuitemHideTitleBar = new Common.UI.MenuItem({
// caption: this.textHideTitleBar,
// checkable: true
// }),
this.mnuitemHideStatusBar = new Common.UI.MenuItem({
caption: this.textHideStatusBar,
checkable: true
@ -1748,8 +1748,8 @@ define([
]
})
);
if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header === false)
this.mnuitemHideTitleBar.hide();
// if (this.mode.isDesktopApp || this.mode.canBrandingExt && this.mode.customization && this.mode.customization.header === false)
// this.mnuitemHideTitleBar.hide();
this.btnMarkers.setMenu(
new Common.UI.Menu({
@ -2151,7 +2151,7 @@ define([
this.mnuitemCompactToolbar.setChecked(this.isCompactView, true);
this.mnuitemCompactToolbar.on('toggle', _.bind(this.changeViewMode, this));
this.mnuitemHideTitleBar.setChecked( Common.localStorage.getBool("de-hidden-title"), true );
// this.mnuitemHideTitleBar.setChecked( Common.localStorage.getBool("de-hidden-title"), true );
this.mnuitemHideStatusBar.setChecked( Common.localStorage.getBool("de-hidden-status"), true );
this.mnuitemHideRulers.setChecked( Common.localStorage.getBool("de-hidden-rulers"), true );
/**/