From ec6f894e1abeffe7731e28a19815bf57c23ffb61 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Tue, 12 Jul 2011 01:38:17 +0000 Subject: [PATCH] Addresses #1805, Add "Create Item from Current Page" contextual menu item and/or browser button Adds "Create New Item from Current Page" context menu option. We can add a toolbar button too if we can come up with an icon for it. --- chrome/content/zotero/zoteroPane.js | 6 ------ chrome/content/zotero/zoteroPane.xul | 6 +++++- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 1218cb8f5..31d6ca817 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -2677,7 +2677,6 @@ var ZoteroPane = new function() } var menuitem = document.getElementById("zotero-context-add-to-current-note"); - var showing = false; if (menuitem){ var items = ZoteroPane_Local.getSelectedItems(); if (ZoteroPane_Local.itemsView.selection && ZoteroPane_Local.itemsView.selection.count==1 @@ -2685,7 +2684,6 @@ var ZoteroPane = new function() && window.gContextMenu.isTextSelected) { menuitem.hidden = false; - showing = true; } else { @@ -2698,7 +2696,6 @@ var ZoteroPane = new function() if (window.gContextMenu.isTextSelected) { menuitem.hidden = false; - showing = true; } else { @@ -2710,7 +2707,6 @@ var ZoteroPane = new function() if (menuitem) { if (window.gContextMenu.onLink) { menuitem.hidden = false; - showing = true; } else { menuitem.hidden = true; @@ -2723,7 +2719,6 @@ var ZoteroPane = new function() // they can use the Firefox option to view and then import from there if (window.gContextMenu.onImage) { menuitem.hidden = false; - showing = true; } else { menuitem.hidden = true; @@ -2732,7 +2727,6 @@ var ZoteroPane = new function() // If Zotero is locked or library is read-only, disable menu items var menu = document.getElementById('zotero-content-area-context-menu'); - menu.hidden = !showing; var disabled = Zotero.locked; if (!disabled && self.collectionsView.selection && self.collectionsView.selection.count) { var itemGroup = self.collectionsView._getItemAtRow(self.collectionsView.selection.currentIndex); diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul index 5da23649c..0c28ac25d 100644 --- a/chrome/content/zotero/zoteroPane.xul +++ b/chrome/content/zotero/zoteroPane.xul @@ -58,11 +58,15 @@ + + - +