Merge pull request #2101 from ONLYOFFICE/fix/fix-search

[DE PE SSE] Don't hide advanced search settings button in searchbar w…
This commit is contained in:
Julia Radzhabova 2022-12-02 13:09:31 +03:00 committed by GitHub
commit 3074476533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 6 deletions

View file

@ -881,6 +881,7 @@ define([
onShowHideSearch: function (state, findText) {
if (state) {
Common.UI.Menu.Manager.hideAll();
this.tryToShowLeftMenu();
this.leftMenu.showMenu('advancedsearch', undefined, true);
this.leftMenu.fireEvent('search:aftershow', this.leftMenu, findText);
} else {

View file

@ -283,8 +283,9 @@ define([
return;
}
if (!this.searchBar) {
var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( !isVisible ? {
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
} : {});

View file

@ -717,6 +717,7 @@ define([
onShowHideSearch: function (state, findText) {
if (state) {
Common.UI.Menu.Manager.hideAll();
this.tryToShowLeftMenu();
this.leftMenu.showMenu('advancedsearch', undefined, true);
this.leftMenu.fireEvent('search:aftershow', this.leftMenu, findText);
} else {

View file

@ -345,8 +345,9 @@ define([
return;
}
if (!this.searchBar) {
var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( !isVisible ? {
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
} : {});

View file

@ -857,6 +857,7 @@ define([
onShowHideSearch: function (state, findText) {
if (state) {
Common.UI.Menu.Manager.hideAll();
this.tryToShowLeftMenu();
this.leftMenu.showMenu('advancedsearch');
this.leftMenu.fireEvent('search:aftershow', [findText]);
} else {

View file

@ -311,8 +311,9 @@ define([
return;
}
if (!this.searchBar) {
var isVisible = leftMenu && leftMenu.leftMenu && leftMenu.leftMenu.isVisible();
this.searchBar = new Common.UI.SearchBar( !isVisible ? {
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
} : {});