Commit 4e72c53a authored by Julia Radzhabova's avatar Julia Radzhabova

Load initial value for compact toolbar from editor config.

parent 428bddd0
......@@ -106,7 +106,8 @@
},
chat: false,
comments: false,
zoom: 100
zoom: 100,
compactToolbar: false
},
plugins: {
url: '../../../../sdkjs-plugins/',
......
......@@ -983,7 +983,7 @@ define([
this.btnPageMargins.menu.items[0].setVisible(false);
var value = Common.localStorage.getItem("de-compact-toolbar");
var valueCompact = (value !== null && parseInt(value) == 1);
var valueCompact = !!(value !== null && parseInt(value) == 1 || value === null && mode.customization && mode.customization.compactToolbar);
me.$el.html(this.template({
isCompactView: valueCompact
......@@ -1406,7 +1406,7 @@ define([
/**/
var mode = this.mode;
var value = Common.localStorage.getItem("de-compact-toolbar");
var valueCompact = (value !== null && parseInt(value) == 1);
var valueCompact = !!(value !== null && parseInt(value) == 1 || value === null && this.mode.customization && this.mode.customization.compactToolbar);
value = Common.localStorage.getItem("de-hidden-title");
var valueTitle = (value !== null && parseInt(value) == 1);
......
......@@ -1139,7 +1139,7 @@ define([
this.trigger('render:before', this);
var value = Common.localStorage.getItem('pe-compact-toolbar');
var valueCompact = (value!==null && parseInt(value) == 1);
var valueCompact = !!(value!==null && parseInt(value) == 1 || value === null && mode.customization && mode.customization.compactToolbar);
value = Common.localStorage.getItem('pe-hidden-title');
var valueTitle = (value!==null && parseInt(value) == 1);
......
......@@ -1523,7 +1523,8 @@ define([
JSON.parse(Common.localStorage.getItem('sse-hidden-title')) && (options.title = true);
JSON.parse(Common.localStorage.getItem('sse-hidden-formula')) && (options.formula = true);
JSON.parse(Common.localStorage.getItem('sse-hidden-headings')) && (options.headings = true);
var isCompactView = !!JSON.parse(Common.localStorage.getItem('sse-toolbar-compact'));
var isCompactView = JSON.parse(Common.localStorage.getItem('sse-toolbar-compact'));
isCompactView = !!(isCompactView!==null && parseInt(isCompactView) == 1 || isCompactView === null && mode.customization && mode.customization.compactToolbar);
me.mnuitemCompactToolbar.setChecked(isCompactView);
me.mnuitemHideTitleBar.setChecked(!!options.title);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment