www

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

commit 921fa8c0fa5606eb27de43d0fcca12b98479d9fd
parent 388c90dfac1121e04165da935fc3c6d582958dc2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 29 May 2009 08:43:52 +0000

- Make DOI label clickable in metadata pane
- Restore hand cursor when hovering over DOI/URL labels (which wasn't working in Fx3.5)


Diffstat:
Mchrome/content/zotero/bindings/itembox.xml | 10++++++++++
Mchrome/skin/default/zotero/bindings/itembox.css | 2+-
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml @@ -440,6 +440,16 @@ label.setAttribute("onclick", "ZoteroPane.loadURI(this.nextSibling.firstChild ? this.nextSibling.firstChild.nodeValue : this.nextSibling.value, event)"); label.setAttribute("tooltiptext", Zotero.getString('pane.item.goToURL.online.tooltip')); } + else if (fieldName == 'DOI' && val) { + // Pull out DOI, in case there's a prefix + var doi = val.match(/10\..*/); + if (doi) { + doi = "http://dx.doi.org/" + encodeURIComponent(doi); + label.setAttribute("isButton", true); + label.setAttribute("onclick", "ZoteroPane.loadURI('" + doi + "', event)"); + label.setAttribute("tooltiptext", Zotero.getString('pane.item.goToURL.online.tooltip')); + } + } else if (fieldName == 'abstractNote') { label.setAttribute("onclick", "if (this.nextSibling.inputField) { this.nextSibling.inputField.blur(); } " diff --git a/chrome/skin/default/zotero/bindings/itembox.css b/chrome/skin/default/zotero/bindings/itembox.css @@ -50,7 +50,7 @@ row > label:first-child, .creator-type-label row label:first-child[isButton=true]:hover { - cursor: pointer; + cursor: pointer !important; } row label