Load initial value for compact toolbar from editor config.
This commit is contained in:
parent
428bddd013
commit
4e72c53a8a
|
@ -106,7 +106,8 @@
|
||||||
},
|
},
|
||||||
chat: false,
|
chat: false,
|
||||||
comments: false,
|
comments: false,
|
||||||
zoom: 100
|
zoom: 100,
|
||||||
|
compactToolbar: false
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
url: '../../../../sdkjs-plugins/',
|
url: '../../../../sdkjs-plugins/',
|
||||||
|
|
|
@ -983,7 +983,7 @@ define([
|
||||||
this.btnPageMargins.menu.items[0].setVisible(false);
|
this.btnPageMargins.menu.items[0].setVisible(false);
|
||||||
|
|
||||||
var value = Common.localStorage.getItem("de-compact-toolbar");
|
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({
|
me.$el.html(this.template({
|
||||||
isCompactView: valueCompact
|
isCompactView: valueCompact
|
||||||
|
@ -1406,7 +1406,7 @@ define([
|
||||||
/**/
|
/**/
|
||||||
var mode = this.mode;
|
var mode = this.mode;
|
||||||
var value = Common.localStorage.getItem("de-compact-toolbar");
|
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");
|
value = Common.localStorage.getItem("de-hidden-title");
|
||||||
var valueTitle = (value !== null && parseInt(value) == 1);
|
var valueTitle = (value !== null && parseInt(value) == 1);
|
||||||
|
|
|
@ -1139,7 +1139,7 @@ define([
|
||||||
this.trigger('render:before', this);
|
this.trigger('render:before', this);
|
||||||
|
|
||||||
var value = Common.localStorage.getItem('pe-compact-toolbar');
|
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');
|
value = Common.localStorage.getItem('pe-hidden-title');
|
||||||
var valueTitle = (value!==null && parseInt(value) == 1);
|
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-title')) && (options.title = true);
|
||||||
JSON.parse(Common.localStorage.getItem('sse-hidden-formula')) && (options.formula = true);
|
JSON.parse(Common.localStorage.getItem('sse-hidden-formula')) && (options.formula = true);
|
||||||
JSON.parse(Common.localStorage.getItem('sse-hidden-headings')) && (options.headings = 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.mnuitemCompactToolbar.setChecked(isCompactView);
|
||||||
me.mnuitemHideTitleBar.setChecked(!!options.title);
|
me.mnuitemHideTitleBar.setChecked(!!options.title);
|
||||||
|
|
Loading…
Reference in a new issue