From 41ba29180d8ee3786aabe5995a0793ceefe68483 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 31 Aug 2006 22:14:13 +0000 Subject: [PATCH] Don't disable "View Attachment" button for links, and change the text to "View File" or "View Link" depending on what's selected --- chrome/chromeFiles/content/scholar/overlay.js | 11 ++++++++++- chrome/chromeFiles/content/scholar/overlay.xul | 2 +- .../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 index f514af8510..2c4111fdee 100644 --- 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 index aa280c41ba..e7776fcfc9 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -189,7 +189,7 @@