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