diff --git a/chrome/content/zotero-platform/mac/overlay.css b/chrome/content/zotero-platform/mac/overlay.css
index a3fa35a425..3ae40e851f 100644
--- a/chrome/content/zotero-platform/mac/overlay.css
+++ b/chrome/content/zotero-platform/mac/overlay.css
@@ -69,24 +69,6 @@
display: none;
}
-.zotero-tb-button[type="menu"] > .toolbarbutton-icon {
- -moz-padding-end: 4px;
-}
-
-.zotero-tb-button[type="menu"] > .toolbarbutton-menu-dropmarker {
- list-style-image: url("chrome://zotero/skin/mac/folderDropArrow.png");
- padding: 0;
-}
-
-/* This property controls the strength of the SVG outer glow mask on the toolbar buttons */
-.zotero-tb-button > .toolbarbutton-icon > stack > .zotero-tb-glow {
- opacity: .7;
-}
-
-#zotero-tb-attachment-add > .toolbarbutton-icon > stack > .zotero-tb-glow {
- display: none;
-}
-
#zotero-tb-sync > .toolbarbutton-icon {
-moz-binding: none !important;
padding: 2px 0px 2px 8px !important;
diff --git a/chrome/content/zotero/lookup.js b/chrome/content/zotero/lookup.js
index 5165244214..418e0f4bdb 100644
--- a/chrome/content/zotero/lookup.js
+++ b/chrome/content/zotero/lookup.js
@@ -1,9 +1,9 @@
/*
***** BEGIN LICENSE BLOCK *****
- Copyright © 2009 Center for History and New Media
- George Mason University, Fairfax, Virginia, USA
- http://zotero.org
+ Copyright © 2009-2011 Center for History and New Media
+ George Mason University, Fairfax, Virginia, USA
+ http://zotero.org
This file is part of Zotero.
@@ -23,12 +23,23 @@
***** END LICENSE BLOCK *****
*/
-
+/**
+ * Handles UI for lookup panel
+ * @namespace
+ */
const Zotero_Lookup = new function () {
+ /**
+ * Performs a lookup by DOI, PMID, or ISBN
+ */
this.accept = function() {
- document.getElementById("progress").setAttribute("status", "animate");
- document.getElementById("accept-button").disabled = true;
- var identifier = document.getElementById("lookup-textbox").value;
+ var progressElement = document.getElementById("zotero-lookup-progress");
+ progressElement.setAttribute("status", "animate");
+
+ var acceptElement = document.getElementById("zotero-lookup-accept-button");
+ acceptElement.disabled = true;
+
+ var identifierElement = document.getElementById("zotero-lookup-textbox");
+ var identifier = identifierElement.value;
var doi = Zotero.Utilities.cleanDOI(identifier);
if(doi) {
@@ -54,10 +65,11 @@ const Zotero_Lookup = new function () {
translate.setHandler("done", function(translate, success) {
if(success) {
- window.close();
+ document.getElementById("zotero-lookup-panel").hidePopup();
} else {
- document.getElementById("accept-button").disabled = undefined;
- document.getElementById("progress").setAttribute("status", "error");
+ acceptElement.disabled = undefined;
+ progressElement.removeAttribute("status");
+
var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
prompts.alert(window, Zotero.getString("lookup.failure.title"),
@@ -78,4 +90,24 @@ const Zotero_Lookup = new function () {
translate.translate(libraryID);
return false;
}
+
+ /**
+ * Focuses the field
+ */
+ this.onShowing = function() {
+ if(!Zotero.isFx4) {
+ document.getElementById("zotero-lookup-panel").style.padding = "10px";
+ }
+ document.getElementById("zotero-lookup-textbox").focus();
+ }
+
+ /**
+ * Cancels the popup and resets fields
+ */
+ this.onHidden = function() {
+ var progressElement = document.getElementById("zotero-lookup-progress");
+ if(progressElement.hasAttribute("status")) progressElement.removeAttribute("status");
+ document.getElementById("zotero-lookup-accept-button").disabled = undefined;
+ document.getElementById("zotero-lookup-textbox").value = "";
+ }
}
diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul
index d38a7eb221..2d17a8d241 100644
--- a/chrome/content/zotero/zoteroPane.xul
+++ b/chrome/content/zotero/zoteroPane.xul
@@ -31,6 +31,7 @@
%globalDTD;
%zoteroDTD;
+ %dialogOverlayDTD;
]>
-
+
+
@@ -138,7 +140,25 @@
-
+
+
+
+ &zotero.lookup.description;
+
+
+
+
+
+
+
+
+
+
diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css
index 6b0a3d7d9f..b893677073 100644
--- a/chrome/skin/default/zotero/overlay.css
+++ b/chrome/skin/default/zotero/overlay.css
@@ -253,6 +253,10 @@
height:24px;
}
+.zotero-tb-button[type="panel"] > dropmarker {
+ display: none;
+}
+
#zotero-tb-collection-add
{
list-style-image: url('chrome://zotero/skin/toolbar-collection-add.png');