Fix sorting of autocomplete tags dropdown (since Fx9 or so)
This commit is contained in:
parent
cd39b5d0e4
commit
66bfaaae13
1 changed files with 6 additions and 1 deletions
|
@ -90,7 +90,7 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParam, p
|
||||||
var resultsCallback = function (results) {
|
var resultsCallback = function (results) {
|
||||||
var collation = self._zotero.getLocaleCollation();
|
var collation = self._zotero.getLocaleCollation();
|
||||||
results.sort(function(a, b) {
|
results.sort(function(a, b) {
|
||||||
return collation.compareString(1, a, b);
|
return collation.compareString(1, a.val, b.val);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -208,6 +208,11 @@ ZoteroAutoComplete.prototype.startSearch = function(searchString, searchParam, p
|
||||||
// Disable asynchronous until we figure out the hangs
|
// Disable asynchronous until we figure out the hangs
|
||||||
if (true) {
|
if (true) {
|
||||||
var rows = this._zotero.DB.query(sql, sqlParams);
|
var rows = this._zotero.DB.query(sql, sqlParams);
|
||||||
|
|
||||||
|
if (resultsCallback) {
|
||||||
|
resultsCallback(rows);
|
||||||
|
}
|
||||||
|
|
||||||
var results = [];
|
var results = [];
|
||||||
var comments = [];
|
var comments = [];
|
||||||
for each(var row in rows) {
|
for each(var row in rows) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue