[DE PE SSE] Fix search
This commit is contained in:
parent
cf2068b7cd
commit
c9c77487b7
|
@ -356,6 +356,10 @@ define([
|
|||
|
||||
if ( me.btnOptions )
|
||||
me.btnOptions.updateHint(me.tipViewSettings);
|
||||
|
||||
if (me.btnSearch)
|
||||
me.btnSearch.updateHint(me.tipSearch + Common.Utils.String.platformKey('Ctrl+F'));
|
||||
|
||||
}
|
||||
|
||||
function onFocusDocName(e){
|
||||
|
@ -870,7 +874,8 @@ define([
|
|||
tipViewSettings: 'View Settings',
|
||||
textRemoveFavorite: 'Remove from Favorites',
|
||||
textAddFavorite: 'Mark as favorite',
|
||||
textHideNotes: 'Hide Notes'
|
||||
textHideNotes: 'Hide Notes',
|
||||
tipSearch: 'Search'
|
||||
}
|
||||
}(), Common.Views.Header || {}))
|
||||
});
|
||||
|
|
|
@ -86,13 +86,11 @@ define([
|
|||
style: 'width: 100%;'
|
||||
});
|
||||
|
||||
this.$reaultsNumber = $('#search-adv-results-number');
|
||||
this.updateResultsNumber('no-results');
|
||||
|
||||
this.btnBack = new Common.UI.Button({
|
||||
parentEl: $('#search-adv-back'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-arrow-up',
|
||||
hint: this.tipPreviousResult,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom'
|
||||
});
|
||||
|
@ -102,6 +100,7 @@ define([
|
|||
parentEl: $('#search-adv-next'),
|
||||
cls: 'btn-toolbar',
|
||||
iconCls: 'toolbar__icon btn-arrow-down',
|
||||
hint: this.tipNextResult,
|
||||
dataHint: '1',
|
||||
dataHintDirection: 'bottom'
|
||||
});
|
||||
|
@ -117,6 +116,9 @@ define([
|
|||
});
|
||||
this.btnReplaceAll.on('click', _.bind(this.onReplaceClick, this, 'replaceall'));
|
||||
|
||||
this.$reaultsNumber = $('#search-adv-results-number');
|
||||
this.updateResultsNumber('no-results');
|
||||
|
||||
this.chCaseSensitive = new Common.UI.CheckBox({
|
||||
el: $('#search-adv-case-sensitive'),
|
||||
labelText: this.textCaseSensitive,
|
||||
|
@ -310,6 +312,7 @@ define([
|
|||
text = current === 'no-results' ? this.textNoSearchResults : (!count ? this.textNoMatches : Common.Utils.String.format(this.textSearchResults, current + 1, count));
|
||||
}
|
||||
this.$reaultsNumber.text(text);
|
||||
this.disableReplaceButtons(!count);
|
||||
},
|
||||
|
||||
onClickClosePanel: function() {
|
||||
|
@ -387,6 +390,8 @@ define([
|
|||
textNoSearchResults: 'No search results',
|
||||
textItemEntireCell: 'Entire cell contents',
|
||||
textTooManyResults: 'There are too many results to show here',
|
||||
tipPreviousResult: 'Previous result',
|
||||
tipNextResult: 'Next result',
|
||||
textName: 'Name',
|
||||
textCell: 'Cell',
|
||||
textValue: 'Value',
|
||||
|
|
|
@ -221,6 +221,7 @@
|
|||
.item {
|
||||
padding: 6px 15px;
|
||||
word-break: break-all;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background-color: @highlight-button-hover-ie;
|
||||
|
|
|
@ -121,6 +121,12 @@ define([
|
|||
this._state.useRegExp = checked;
|
||||
break;
|
||||
}
|
||||
if (this._state.searchText !== '' && this.onQuerySearch()) {
|
||||
this.hideResults();
|
||||
clearInterval(this.searchTimer);
|
||||
this.searchTimer = undefined;
|
||||
this.api.asc_StartTextAroundSearch();
|
||||
}
|
||||
},
|
||||
|
||||
onSearchNext: function (type, text, e) {
|
||||
|
|
|
@ -108,7 +108,7 @@ define([
|
|||
this.btnSearchBar = new Common.UI.Button({
|
||||
action: 'advancedsearch',
|
||||
el: $markup.elementById('#left-btn-searchbar'),
|
||||
hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'),
|
||||
hint: this.tipSearch,
|
||||
disabled: true,
|
||||
enableToggle: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
|
@ -296,6 +296,7 @@
|
|||
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
|
||||
"Common.Views.Header.txtAccessRights": "Change access rights",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.Header.tipSearch": "Search",
|
||||
"Common.Views.History.textCloseHistory": "Close History",
|
||||
"Common.Views.History.textHide": "Collapse",
|
||||
"Common.Views.History.textHideAll": "Hide detailed changes",
|
||||
|
|
|
@ -118,6 +118,12 @@ define([
|
|||
this._state.useRegExp = checked;
|
||||
break;
|
||||
}
|
||||
if (this._state.searchText !== '' && this.onQuerySearch()) {
|
||||
this.hideResults();
|
||||
clearInterval(this.searchTimer);
|
||||
this.searchTimer = undefined;
|
||||
this.api.asc_StartTextAroundSearch();
|
||||
}
|
||||
},
|
||||
|
||||
onSearchNext: function (type, text, e) {
|
||||
|
|
|
@ -104,7 +104,7 @@ define([
|
|||
this.btnSearchBar = new Common.UI.Button({
|
||||
action: 'advancedsearch',
|
||||
el: $markup.elementById('#left-btn-searchbar'),
|
||||
hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'),
|
||||
hint: this.tipSearch,
|
||||
disabled: true,
|
||||
enableToggle: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
|
@ -381,6 +381,7 @@
|
|||
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
|
||||
"Common.Views.Header.txtAccessRights": "Change access rights",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.Header.tipSearch": "Search",
|
||||
"Common.Views.History.textCloseHistory": "Close History",
|
||||
"Common.Views.History.textHide": "Collapse",
|
||||
"Common.Views.History.textHideAll": "Hide detailed changes",
|
||||
|
|
|
@ -94,7 +94,7 @@ define([
|
|||
this.btnSearchBar = new Common.UI.Button({
|
||||
action: 'advancedsearch',
|
||||
el: $markup.elementById('#left-btn-searchbar'),
|
||||
hint: this.tipSearch + Common.Utils.String.platformKey('Ctrl+F'),
|
||||
hint: this.tipSearch,
|
||||
disabled: true,
|
||||
enableToggle: true,
|
||||
toggleGroup: 'leftMenuGroup'
|
||||
|
|
|
@ -237,6 +237,7 @@
|
|||
"Common.Views.Header.tipViewUsers": "View users and manage document access rights",
|
||||
"Common.Views.Header.txtAccessRights": "Change access rights",
|
||||
"Common.Views.Header.txtRename": "Rename",
|
||||
"Common.Views.Header.tipSearch": "Search",
|
||||
"Common.Views.History.textCloseHistory": "Close History",
|
||||
"Common.Views.History.textHide": "Collapse",
|
||||
"Common.Views.History.textHideAll": "Hide detailed changes",
|
||||
|
|
Loading…
Reference in a new issue