diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index e666fd5fd..007e0280f 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -2741,7 +2741,10 @@ define([ onAppShowed: function (config) { var me = this; - me.toolbar.render(config); + var isCompactView = Common.localStorage.getItem("de-compact-toolbar"); + isCompactView = !config.isEdit || !!(isCompactView !== null && parseInt(isCompactView) == 1 || isCompactView === null && config.customization && config.customization.compactToolbar); + + me.toolbar.render(_.extend(config, {isCompactView: isCompactView})); if ( config.isEdit ) { var tab = {action: 'review', caption: 'Review'}; @@ -2751,15 +2754,6 @@ define([ me.toolbar.addTab(tab, $panel, 3); } } - - if ( !config.isEdit || - ( !Common.localStorage.itemExists("de-compact-toolbar") && - config.customization && config.customization.compactToolbar )) { - this.toolbar.setFolded(true); - - Common.NotificationCenter.trigger('layout:changed', 'toolbar'); - Common.NotificationCenter.trigger('edit:complete', this.toolbar); - } }, onAppReady: function (config) { diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index b5301bd20..cb14d74e5 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1335,7 +1335,7 @@ define([ this.fireEvent('render:after', [this]); - me.isCompactView = Common.localStorage.getBool("de-compact-toolbar"); + me.isCompactView = mode.isCompactView; /** coauthoring begin **/ this.showSynchTip = !Common.localStorage.getBool("de-hide-synch");