Sort items for translator

In response to https://forums.zotero.org/discussion/60375?page=1#Item_6
This commit is contained in:
retorquere 2016-06-27 15:54:50 +02:00 committed by GitHub
parent 16524113c7
commit bd6dec352c

View file

@ -754,6 +754,7 @@ Zotero.Translate.ItemGetter = function() {
Zotero.Translate.ItemGetter.prototype = {
"setItems":function(items) {
this._itemsLeft = items;
this._itemsLeft.sort(function(a, b) { return a.id - b.id; });
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;
},
@ -794,6 +796,7 @@ Zotero.Translate.ItemGetter.prototype = {
this._collectionsLeft = Zotero.getCollections(null, true, libraryID);
}
this._itemsLeft.sort(function(a, b) { return a.id - b.id; });
this.numItems = this._itemsLeft.length;
},