diff --git a/chrome/chromeFiles/content/scholar/collectionTreeView.js b/chrome/chromeFiles/content/scholar/collectionTreeView.js index c125b5085c..22898b2ab9 100644 --- a/chrome/chromeFiles/content/scholar/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/collectionTreeView.js @@ -288,7 +288,7 @@ Scholar.ItemGroup.prototype.getChildItems = function() { if(this.searchText) { - return Scholar.Items.get(Scholar.Items.search(this.searchText)); + return Scholar.Items.get(Scholar.Items.search(this.searchText,(this.isCollection() ? this.ref.getID() : null))); } else { diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 301be7ab94..20bdbf7f3b 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -1,6 +1,7 @@ Scholar.ItemTreeView = function(itemGroup) { this._treebox = null; + this._savedSelection = null; this._dataItems = new Array(); this.rowCount = 0; this._itemGroup = itemGroup; @@ -88,22 +89,16 @@ Scholar.ItemTreeView.prototype.cycleHeader = function(column) } } + this.selection.selectEventsSuppressed = true; + this.saveSelection(); this.sort(); + this.rememberSelection(); + this.selection.selectEventsSuppressed = false; + this._treebox.invalidate(); } Scholar.ItemTreeView.prototype.sort = function() { - this.selection.selectEventsSuppressed = true; - - var selectedIDs = new Array(); - var start = new Object(); - var end = new Object(); - for (var i=0, len=this.selection.getRangeCount(); i