www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 41ba29180d8ee3786aabe5995a0793ceefe68483
parent f0badddaf18ade0f319c5c2561f07ac35c763da9
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 31 Aug 2006 22:14:13 +0000

Don't disable "View Attachment" button for links, and change the text to "View File" or "View Link" depending on what's selected


Diffstat:
Mchrome/chromeFiles/content/scholar/overlay.js | 11++++++++++-
Mchrome/chromeFiles/content/scholar/overlay.xul | 2+-
Mchrome/chromeFiles/locale/en-US/scholar/scholar.properties | 2++
3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/chrome/chromeFiles/content/scholar/overlay.js b/chrome/chromeFiles/content/scholar/overlay.js @@ -228,7 +228,16 @@ var ScholarPane = new function() else if(item.isAttachment()) { document.getElementById('scholar-attachment-label').setAttribute('value',item.getField('title')); - document.getElementById('scholar-attachment-view').setAttribute('disabled', item.ref.getAttachmentLinkMode() == Scholar.Attachments.LINK_MODE_LINKED_URL); + if (item.ref.getAttachmentLinkMode() == Scholar.Attachments.LINK_MODE_LINKED_URL + || item.ref.getAttachmentLinkMode() == Scholar.Attachments.LINK_MODE_IMPORTED_URL) + { + var str = Scholar.getString('pane.item.attachments.view.link'); + } + else + { + var str = Scholar.getString('pane.item.attachments.view.file'); + } + document.getElementById('scholar-attachment-view').setAttribute('label', str); document.getElementById('scholar-attachment-links').item = item.ref; document.getElementById('item-pane').selectedIndex = 3; } diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul @@ -189,7 +189,7 @@ </vbox> <vbox id="scholar-view-attachment" flex="1"> <label id="scholar-attachment-label"/> - <button id="scholar-attachment-view" label="View Attachment" oncommand="ScholarPane.viewSelectedAttachment();"/> + <button id="scholar-attachment-view" oncommand="ScholarPane.viewSelectedAttachment();"/> <linksbox id="scholar-attachment-links" flex="1"/> </vbox> </deck> diff --git a/chrome/chromeFiles/locale/en-US/scholar/scholar.properties b/chrome/chromeFiles/locale/en-US/scholar/scholar.properties @@ -26,6 +26,8 @@ pane.item.notes.untitled = Untitled Note pane.item.notes.delete.confirm = Are you sure you want to delete this note? pane.item.notes.count.singular = %1 note pane.item.notes.count.plural = %1 notes +pane.item.attachments.view.link = View Page +pane.item.attachments.view.file = View File pane.item.attachments.delete.confirm = Are you sure you want to delete this attachment? pane.item.attachments.count.singular = %1 attachment pane.item.attachments.count.plural = %1 attachments