commit e200fd154c4fc7a328518f74a65402f082358ae4 parent 5e774efc42fae1bef2f432c5cfcf24802442606c Author: Dan Stillman <dstillman@zotero.org> Date: Thu, 29 Jan 2009 08:26:21 +0000 Addresses #513, Deleted Items folder Remember selection of trash in collection pane and don't lose focus after a restore Diffstat:
| M | chrome/content/zotero/xpcom/collectionTreeView.js | | | 12 | ++++++++++++ |
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -613,6 +613,9 @@ Zotero.CollectionTreeView.prototype.saveSelection = function() else if (this._getItemAtRow(i).isSearch()) { return 'S' + this._getItemAtRow(i).ref.id; } + else if (this._getItemAtRow(i).isTrash()) { + return 'T'; + } } } return false; @@ -649,6 +652,15 @@ Zotero.CollectionTreeView.prototype.rememberSelection = function(selection) this.selection.select(this._searchRowMap[id]); } break; + + case 'T': + if (this._getItemAtRow(this.rowCount-1).isTrash()){ + this.selection.select(this.rowCount-1); + } + else { + this.selection.select(0); + } + break; } }