www

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

commit 6b335fd36316b4a09132a746ba214f591abc8b71
parent 878aa2dcf9450042c71f06bf9e8f9aa27f6e3aba
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  9 Mar 2011 06:23:39 +0000

Display no more than 20 items in collection-item conflict message


Diffstat:
Mchrome/content/zotero/xpcom/sync.js | 11+++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync.js b/chrome/content/zotero/xpcom/sync.js @@ -3428,15 +3428,22 @@ Zotero.Sync.Server.Data = new function() { introMsg += " The following items have been added to the collection:"; var itemText = []; - for each(var id in addedItemIDs) { + var max = addedItemIDs.length; + for (var i=0; i<max; i++) { + var id = addedItemIDs[i]; var item = Zotero.Items.get(id); - var title = item.getField('title'); + var title = item.getDisplayTitle(); var text = " \u2022 " + title; var firstCreator = item.getField('firstCreator'); if (firstCreator) { text += " (" + firstCreator + ")"; } itemText.push(text); + + if (i == 19 && max > 20) { + itemText.push(" \u2022 ..."); + break; + } } return introMsg + "\n\n" + itemText.join("\n"); }