diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
index 478f70a83..48d2c42c6 100644
--- a/chrome/content/zotero/zoteroPane.js
+++ b/chrome/content/zotero/zoteroPane.js
@@ -406,6 +406,7 @@ var ZoteroPane = new function()
_madeVisible = true;
this.unserializePersist();
+ this.updateCollectionLookupToolbarButton();
this.updateLayout();
this.updateToolbarPosition();
this.updateTagSelectorSize();
@@ -947,6 +948,17 @@ var ZoteroPane = new function()
return collection.saveTx();
});
+ this.showCollectionLookup = Zotero.Promise.coroutine(function* (parentKey) {
+ var collectionsLookupTextbox = document.getElementById('zotero-collection-lookup-textbox');
+ collectionsLookupTextbox.hidden = !collectionsLookupTextbox.hidden;
+ this.updateCollectionLookupToolbarButton();
+ });
+ this.updateCollectionLookupToolbarButton = function () {
+ var collectionsLookupTextbox = document.getElementById('zotero-collection-lookup-textbox');
+ var toolbarButton = document.getElementById('zotero-tb-show-collection-lookup');
+ toolbarButton.checked = !collectionsLookupTextbox.hidden;
+ };
+
this.importFeedsFromOPML = Zotero.Promise.coroutine(function* (event) {
var nsIFilePicker = Components.interfaces.nsIFilePicker;
while (true) {
@@ -2445,6 +2457,10 @@ var ZoteroPane = new function()
id: "newCollection",
command: "cmd_zotero_newCollection"
},
+ {
+ id: "showCollectionLookup",
+ command: "cmd_zotero_showCollectionLookup"
+ },
{
id: "newSavedSearch",
command: "cmd_zotero_newSavedSearch"
@@ -4947,6 +4963,9 @@ var ZoteroPane = new function()
var serializedValues = Zotero.Prefs.get("pane.persist");
if(!serializedValues) return;
serializedValues = JSON.parse(serializedValues);
+ if (!serializedValues["zotero-collection-lookup-textbox"]) {
+ serializedValues["zotero-collection-lookup-textbox"] = { hidden: true }; // hidden by default.
+ }
for(var id in serializedValues) {
var el = document.getElementById(id);
if(!el) return;
diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul
index e56d860dc..a090b9b1f 100644
--- a/chrome/content/zotero/zoteroPane.xul
+++ b/chrome/content/zotero/zoteroPane.xul
@@ -62,6 +62,7 @@
+
@@ -285,6 +286,7 @@
+
@@ -344,7 +346,8 @@
-