- Make DOI label clickable in metadata pane

- Restore hand cursor when hovering over DOI/URL labels (which wasn't working in Fx3.5)
This commit is contained in:
Dan Stillman 2009-05-29 08:43:52 +00:00
parent 388c90dfac
commit 921fa8c0fa
2 changed files with 11 additions and 1 deletions

View file

@ -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(); } "

View file

@ -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