www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 455facee95685da4c60939212f29955b257a2427
parent caaee87e9e46c68a11f177edbc49d36d56fae7f1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 27 Jun 2016 09:40:33 -0400

Merge pull request #1051 from retorquere/patch-2

Sort items for translator
Diffstat:
Mchrome/content/zotero/xpcom/translation/translate_item.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -658,6 +658,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; }, @@ -677,6 +678,7 @@ Zotero.Translate.ItemGetter.prototype = { } this._itemsLeft = Array.from(items.values()); + this._itemsLeft.sort(function(a, b) { return a.id - b.id; }); this.numItems = this._itemsLeft.length; }, @@ -687,6 +689,7 @@ Zotero.Translate.ItemGetter.prototype = { this._collectionsLeft = Zotero.Collections.getByLibrary(libraryID, true); } + this._itemsLeft.sort(function(a, b) { return a.id - b.id; }); this.numItems = this._itemsLeft.length; }), @@ -896,4 +899,4 @@ Zotero.Translate.ItemGetter.prototype = { return obj; } } -Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length }); -\ No newline at end of file +Zotero.Translate.ItemGetter.prototype.__defineGetter__("numItemsRemaining", function() { return this._itemsLeft.length });