[DE PE] Fix new search
This commit is contained in:
parent
c64539f2ab
commit
c10d349a19
|
@ -48,9 +48,9 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding-small"><div id="search-adv-case-sensitive"></div></td>
|
<td class="padding-small"><div id="search-adv-case-sensitive"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<!---<tr>
|
||||||
<td class="padding-small"><div id="search-adv-use-regexp"></div></td>
|
<td class="padding-small"><div id="search-adv-use-regexp"></div></td>
|
||||||
</tr>
|
</tr>-->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="padding-large"><div id="search-adv-match-word"></div></td>
|
<td class="padding-large"><div id="search-adv-match-word"></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -128,7 +128,7 @@ define([
|
||||||
me.fireEvent('search:options', ['case-sensitive', field.getValue() === 'checked']);
|
me.fireEvent('search:options', ['case-sensitive', field.getValue() === 'checked']);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.chUseRegExp = new Common.UI.CheckBox({
|
/*this.chUseRegExp = new Common.UI.CheckBox({
|
||||||
el: $('#search-adv-use-regexp'),
|
el: $('#search-adv-use-regexp'),
|
||||||
labelText: this.textMatchUsingRegExp,
|
labelText: this.textMatchUsingRegExp,
|
||||||
dataHint: '1',
|
dataHint: '1',
|
||||||
|
@ -136,7 +136,7 @@ define([
|
||||||
dataHintOffset: 'small'
|
dataHintOffset: 'small'
|
||||||
}).on('change', function(field) {
|
}).on('change', function(field) {
|
||||||
me.fireEvent('search:options', ['regexp', field.getValue() === 'checked']);
|
me.fireEvent('search:options', ['regexp', field.getValue() === 'checked']);
|
||||||
});
|
});*/
|
||||||
|
|
||||||
this.chMatchWord = new Common.UI.CheckBox({
|
this.chMatchWord = new Common.UI.CheckBox({
|
||||||
el: $('#search-adv-match-word'),
|
el: $('#search-adv-match-word'),
|
||||||
|
@ -311,7 +311,7 @@ define([
|
||||||
this.inputText.setValue(val);
|
this.inputText.setValue(val);
|
||||||
},
|
},
|
||||||
|
|
||||||
clearResults: function () {
|
clearResultsNumber: function () {
|
||||||
this.updateResultsNumber('no-results');
|
this.updateResultsNumber('no-results');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -237,6 +237,7 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
onUpdateSearchCurrent: function (current, all) {
|
onUpdateSearchCurrent: function (current, all) {
|
||||||
|
if (current === -1) return;
|
||||||
this._state.currentResult = current;
|
this._state.currentResult = current;
|
||||||
this._state.resultsNumber = all;
|
this._state.resultsNumber = all;
|
||||||
if (this.view) {
|
if (this.view) {
|
||||||
|
@ -322,6 +323,7 @@ define([
|
||||||
} else {
|
} else {
|
||||||
this.resultItems = [];
|
this.resultItems = [];
|
||||||
this.view.disableReplaceButtons(true);
|
this.view.disableReplaceButtons(true);
|
||||||
|
this.view.clearResultsNumber();
|
||||||
}
|
}
|
||||||
this.view.disableNavButtons(this._state.currentResult, this._state.resultsNumber);
|
this.view.disableNavButtons(this._state.currentResult, this._state.resultsNumber);
|
||||||
},
|
},
|
||||||
|
|
|
@ -482,7 +482,6 @@ define([
|
||||||
}
|
}
|
||||||
if (this.header.btnSearch.pressed) {
|
if (this.header.btnSearch.pressed) {
|
||||||
this.searchBar.show(this.api.asc_GetSelectedText());
|
this.searchBar.show(this.api.asc_GetSelectedText());
|
||||||
leftMenu.getView('LeftMenu').panelSearch.clearResults();
|
|
||||||
} else {
|
} else {
|
||||||
this.searchBar.hide();
|
this.searchBar.hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,7 +534,6 @@ define([
|
||||||
}
|
}
|
||||||
if (this.header.btnSearch.pressed) {
|
if (this.header.btnSearch.pressed) {
|
||||||
this.searchBar.show(this.api.asc_GetSelectedText());
|
this.searchBar.show(this.api.asc_GetSelectedText());
|
||||||
leftMenu.getView('LeftMenu').panelSearch.clearResults();
|
|
||||||
} else {
|
} else {
|
||||||
this.searchBar.hide();
|
this.searchBar.hide();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue