www

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

commit fccc822063c0bbbf29e612554232f4c28aaee007
parent d456255b94bb1287a0ce5e21162574ec2393146c
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 15 Aug 2006 21:24:21 +0000

Like the last commit, just functional


Diffstat:
Mchrome/chromeFiles/content/scholar/itemTreeView.js | 11++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -84,10 +84,11 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) this.selection.selectEventsSuppressed = true; var savedSelection = this.saveSelection(); - + + ids = Scholar.flattenArguments(ids); + if((action == 'remove' && !this._itemGroup.isLibrary()) || (action == 'delete' && this._itemGroup.isLibrary())) { - ids = Scholar.flattenArguments(ids); //Since a remove involves shifting of rows, we have to do it in order //sort the ids by row @@ -116,8 +117,6 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) } else if(action == 'modify') //must check for null because it could legitimately be 0 { - ids = Scholar.flattenArguments(ids); - for(var i=0, len=ids.length; i<len; i++) { var row = this._itemRowMap[ids[i]]; @@ -183,7 +182,9 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) if(action == 'add') { - this.selectItem(item.getID()); + if (ids.length===1){ + this.selectItem(ids[0]); + } } else {