Fix search panel when leftMenu is hidden

This commit is contained in:
Julia Radzhabova 2022-06-08 23:31:46 +03:00
parent ee6448c8c5
commit 14442d55d8
3 changed files with 15 additions and 3 deletions

View file

@ -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));

View file

@ -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));

View file

@ -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));