www

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

commit c4d2e77b279358dc72a96ee48ff7050ace5fccf0
parent d22d77fedf8cb90b40a2a1dfeec2136f6baa2ef8
Author: David Norton <david@nortoncrew.com>
Date:   Mon,  5 Jun 2006 11:58:16 +0000

Interface: Add Collections (debugged to view properly)
Interface: Delete collection now reselects correctly.

Diffstat:
Mchrome/chromeFiles/content/scholar/folderTreeView.js | 19++++++++-----------
Mchrome/chromeFiles/content/scholar/overlay.js | 4+---
2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/folderTreeView.js b/chrome/chromeFiles/content/scholar/folderTreeView.js @@ -60,10 +60,10 @@ Scholar.FolderTreeView.prototype.notify = function(action, type, ids) } else if(action == 'add' && row == null) { - var item = Scholar.Items.get(ids[i]); + var item = Scholar.Collections.get(ids[i]); - this._showItem(item,this.rowCount); - this._treebox.rowCountChanged(this.rowCount,1); + this._showItem(new Scholar.ItemGroup('collection',item), 0, this.rowCount); + this._treebox.rowCountChanged(this.rowCount-1,1); madeChanges = true; } @@ -216,18 +216,15 @@ Scholar.FolderTreeView.prototype.deleteSelection = function() this._treebox.beginUpdateBatch(); for (var i=0; i<rows.length; i++) { - //erase item/collection from DB: + //erase collection from DB: this._getItemAtRow(rows[i]-i).ref.erase(); - - /* Disabled for now because notifier handles it this: - //remove row from tree: - this._hideItem(rows[i]-i); - this._treebox.rowCountChanged(rows[i]-i, -1);*/ } this._treebox.endUpdateBatch(); - this._refreshHashMap(); - + if(end.value < this.rowCount) + this.selection.select(end.value); + else + this.selection.select(this.rowCount-1); } Scholar.FolderTreeView.prototype._refreshHashMap = function() diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -79,9 +79,7 @@ var ScholarPane = new function() function newCollection() { - var c = new Scholar.Collection(); - //c.setName('Untitled'); - //c.save(); + Scholar.Collections.add('Untitled Collection'); } function folderSelected()