commit 84b87b64556dff127639675296c37363300bd470 parent 4f9d39614b057a8880f3d5e74d672203bcd33925 Author: Dan Stillman <dstillman@zotero.org> Date: Mon, 10 Aug 2009 00:58:01 +0000 - Don't display browser content context menu submenu if empty - Disable submenu options if in read-only mode Diffstat:
| M | chrome/content/zotero/overlay.js | | | 10 | ++++++++-- |
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js @@ -2222,10 +2222,16 @@ var ZoteroPane = new function() } } - // If Zotero is locked, disable menu items + // 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); + disabled = !itemGroup.isEditable() + } for each(var menuitem in menu.firstChild.childNodes) { - menuitem.disabled = Zotero.locked; + menuitem.disabled = disabled; } }