diff --git a/chrome/chromeFiles/content/scholar/bindings/scholarsearch.xml b/chrome/chromeFiles/content/scholar/bindings/scholarsearch.xml index 28cfb7055..a8aefcdb2 100644 --- a/chrome/chromeFiles/content/scholar/bindings/scholarsearch.xml +++ b/chrome/chromeFiles/content/scholar/bindings/scholarsearch.xml @@ -34,9 +34,18 @@ conditionsBox.removeChild(conditionsBox.firstChild); var conditions = this.search.getSearchConditions(); - if(conditions.length) - for(var i = 0, len = conditions.length; i @@ -44,12 +53,12 @@ - + - + + + + + + @@ -107,10 +131,10 @@ - + - + @@ -124,10 +148,12 @@ - - + - + - - - - - - + diff --git a/chrome/chromeFiles/content/scholar/collectionTreeView.js b/chrome/chromeFiles/content/scholar/collectionTreeView.js index ae9286e55..fd3de6d9e 100644 --- a/chrome/chromeFiles/content/scholar/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/collectionTreeView.js @@ -65,10 +65,7 @@ Scholar.CollectionTreeView.prototype.refresh = function() var savedSearches = Scholar.Searches.getAll(); for(var i = 0; i < savedSearches.length; i++) - { this._showItem(new Scholar.ItemGroup('search',savedSearches[i]), 0, this._dataItems.length); //itemgroup ref, level, beforeRow - Scholar.debug(i); - } this._refreshHashMap(); } @@ -106,6 +103,8 @@ Scholar.CollectionTreeView.prototype.notify = function(action, type, ids) { var madeChanges = false; + Scholar.debug(action+', '+type+', '+ids); + if(action == 'remove') { ids = Scholar.flattenArguments(ids); @@ -310,7 +309,10 @@ Scholar.CollectionTreeView.prototype.deleteSelection = function() if(group.isCollection()) group.ref.erase(); else if(group.isSearch()) + { Scholar.Searches.erase(group.ref['id']); + this._hideItem(rows[i]-i); //we don't have the notification system set up with searches. + } } this._treebox.endUpdateBatch(); diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js index c1b5be555..4107f9965 100644 --- a/chrome/chromeFiles/content/scholar/overlay.js +++ b/chrome/chromeFiles/content/scholar/overlay.js @@ -177,7 +177,7 @@ var ScholarPane = new function() window.openDialog('chrome://scholar/content/searchDialog.xul','','chrome,modal',io); if(io.dataOut) - getCollectionsView().reload(); + getCollectionsView().reload(); //we don't have notification support for searches } function onCollectionSelected() @@ -300,7 +300,7 @@ var ScholarPane = new function() var io = {dataIn: {search: s, name: collection.getName()}, dataOut: null}; window.openDialog('chrome://scholar/content/searchDialog.xul','','chrome,modal',io); if(io.dataOut) - onCollectionSelected(); + onCollectionSelected(); //reload itemsView } } } diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index 96fb9e424..0f63040ad 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -69,8 +69,8 @@ + - diff --git a/chrome/chromeFiles/content/scholar/searchDialog.js b/chrome/chromeFiles/content/scholar/searchDialog.js index 2537b8095..d29761cf2 100644 --- a/chrome/chromeFiles/content/scholar/searchDialog.js +++ b/chrome/chromeFiles/content/scholar/searchDialog.js @@ -39,6 +39,5 @@ function doUnload() function doAccept() { document.getElementById('search-box').search.setName(document.getElementById('search-name').value); - document.getElementById('search-box').save(); - io.dataOut = true; + io.dataOut = document.getElementById('search-box').save(); } \ No newline at end of file diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd index 9abe8a791..bfc9b796a 100644 --- a/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd +++ b/chrome/chromeFiles/locale/en-US/scholar/scholar.dtd @@ -19,8 +19,9 @@ - + + diff --git a/chrome/chromeFiles/skin/default/scholar/overlay.css b/chrome/chromeFiles/skin/default/scholar/overlay.css index edf2b058e..c141dbdc8 100644 --- a/chrome/chromeFiles/skin/default/scholar/overlay.css +++ b/chrome/chromeFiles/skin/default/scholar/overlay.css @@ -135,6 +135,11 @@ width: 150px; } +#tb-collection-addsearch +{ + list-style-image: url('chrome://scholar/skin/treesource-search.png'); +} + #tb-search-cancel { margin: 0px;