diff --git a/chrome/content/zotero-platform/mac/integration.css b/chrome/content/zotero-platform/mac/integration.css
index 34f1a8de4..a8aab911b 100644
--- a/chrome/content/zotero-platform/mac/integration.css
+++ b/chrome/content/zotero-platform/mac/integration.css
@@ -79,4 +79,18 @@ body[multiline="true"] {
#citation-properties menulist > .menulist-dropmarker > .dropmarker-icon {
list-style-image: url("chrome://browser/skin/hud-style-dropmarker-double-arrows.png");
+}
+
+panel button {
+ -moz-appearance: none; color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.5); border-radius: 12px; border: 1px solid rgba(0,0,0,.65); background: -moz-linear-gradient(rgba(110,110,110,.9), rgba(70,70,70,.9) 49%, rgba(50,50,50,.9) 51%, rgba(40,40,40,.9)); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), inset 0 0 1px rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); background-clip: padding-box; background-origin: padding-box; padding: 2px 9px;
+ margin: 6px;
+ min-height: 22px;
+}
+
+panel button:hover:active {
+ background: -moz-linear-gradient(rgba(40,40,40,.9), rgba(70,70,70,.9)); box-shadow: inset 0 0 3px rgba(0,0,0,.2), inset 0 1px 7px rgba(0,0,0,.4), 0 1px 0 rgba(255,255,255,.1);
+}
+
+panel button:-moz-focusring {
+ box-shadow: 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 2px 1px -moz-mac-focusring;
}
\ No newline at end of file
diff --git a/chrome/content/zotero/integration/quickFormat.js b/chrome/content/zotero/integration/quickFormat.js
index 1474459f3..3cadabf41 100644
--- a/chrome/content/zotero/integration/quickFormat.js
+++ b/chrome/content/zotero/integration/quickFormat.js
@@ -36,7 +36,7 @@ var Zotero_QuickFormat = new function () {
keepSorted, showEditor, referencePanel, referenceBox, referenceHeight = 0,
separatorHeight = 0, currentLocator, currentLocatorLabel, currentSearchTime, dragging,
panel, panelPrefix, panelSuffix, panelSuppressAuthor, panelLocatorLabel, panelLocator,
- panelInfo, panelRefersToBubble, panelFrameHeight = 0, accepted = false;
+ panelLibraryLink, panelInfo, panelRefersToBubble, panelFrameHeight = 0, accepted = false;
// A variable that contains the timeout object for the latest onKeyPress event
var eventTimeout = null;
@@ -912,12 +912,12 @@ var Zotero_QuickFormat = new function () {
while(panelInfo.hasChildNodes()) panelInfo.removeChild(panelInfo.firstChild);
_buildItemDescription(item, panelInfo);
- var libraryName = item.libraryID ? Zotero.Libraries.getName(item.libraryID)
- : Zotero.getString('pane.collections.library');
- var libraryLink = document.getElementById("citation-properties-library-link");
- //TODO: Localize "Open in "
- libraryLink.textContent ="Open in "+libraryName;
- libraryLink.onclick=function() {window.open('zotero://select/item/'+(item.libraryID ? item.libraryID : 0)+'_'+item.key)};
+ panelLibraryLink.hidden = !item.id;
+ if(item.id) {
+ var libraryName = item.libraryID ? Zotero.Libraries.getName(item.libraryID)
+ : Zotero.getString('pane.collections.library');
+ panelLibraryLink.textContent = Zotero.getString("integration.openInLibrary", libraryName);
+ }
target.setAttribute("selected", "true");
panel.openPopup(target, "after_start",
@@ -1190,6 +1190,23 @@ var Zotero_QuickFormat = new function () {
accepted = true;
}
+ /**
+ * Show an item in the library it came from
+ */
+ this.showInLibrary = function() {
+ var id = panelRefersToBubble.citationItem.id;
+ var pane = Zotero.getActiveZoteroPane();
+ if(pane) {
+ pane.show();
+ pane.selectItem(id);
+ } else {
+ var win = window.open('zotero://select/item/'+id);
+ }
+
+ // Pull window to foreground
+ Zotero.Integration.activate(pane.document.defaultView);
+ }
+
/**
* Resizes windows
* @constructor
diff --git a/chrome/content/zotero/integration/quickFormat.xul b/chrome/content/zotero/integration/quickFormat.xul
index c94e9a7a4..e9935e6b4 100644
--- a/chrome/content/zotero/integration/quickFormat.xul
+++ b/chrome/content/zotero/integration/quickFormat.xul
@@ -78,7 +78,6 @@
-
@@ -113,6 +112,9 @@
+
+
+
diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js
index a3d91a434..b7fa48c23 100644
--- a/chrome/content/zotero/xpcom/integration.js
+++ b/chrome/content/zotero/xpcom/integration.js
@@ -286,6 +286,7 @@ Zotero.Integration = new function() {
if(win) {
Components.utils.import("resource://gre/modules/ctypes.jsm");
+ win.focus();
if(!_carbon) {
_carbon = ctypes.open("/System/Library/Frameworks/Carbon.framework/Carbon");
diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties
index 4675a3388..b50e75090 100644
--- a/chrome/locale/en-US/zotero/zotero.properties
+++ b/chrome/locale/en-US/zotero/zotero.properties
@@ -589,6 +589,7 @@ integration.cited.loading = Loading Cited Items…
integration.ibid = ibid
integration.emptyCitationWarning.title = Blank Citation
integration.emptyCitationWarning.body = The citation you have specified would be empty in the currently selected style. Are you sure you want to add it?
+integration.openInLibrary = Open in %S
integration.error.incompatibleVersion = This version of the Zotero word processor plugin ($INTEGRATION_VERSION) is incompatible with the currently installed version of Zotero (%1$S). Please ensure you are using the latest versions of both components.
integration.error.incompatibleVersion2 = Zotero %1$S requires %2$S %3$S or later. Please download the latest version of %2$S from zotero.org.
diff --git a/chrome/skin/default/zotero/integration.css b/chrome/skin/default/zotero/integration.css
index cdf3c8c8b..fbe18965c 100644
--- a/chrome/skin/default/zotero/integration.css
+++ b/chrome/skin/default/zotero/integration.css
@@ -231,4 +231,8 @@ richlistitem[selected="true"] {
#citation-properties-info {
margin-bottom: 3px;
-}
\ No newline at end of file
+}
+
+panel button .button-text {
+ margin: 0 !important;
+}