Addresses #513, Deleted Items folder

Remember selection of trash in collection pane and don't lose focus after a restore
This commit is contained in:
Dan Stillman 2009-01-29 08:26:21 +00:00
parent 5e774efc42
commit e200fd154c

View file

@ -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;
}
}