diff --git a/CHANGELOG.md b/CHANGELOG.md index 668a1e9bd..fd3f1236c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Add rotation and flip to image and shape settings (bug #19378) * Save file copy to selected folder (bug #23603, bug #32790) * Load image from storage +* Add customization parameter 'hideRightMenu' for hiding right panel on first loading (bug #39096) ### Document Editor diff --git a/apps/api/documents/api.js b/apps/api/documents/api.js index a7eb14f2b..52027a552 100644 --- a/apps/api/documents/api.js +++ b/apps/api/documents/api.js @@ -116,6 +116,7 @@ compactToolbar: false, leftMenu: true, rightMenu: true, + hideRightMenu: false, // hide or show right panel on first loading toolbar: true, header: true, statusBar: true, diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index 3069b0d93..a752c6f3e 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -279,7 +279,7 @@ define([ this.rightmenu.shapeSettings.createDelayedElements(); var selectedElements = this.api.getSelectedElements(); if (selectedElements.length>0) { - this.onFocusObject(selectedElements, !Common.localStorage.getBool("de-hide-right-settings")); + this.onFocusObject(selectedElements, !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu)); } } }, diff --git a/apps/documenteditor/main/app/view/RightMenu.js b/apps/documenteditor/main/app/view/RightMenu.js index fbc92710f..6f367f5b8 100644 --- a/apps/documenteditor/main/app/view/RightMenu.js +++ b/apps/documenteditor/main/app/view/RightMenu.js @@ -150,7 +150,8 @@ define([ this.trigger('render:before', this); - var open = !Common.localStorage.getBool("de-hide-right-settings"); + this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu; + var open = !Common.localStorage.getBool("de-hide-right-settings", this.defaultHideRightMenu); el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px'); el.show(); diff --git a/apps/presentationeditor/main/app/controller/RightMenu.js b/apps/presentationeditor/main/app/controller/RightMenu.js index ee427b30f..af4b18eaa 100644 --- a/apps/presentationeditor/main/app/controller/RightMenu.js +++ b/apps/presentationeditor/main/app/controller/RightMenu.js @@ -287,7 +287,7 @@ define([ this.rightmenu.shapeSettings.createDelayedElements(); var selectedElements = this.api.getSelectedElements(); if (selectedElements.length>0) { - this.onFocusObject(selectedElements, !Common.localStorage.getBool("pe-hide-right-settings")); + this.onFocusObject(selectedElements, !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu)); } } }, diff --git a/apps/presentationeditor/main/app/view/RightMenu.js b/apps/presentationeditor/main/app/view/RightMenu.js index 71bad526c..54c947e9e 100644 --- a/apps/presentationeditor/main/app/view/RightMenu.js +++ b/apps/presentationeditor/main/app/view/RightMenu.js @@ -149,7 +149,8 @@ define([ this.trigger('render:before', this); - var open = !Common.localStorage.getBool("pe-hide-right-settings"); + this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu; + var open = !Common.localStorage.getBool("pe-hide-right-settings", this.defaultHideRightMenu); el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px'); el.show(); diff --git a/apps/spreadsheeteditor/main/app/controller/RightMenu.js b/apps/spreadsheeteditor/main/app/controller/RightMenu.js index 8f7e14c09..78826c4ac 100644 --- a/apps/spreadsheeteditor/main/app/controller/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/controller/RightMenu.js @@ -306,8 +306,7 @@ define([ createDelayedElements: function() { var me = this; if (this.api) { - var open = Common.localStorage.getItem("sse-hide-right-settings"); - this._openRightMenu = (open===null || parseInt(open) == 0); + this._openRightMenu = !Common.localStorage.getBool("sse-hide-right-settings", this.rightmenu.defaultHideRightMenu); this.api.asc_registerCallback('asc_onSelectionChanged', _.bind(this.onSelectionChanged, this)); this.api.asc_registerCallback('asc_doubleClickOnObject', _.bind(this.onDoubleClickOnObject, this)); diff --git a/apps/spreadsheeteditor/main/app/view/RightMenu.js b/apps/spreadsheeteditor/main/app/view/RightMenu.js index 8ab5db088..e05aa3c82 100644 --- a/apps/spreadsheeteditor/main/app/view/RightMenu.js +++ b/apps/spreadsheeteditor/main/app/view/RightMenu.js @@ -161,7 +161,8 @@ define([ this.trigger('render:before', this); - var open = !Common.localStorage.getBool("sse-hide-right-settings"); + this.defaultHideRightMenu = mode.customization && !!mode.customization.hideRightMenu; + var open = !Common.localStorage.getBool("sse-hide-right-settings", this.defaultHideRightMenu); el.css('width', ((open) ? MENU_SCALE_PART : SCALE_MIN) + 'px'); el.css('z-index', 101); el.show();