- 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:
parent
388c90dfac
commit
921fa8c0fa
2 changed files with 11 additions and 1 deletions
|
@ -440,6 +440,16 @@
|
||||||
label.setAttribute("onclick", "ZoteroPane.loadURI(this.nextSibling.firstChild ? this.nextSibling.firstChild.nodeValue : this.nextSibling.value, event)");
|
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'));
|
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') {
|
else if (fieldName == 'abstractNote') {
|
||||||
label.setAttribute("onclick",
|
label.setAttribute("onclick",
|
||||||
"if (this.nextSibling.inputField) { this.nextSibling.inputField.blur(); } "
|
"if (this.nextSibling.inputField) { this.nextSibling.inputField.blur(); } "
|
||||||
|
|
|
@ -50,7 +50,7 @@ row > label:first-child, .creator-type-label
|
||||||
|
|
||||||
row label:first-child[isButton=true]:hover
|
row label:first-child[isButton=true]:hover
|
||||||
{
|
{
|
||||||
cursor: pointer;
|
cursor: pointer !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
row label
|
row label
|
||||||
|
|
Loading…
Reference in a new issue