diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml index 7070f8ebe..9ab6e3c94 100644 --- a/chrome/content/zotero/bindings/itembox.xml +++ b/chrome/content/zotero/bindings/itembox.xml @@ -628,11 +628,15 @@ typeBox.setAttribute("typeid", typeID); typeBox.setAttribute("popup", "creator-type-menu"); typeBox.setAttribute("fieldname", 'creator-' + this._creatorCount + '-typeID'); - typeBox.className = 'creator-type-label zotero-clicky'; - - var img = document.createElement('image'); - img.setAttribute('src', 'chrome://zotero/skin/arrow-down.gif'); - typeBox.appendChild(img); + if (this.editable) { + typeBox.className = 'creator-type-label zotero-clicky'; + var img = document.createElement('image'); + img.setAttribute('src', 'chrome://zotero/skin/arrow-down.gif'); + typeBox.appendChild(img); + } + else { + typeBox.className = 'creator-type-label'; + } var label = document.createElement("label"); label.setAttribute('value', diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml index ae01e2b80..22ff97bee 100644 --- a/chrome/content/zotero/bindings/tagselector.xml +++ b/chrome/content/zotero/bindings/tagselector.xml @@ -40,6 +40,35 @@ null + + "view" + + + + + + @@ -182,6 +211,7 @@ var empty = true; var tagsToggleBox = this.id('tags-toggle'); + if (fetch || this._dirty) { this._tags = Zotero.Tags.getAll(this._types, this.libraryID); @@ -190,8 +220,6 @@ tagsToggleBox.removeChild(tagsToggleBox.firstChild); } - - var i=0; for (var tagID in this._tags) { // If the last tag was the same, add this tagID and tagType to it @@ -212,10 +240,12 @@ label.setAttribute('value', this._tags[tagID].name); label.setAttribute('tagID', tagID); label.setAttribute('tagType', this._tags[tagID].type); - label.setAttribute('context', 'tag-menu'); - label.setAttribute('ondragover', 'nsDragAndDrop.dragOver(event, this.parentNode.parentNode.parentNode.dragObserver)'); - label.setAttribute('ondragexit', 'nsDragAndDrop.dragExit(event, this.parentNode.parentNode.parentNode.dragObserver)'); - label.setAttribute('ondragdrop', 'nsDragAndDrop.drop(event, this.parentNode.parentNode.parentNode.dragObserver)'); + if (this.editable) { + label.setAttribute('context', 'tag-menu'); + label.setAttribute('ondragover', 'nsDragAndDrop.dragOver(event, this.parentNode.parentNode.parentNode.dragObserver)'); + label.setAttribute('ondragexit', 'nsDragAndDrop.dragExit(event, this.parentNode.parentNode.parentNode.dragObserver)'); + label.setAttribute('ondragdrop', 'nsDragAndDrop.drop(event, this.parentNode.parentNode.parentNode.dragObserver)'); + } tagsToggleBox.appendChild(label); } i++; diff --git a/chrome/content/zotero/overlay.js b/chrome/content/zotero/overlay.js index 3dbd61a4a..5768c1403 100644 --- a/chrome/content/zotero/overlay.js +++ b/chrome/content/zotero/overlay.js @@ -889,6 +889,12 @@ var ZoteroPane = new function() if (!tagSelector.getAttribute('collapsed') || tagSelector.getAttribute('collapsed') == 'false') { Zotero.debug('Updating tag selector with current tags'); + if (itemGroup.isEditable()) { + tagSelector.mode = 'edit'; + } + else { + tagSelector.mode = 'view'; + } tagSelector.libraryID = itemGroup.ref.libraryID; tagSelector.scope = itemGroup.getChildTags(); } diff --git a/chrome/content/zotero/overlay.xul b/chrome/content/zotero/overlay.xul index 44cc3b00f..07a2dd1cd 100644 --- a/chrome/content/zotero/overlay.xul +++ b/chrome/content/zotero/overlay.xul @@ -73,7 +73,6 @@ -