diff --git a/chrome/content/zotero/bindings/attachmentbox.xml b/chrome/content/zotero/bindings/attachmentbox.xml
index 3a4f340712..b952541611 100644
--- a/chrome/content/zotero/bindings/attachmentbox.xml
+++ b/chrome/content/zotero/bindings/attachmentbox.xml
@@ -42,7 +42,6 @@
Public properties
-->
false
- false
false
false
false
@@ -58,7 +57,6 @@
Zotero.debug("Setting mode to '" + val + "'");
this.editable = false;
- this.displayGoButtons = false;
this.displayURL = false;
this.displayFileName = false;
this.clickableLink = false;
@@ -71,7 +69,6 @@
switch (val) {
case 'view':
- this.displayGoButtons = true;
this.displayURL = true;
this.displayFileName = true;
this.clickableLink = true;
@@ -84,7 +81,6 @@
case 'edit':
this.editable = true;
- this.displayGoButtons = true;
this.displayURL = true;
this.displayFileName = true;
this.clickableLink = true;
@@ -148,9 +144,6 @@
var attachmentBox = document.getAnonymousNodes(this)[0];
var title = this._id('title');
- var goButtons = this._id('go-buttons');
- var viewButton = this._id('view');
- var showButton = this._id('show');
var fileNameRow = this._id('fileNameRow');
var urlField = this._id('url');
var accessed = this._id('accessedRow');
@@ -188,14 +181,6 @@
title.addEventListener('click', this.editTitle, false);
}
- // View and Show buttons
- if (this.displayGoButtons) {
- goButtons.hidden = false;
- }
- else {
- goButtons.hidden = true;
- }
-
var isImportedURL = this.item.attachmentLinkMode ==
Zotero.Attachments.LINK_MODE_IMPORTED_URL;
@@ -210,8 +195,6 @@
var str = Zotero.getString('pane.item.attachments.view.link');
}
- showButton.hidden = !isImportedURL;
-
// URL
if (this.displayURL) {
var urlSpec = this.item.getField('url');
@@ -247,7 +230,6 @@
// Metadata for files
else {
var str = Zotero.getString('pane.item.attachments.view.file');
- showButton.hidden = false;
urlField.hidden = true;
accessed.hidden = true;
}
@@ -271,9 +253,6 @@
else {
fileNameRow.hidden = true;
}
-
-
- viewButton.setAttribute('label', str);
// Page count
if (this.displayPages) {
@@ -531,10 +510,6 @@
-
-
-
-
diff --git a/chrome/content/zotero/locateMenu.js b/chrome/content/zotero/locateMenu.js
index 6e2baea2dc..6954294fc3 100644
--- a/chrome/content/zotero/locateMenu.js
+++ b/chrome/content/zotero/locateMenu.js
@@ -164,11 +164,14 @@ var Zotero_LocateMenu = new function() {
menuitem.addEventListener("command", this.openItemURL, false);
}
- // add library lookup to any item
- var menuitem = _createMenuItem(Zotero.getString("locate.libraryLookup.label"),
- "zotero-locate-service-openurl", Zotero.getString("locate.libraryLookup.tooltip"));
- locateMenu.appendChild(menuitem);
- menuitem.addEventListener("command", this.lookupItem, false);
+ // add library lookup to regular items
+ var regularItems = [item for each(item in selectedItems) if(item.isRegularItem())];
+ if(regularItems.length) {
+ var menuitem = _createMenuItem(Zotero.getString("locate.libraryLookup.label"),
+ "zotero-locate-service-openurl", Zotero.getString("locate.libraryLookup.tooltip"));
+ locateMenu.appendChild(menuitem);
+ menuitem.addEventListener("command", this.lookupItem, false);
+ }
// add wayback if there are real URLs
if(realURLs.length) {
@@ -259,6 +262,7 @@ var Zotero_LocateMenu = new function() {
this.lookupItem = function(event) {
var urls = [];
for each(var item in ZoteroPane.getSelectedItems()) {
+ if(!item.isRegularItem()) continue;
var url = Zotero.OpenURL.resolve(item);
if(url) urls.push(url);
}
diff --git a/chrome/content/zotero/xpcom/locateManager.js b/chrome/content/zotero/xpcom/locateManager.js
index f1257e13ae..3f123fbeb6 100644
--- a/chrome/content/zotero/xpcom/locateManager.js
+++ b/chrome/content/zotero/xpcom/locateManager.js
@@ -293,7 +293,8 @@ Zotero.LocateManager = new function() {
return [encodeURIComponent(val) for each(val in itemOpenURL[OPENURL_CONTEXT_MAPPINGS[param]])];
} else if(ns === "http://www.zotero.org/namespaces/openSearch#") {
if(param === "openURL") {
- return [Zotero.OpenURL.createContextObject(item, "1.0")];
+ var ctx = Zotero.OpenURL.createContextObject(item, "1.0");
+ return (ctx ? [ctx] : false);
} else if(param === "year") {
return (itemOpenURL["rft.date"] ? [itemOpenURL["rft.date"][0].substr(0, 4)] : false);
} else {