Sort items for translator
In response to https://forums.zotero.org/discussion/60375?page=1#Item_6
This commit is contained in:
		
					parent
					
						
							
								caaee87e9e
							
						
					
				
			
			
				commit
				
					
						32c6e1edb3
					
				
			
		
					 1 changed files with 4 additions and 1 deletions
				
			
		|  | @ -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; | ||||
| 	}), | ||||
| 	 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 retorquere
				retorquere