[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 ||
( !Common.localStorage.itemExists("de-compact-toolbar") &&
config.customization && config.customization.compactToolbar )) {
if ( config.isEdit && !Common.localStorage.itemExists("de-compact-toolbar") &&
config.customization && config.customization.compactToolbar )
{
this.toolbar.setFolded(true);
this.toolbar.mnuitemCompactToolbar.setChecked(true, true);
Common.NotificationCenter.trigger('layout:changed', 'toolbar');
Common.NotificationCenter.trigger('edit:complete', this.toolbar);

View file

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