Don't disable "View Attachment" button for links, and change the text to "View File" or "View Link" depending on what's selected
This commit is contained in:
parent
f0badddaf1
commit
41ba29180d
3 changed files with 13 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue