[DE] debug of compact mode

This commit is contained in:
Maxim Kadushkin 2017-04-20 13:35:06 +03:00
parent 5821be5388
commit 610a47ab75
2 changed files with 10 additions and 9 deletions

View file

@ -2748,10 +2748,11 @@ define([
} }
} }
if ( !config.isEdit || if ( config.isEdit && !Common.localStorage.itemExists("de-compact-toolbar") &&
( !Common.localStorage.itemExists("de-compact-toolbar") && config.customization && config.customization.compactToolbar )
config.customization && config.customization.compactToolbar )) { {
this.toolbar.setFolded(true); this.toolbar.setFolded(true);
this.toolbar.mnuitemCompactToolbar.setChecked(true, true);
Common.NotificationCenter.trigger('layout:changed', 'toolbar'); Common.NotificationCenter.trigger('layout:changed', 'toolbar');
Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

@ -1322,19 +1322,19 @@ define([
this.fireEvent('render:before', [this]); this.fireEvent('render:before', [this]);
if ( mode.isEdit ) if ( mode.isEdit ) {
me.$el.html( me.rendererComponents(config.$dom) ); me.isCompactView = Common.localStorage.getBool("de-compact-toolbar");
else { me.$el.html(me.rendererComponents(config.$dom));
config.$dom.find('[data-tab=home],[data-tab=ins],[data-tab=layout]').hide(); } else {
config.$dom.find('.canedit').hide();
config.$dom.addClass('folded'); config.$dom.addClass('folded');
me.isCompactView = true;
me.$el.html(config.$dom); me.$el.html(config.$dom);
} }
this.fireEvent('render:after', [this]); this.fireEvent('render:after', [this]);
me.isCompactView = Common.localStorage.getBool("de-compact-toolbar");
/** coauthoring begin **/ /** coauthoring begin **/
this.showSynchTip = !Common.localStorage.getBool("de-hide-synch"); this.showSynchTip = !Common.localStorage.getBool("de-hide-synch");
this.needShowSynchTip = false; this.needShowSynchTip = false;