diff --git a/apps/documenteditor/main/app/controller/Viewport.js b/apps/documenteditor/main/app/controller/Viewport.js index e2d83c757..d649a62d0 100644 --- a/apps/documenteditor/main/app/controller/Viewport.js +++ b/apps/documenteditor/main/app/controller/Viewport.js @@ -283,7 +283,11 @@ define([ return; } if (!this.searchBar) { - this.searchBar = new Common.UI.SearchBar({}); + var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); + this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { + showOpenPanel: false, + width: 303 + } : {}); this.searchBar.on('hide', _.bind(function () { this.header.btnSearch.toggle(false, true); }, this)); diff --git a/apps/presentationeditor/main/app/controller/Viewport.js b/apps/presentationeditor/main/app/controller/Viewport.js index de46818e5..7d63da241 100644 --- a/apps/presentationeditor/main/app/controller/Viewport.js +++ b/apps/presentationeditor/main/app/controller/Viewport.js @@ -345,7 +345,11 @@ define([ return; } if (!this.searchBar) { - this.searchBar = new Common.UI.SearchBar({}); + var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); + this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { + showOpenPanel: false, + width: 303 + } : {}); this.searchBar.on('hide', _.bind(function () { this.header.btnSearch.toggle(false, true); }, this)); diff --git a/apps/spreadsheeteditor/main/app/controller/Viewport.js b/apps/spreadsheeteditor/main/app/controller/Viewport.js index b1555bff0..6c89b2d69 100644 --- a/apps/spreadsheeteditor/main/app/controller/Viewport.js +++ b/apps/spreadsheeteditor/main/app/controller/Viewport.js @@ -311,7 +311,11 @@ define([ return; } if (!this.searchBar) { - this.searchBar = new Common.UI.SearchBar({}); + var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); + this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { + showOpenPanel: false, + width: 303 + } : {}); this.searchBar.on('hide', _.bind(function () { this.header.btnSearch.toggle(false, true); }, this));