Refactoring

This commit is contained in:
Julia Radzhabova 2022-06-09 00:31:42 +03:00
parent 79428de692
commit 568a2d300b
3 changed files with 6 additions and 6 deletions

View file

@ -283,8 +283,8 @@ define([
return; return;
} }
if (!this.searchBar) { if (!this.searchBar) {
var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { this.searchBar = new Common.UI.SearchBar( !isVisible ? {
showOpenPanel: false, showOpenPanel: false,
width: 303 width: 303
} : {}); } : {});

View file

@ -345,8 +345,8 @@ define([
return; return;
} }
if (!this.searchBar) { if (!this.searchBar) {
var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { this.searchBar = new Common.UI.SearchBar( !isVisible ? {
showOpenPanel: false, showOpenPanel: false,
width: 303 width: 303
} : {}); } : {});

View file

@ -311,8 +311,8 @@ define([
return; return;
} }
if (!this.searchBar) { if (!this.searchBar) {
var hideLeftPanel = this.appConfig.canBrandingExt && (!Common.UI.LayoutManager.isElementVisible('leftMenu') || this.appConfig.customization && this.appConfig.customization.leftMenu===false); var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( hideLeftPanel ? { this.searchBar = new Common.UI.SearchBar( !isVisible ? {
showOpenPanel: false, showOpenPanel: false,
width: 303 width: 303
} : {}); } : {});