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 @@
+
+
+
+
+
+
+
true
- *
- * newField - an object representing whether a given field needs to be
- * renamed, in the format fieldIndex => newFieldName
- *
- * regenerate - an object representing whether the contents of a given field
- * need to be modified, in the format:
- * index => [[itemID1, itemID2], ([format1, format2] | "2")]
- * formats are as follows:
- * 1 => first occurance of a given item. use full citation.
- * 2 => item occurred directly previously. use ibid. (never
- * used as an array, only a single item)
- * 3 => subsequent entry.
- */
-
- function _inspectCitationPairs(vars, startIndex, session, style, encounteredItem, newField, regenerate, regenerateAll) {
- var newItemFound = false;
- var encounteredField = new Object();// keep track of field names, to see
- // if there are duplicates
-
- if(!encounteredItem) {
- encounteredItem = new Object();
- }
-
- var lastItemIDString = null;
- var index, field, lastItemID, itemIDs, itemID, itemSetValue;
- for(var i=startIndex; i