diff --git a/Zotero.dot b/Zotero.dot index a5084ee56..3cec5015c 100755 Binary files a/Zotero.dot and b/Zotero.dot differ diff --git a/Zotero.dot.dmg b/Zotero.dot.dmg index be7141996..129a719bb 100644 Binary files a/Zotero.dot.dmg and b/Zotero.dot.dmg differ diff --git a/chrome/chromeFiles/content/scholar/selectItemsDialog.js b/chrome/chromeFiles/content/scholar/selectItemsDialog.js index 76c357185..2037cea75 100644 --- a/chrome/chromeFiles/content/scholar/selectItemsDialog.js +++ b/chrome/chromeFiles/content/scholar/selectItemsDialog.js @@ -8,6 +8,11 @@ var itemsView; var collectionsView; var io; +/* + * window takes two arguments: + * io - used for input/output (dataOut is list of item IDs) + * sourcesOnly - whether only sources should be shown in the window + */ function doLoad() { io = window.arguments[0]; @@ -40,12 +45,23 @@ function onCollectionSelected() var collection = collectionsView._getItemAtRow(collectionsView.selection.currentIndex); collection.setSearch(''); - itemsView = new Scholar.ItemTreeView(collection); + itemsView = new Scholar.ItemTreeView(collection, (window.arguments[1] ? true : false)); document.getElementById('items-tree').view = itemsView; } } +function onSearch() +{ + if(itemsView) + { + var searchVal = document.getElementById('tb-search').value; + itemsView.searchText(searchVal); + + document.getElementById('tb-search-cancel').hidden = searchVal == ""; + } +} + function onItemSelected() { diff --git a/chrome/chromeFiles/content/scholar/selectItemsDialog.xul b/chrome/chromeFiles/content/scholar/selectItemsDialog.xul index a10ffd208..7adcee62d 100644 --- a/chrome/chromeFiles/content/scholar/selectItemsDialog.xul +++ b/chrome/chromeFiles/content/scholar/selectItemsDialog.xul @@ -24,6 +24,13 @@