From 701845fa0a8f6de9ad1472711788285e5d751978 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 9 Feb 2011 05:03:40 +0000 Subject: [PATCH] - remove attachment go buttons - tweaks to locate menu behavior for attachments --- .../content/zotero/bindings/attachmentbox.xml | 25 ------------------- chrome/content/zotero/locateMenu.js | 14 +++++++---- chrome/content/zotero/xpcom/locateManager.js | 3 ++- 3 files changed, 11 insertions(+), 31 deletions(-) diff --git a/chrome/content/zotero/bindings/attachmentbox.xml b/chrome/content/zotero/bindings/attachmentbox.xml index 3a4f34071..b95254161 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 @@