diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js index bc447456cd..91fb5b39eb 100644 --- a/chrome/chromeFiles/content/scholar/overlay.js +++ b/chrome/chromeFiles/content/scholar/overlay.js @@ -311,7 +311,7 @@ var ScholarPane = new function() { if(itemsView) { - searchVal = document.getElementById('tb-search').value; + var searchVal = document.getElementById('tb-search').value; itemsView.searchText(searchVal); document.getElementById('tb-search-cancel').hidden = searchVal == ""; diff --git a/chrome/chromeFiles/content/scholar/xpcom/collectionTreeView.js b/chrome/chromeFiles/content/scholar/xpcom/collectionTreeView.js index 5b51aae455..dfa0c813c3 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/xpcom/collectionTreeView.js @@ -641,7 +641,17 @@ Scholar.ItemGroup.prototype.getChildItems = function() { if(this.searchText) { - return Scholar.Items.get(Scholar.Items.search(this.searchText,(this.isCollection() ? this.ref.getID() : null))); + var s = new Scholar.Search(); + if (this.isCollection()) + { + s.addCondition('collectionID', 'is', this.ref.getID(), true); + } + else if (this.isSearch()) + { + s.addCondition('savedSearchID', 'is', this.ref['id'], true); + } + s.addCondition('fulltext', 'contains', this.searchText); + return Scholar.Items.get(s.search()); } else { diff --git a/chrome/chromeFiles/content/scholar/xpcom/search.js b/chrome/chromeFiles/content/scholar/xpcom/search.js index 5b00df8960..feebee8042 100644 --- a/chrome/chromeFiles/content/scholar/xpcom/search.js +++ b/chrome/chromeFiles/content/scholar/xpcom/search.js @@ -127,6 +127,7 @@ Scholar.Search.prototype.addCondition = function(condition, operator, value, req this.addCondition('joinMode', 'any'); this.addCondition('title', operator, value, false); this.addCondition('field', operator, value, false); + this.addCondition('numberfield', operator, value, false); this.addCondition('creator', operator, value, false); this.addCondition('tag', operator, value, false); this.addCondition('note', operator, value, false); @@ -794,7 +795,7 @@ Scholar.SearchConditions = new function(){ if (!_initialized){ _init(); } - Scholar.debug(_standardConditions); + // TODO: return copy instead return _standardConditions; }