[DE PE SSE] Make new search: hide search window when open search panel
This commit is contained in:
parent
e77f9db33d
commit
ec831ded6a
|
@ -957,6 +957,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onShowAfterSearch: function (findText) {
|
onShowAfterSearch: function (findText) {
|
||||||
|
var viewport = this.getApplication().getController('Viewport');
|
||||||
|
if (viewport.isSearchBarVisible()) {
|
||||||
|
viewport.searchBar.hide();
|
||||||
|
}
|
||||||
|
|
||||||
var text = findText || this.api.asc_GetSelectedText();
|
var text = findText || this.api.asc_GetSelectedText();
|
||||||
if (text) {
|
if (text) {
|
||||||
this.leftMenu.panelSearch.setFindText(text);
|
this.leftMenu.panelSearch.setFindText(text);
|
||||||
|
|
|
@ -812,6 +812,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onShowAfterSearch: function (findText) {
|
onShowAfterSearch: function (findText) {
|
||||||
|
var viewport = this.getApplication().getController('Viewport');
|
||||||
|
if (viewport.isSearchBarVisible()) {
|
||||||
|
viewport.searchBar.hide();
|
||||||
|
}
|
||||||
|
|
||||||
var text = findText || this.api.asc_GetSelectedText();
|
var text = findText || this.api.asc_GetSelectedText();
|
||||||
if (text) {
|
if (text) {
|
||||||
this.leftMenu.panelSearch.setFindText(text);
|
this.leftMenu.panelSearch.setFindText(text);
|
||||||
|
|
|
@ -66,7 +66,8 @@ define([
|
||||||
'file:show': _.bind(this.fileShowHide, this, true),
|
'file:show': _.bind(this.fileShowHide, this, true),
|
||||||
'file:hide': _.bind(this.fileShowHide, this, false),
|
'file:hide': _.bind(this.fileShowHide, this, false),
|
||||||
'comments:show': _.bind(this.commentsShowHide, this, true),
|
'comments:show': _.bind(this.commentsShowHide, this, true),
|
||||||
'comments:hide': _.bind(this.commentsShowHide, this, false)
|
'comments:hide': _.bind(this.commentsShowHide, this, false),
|
||||||
|
'search:aftershow': _.bind(this.onShowAfterSearch, this)
|
||||||
},
|
},
|
||||||
'Common.Views.About': {
|
'Common.Views.About': {
|
||||||
'show': _.bind(this.aboutShowHide, this, true),
|
'show': _.bind(this.aboutShowHide, this, true),
|
||||||
|
@ -1019,6 +1020,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onShowAfterSearch: function (findText) {
|
onShowAfterSearch: function (findText) {
|
||||||
|
var viewport = this.getApplication().getController('Viewport');
|
||||||
|
if (viewport.isSearchBarVisible()) {
|
||||||
|
viewport.searchBar.hide();
|
||||||
|
}
|
||||||
|
|
||||||
var text = findText || this.api.asc_GetSelectedText();
|
var text = findText || this.api.asc_GetSelectedText();
|
||||||
if (text) {
|
if (text) {
|
||||||
this.leftMenu.panelSearch.setFindText(text);
|
this.leftMenu.panelSearch.setFindText(text);
|
||||||
|
|
Loading…
Reference in a new issue