www

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

commit e2ea7532ba0a37b52520b805a9cc6a8b92a235af
parent 194343cb0f8dc21f262b901797f628df2b042cb6
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  4 Feb 2013 04:08:34 -0500

Fixes #47, Dragging attachment to item removes search results

Diffstat:
Mchrome/content/zotero/xpcom/itemTreeView.js | 15+++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/itemTreeView.js b/chrome/content/zotero/xpcom/itemTreeView.js @@ -599,9 +599,20 @@ Zotero.ItemTreeView.prototype.notify = function(action, type, ids, extraData) // Otherwise re-run the search, which refreshes the item list else { - // For item adds, clear quicksearch + // For item adds, clear the quicksearch, unless all the new items + // are child items if (activeWindow && type == 'item') { - quicksearch.value = ''; + var clear = false; + var items = Zotero.Items.get(ids); + for each(var item in items) { + if (!item.getSource()) { + clear = true; + break; + } + } + if (clear) { + quicksearch.value = ''; + } } quicksearch.doCommand(); madeChanges = true;