Merge pull request #1052 from retorquere/patch-1
Sort items for translator
This commit is contained in:
commit
eb7bba9d7d
1 changed files with 4 additions and 1 deletions
|
@ -754,6 +754,7 @@ Zotero.Translate.ItemGetter = function() {
|
||||||
Zotero.Translate.ItemGetter.prototype = {
|
Zotero.Translate.ItemGetter.prototype = {
|
||||||
"setItems":function(items) {
|
"setItems":function(items) {
|
||||||
this._itemsLeft = items;
|
this._itemsLeft = items;
|
||||||
|
this._itemsLeft.sort(function(a, b) { return a.id - b.id; });
|
||||||
this.numItems = this._itemsLeft.length;
|
this.numItems = this._itemsLeft.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -784,6 +785,7 @@ Zotero.Translate.ItemGetter.prototype = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._itemsLeft.sort(function(a, b) { return a.id - b.id; });
|
||||||
this.numItems = this._itemsLeft.length;
|
this.numItems = this._itemsLeft.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -794,6 +796,7 @@ Zotero.Translate.ItemGetter.prototype = {
|
||||||
this._collectionsLeft = Zotero.getCollections(null, true, libraryID);
|
this._collectionsLeft = Zotero.getCollections(null, true, libraryID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._itemsLeft.sort(function(a, b) { return a.id - b.id; });
|
||||||
this.numItems = this._itemsLeft.length;
|
this.numItems = this._itemsLeft.length;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -999,4 +1002,4 @@ Zotero.Translate.ItemGetter.prototype = {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length });
|
Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length });
|
||||||
|
|
Loading…
Add table
Reference in a new issue