[DE PE SSE] New search: add filling find input, fix view mode
This commit is contained in:
parent
2ac854edc4
commit
2bfe6b2d2c
|
@ -118,9 +118,10 @@ define([
|
|||
|
||||
show: function() {
|
||||
var top = $('#app-title').height() + $('#toolbar').height() + 2,
|
||||
left = Common.Utils.innerWidth() - $('#right-menu').width() - this.options.width - 32;
|
||||
left = Common.Utils.innerWidth() - ($('#right-menu').is(':visible') ? $('#right-menu').width() : 0) - this.options.width - 32;
|
||||
Common.UI.Window.prototype.show.call(this, left, top);
|
||||
|
||||
this.inputSearch.val('');
|
||||
this.focus();
|
||||
},
|
||||
|
||||
|
@ -154,7 +155,7 @@ define([
|
|||
|
||||
onOpenPanel: function () {
|
||||
this.hide();
|
||||
this.fireEvent('search:show', [true]);
|
||||
this.fireEvent('search:show', [true, this.inputSearch.val()]);
|
||||
},
|
||||
|
||||
textFind: 'Find'
|
||||
|
|
|
@ -271,6 +271,10 @@ define([
|
|||
Common.localStorage.setBool('sse-search-options-extended', this.extendedOptions);
|
||||
},
|
||||
|
||||
setFindText: function (val) {
|
||||
this.inputText.setValue(val);
|
||||
},
|
||||
|
||||
textFind: 'Find',
|
||||
textFindAndReplace: 'Find and replace',
|
||||
textCloseSearch: 'Close search',
|
||||
|
|
|
@ -921,10 +921,11 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onShowHideSearch: function (state, action) {
|
||||
onShowHideSearch: function (state, findText, action) {
|
||||
if (state) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace';
|
||||
findText && this.leftMenu.panelSearch.setFindText(findText);
|
||||
this.leftMenu.panelSearch.setSearchMode(mode);
|
||||
this.leftMenu.showMenu('advancedsearch');
|
||||
} else {
|
||||
|
|
|
@ -333,13 +333,13 @@ define([
|
|||
cls : 'btn-toolbar'
|
||||
})).on('click', _on_btn_zoom.bind(me, 'up'));
|
||||
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
|
||||
if ( !Common.UI.Themes.isDarkTheme() ) {
|
||||
me.header.menuItemsDarkMode.hide();
|
||||
me.header.menuItemsDarkMode.$el.prev('.divider').hide();
|
||||
}
|
||||
}
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
},
|
||||
|
||||
onLayoutChanged: function(area) {
|
||||
|
|
|
@ -774,10 +774,11 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onShowHideSearch: function (state, action) {
|
||||
onShowHideSearch: function (state, findText, action) {
|
||||
if (state) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace';
|
||||
findText && this.leftMenu.panelSearch.setFindText(findText);
|
||||
this.leftMenu.panelSearch.setSearchMode(mode);
|
||||
this.leftMenu.showMenu('advancedsearch');
|
||||
} else {
|
||||
|
|
|
@ -342,8 +342,8 @@ define([
|
|||
})).on('click', _on_btn_zoom.bind(me, 'up'));
|
||||
|
||||
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
}
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
},
|
||||
|
||||
onLayoutChanged: function(area) {
|
||||
|
|
|
@ -983,10 +983,11 @@ define([
|
|||
}
|
||||
},
|
||||
|
||||
onShowHideSearch: function (state, action) {
|
||||
onShowHideSearch: function (state, findText, action) {
|
||||
if (state) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
var mode = this.mode.isEdit && !this.viewmode ? (action || undefined) : 'no-replace';
|
||||
findText && this.leftMenu.panelSearch.setFindText(findText);
|
||||
this.leftMenu.panelSearch.setSearchMode(mode);
|
||||
this.leftMenu.showMenu('advancedsearch');
|
||||
} else {
|
||||
|
|
|
@ -348,8 +348,8 @@ define([
|
|||
})).on('click', _on_btn_zoom.bind(me, 'up'));
|
||||
|
||||
me.header.btnOptions.menu.on('item:click', me.onOptionsItemClick.bind(this));
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
}
|
||||
me.header.btnSearch.on('click', me.onSearchClick.bind(this));
|
||||
},
|
||||
|
||||
// When our application is ready, lets get started
|
||||
|
|
Loading…
Reference in a new issue