diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index d5eeb1c79..f4ac8be92 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -1118,6 +1118,55 @@ var ZoteroPane = new function() } + this.updateNoteButtonMenu = function () { + var items = ZoteroPane.getSelectedItems(); + var button = document.getElementById('zotero-tb-add-child-note'); + button.disabled = this.canEdit() && !(items.length == 1 + && (items[0].isRegularItem() || !items[0].isTopLevelItem())); + } + + + this.updateAttachmentButtonMenu = function (popup) { + var items = ZoteroPane.getSelectedItems(); + + var disabled = !this.canEdit() || !(items.length == 1 && items[0].isRegularItem()); + + if (disabled) { + for each(var node in popup.childNodes) { + node.disabled = true; + } + return; + } + + var itemgroup = this.collectionsView._getItemAtRow(this.collectionsView.selection.currentIndex); + var canEditFiles = this.canEditFiles(); + + var prefix = "menuitem-iconic zotero-menuitem-attachments-"; + + for (var i=0; i - - - - - + + + + + @@ -222,7 +222,21 @@ - + + + + + + + + + + + + + + + diff --git a/chrome/skin/default/zotero/attach.png b/chrome/skin/default/zotero/attach.png new file mode 100644 index 000000000..ea897cc9f Binary files /dev/null and b/chrome/skin/default/zotero/attach.png differ diff --git a/chrome/skin/default/zotero/overlay.css b/chrome/skin/default/zotero/overlay.css index dbf37c107..4b2963c98 100644 --- a/chrome/skin/default/zotero/overlay.css +++ b/chrome/skin/default/zotero/overlay.css @@ -140,6 +140,7 @@ list-style-image: url('chrome://zotero/skin/toolbar-item-from-page.png'); } +/* #zotero-tb-link-page { list-style-image: url('chrome://zotero/skin/toolbar-link-add.png'); @@ -149,6 +150,12 @@ { list-style-image: url('chrome://zotero/skin/toolbar-snapshot-add.png'); } +*/ + +#zotero-tb-attachment-add +{ + list-style-image: url('chrome://zotero/skin/attach.png'); +} #zotero-tb-note-add { @@ -160,22 +167,22 @@ list-style-image: url('chrome://zotero/skin/treeitem-note.png'); } -#zotero-menuitem-attachments-file +.zotero-menuitem-attachments-file { list-style-image: url('chrome://zotero/skin/treeitem-attachment-file.png'); } -#zotero-menuitem-attachments-link +.zotero-menuitem-attachments-link { list-style-image: url('chrome://zotero/skin/treeitem-attachment-link.png'); } -#zotero-menuitem-attachments-snapshot +.zotero-menuitem-attachments-snapshot { list-style-image: url('chrome://zotero/skin/treeitem-attachment-snapshot.png'); } -#zotero-menuitem-attachments-web-link +.zotero-menuitem-attachments-web-link { list-style-image: url('chrome://zotero/skin/treeitem-attachment-web-link.png'); }