fx-compat: Use html-tooltip everywhere
And convert tooltiptext attributes on item box HTML elements to titles.
This commit is contained in:
parent
812511e31b
commit
d018133e9b
2 changed files with 8 additions and 7 deletions
|
@ -562,7 +562,7 @@
|
|||
th.classList.add("pointer");
|
||||
// TODO: make getFieldValue non-private and use below instead
|
||||
th.addEventListener('click', () => Zotero.launchURL(th.nextSibling.firstChild.value || th.nextSibling.firstChild.textContent));
|
||||
th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
th.setAttribute('title', Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
}
|
||||
else if (fieldName == 'DOI' && val && typeof val == 'string') {
|
||||
// Pull out DOI, in case there's a prefix
|
||||
|
@ -577,7 +577,7 @@
|
|||
.replace(/"/g, '%22');
|
||||
th.classList.add("pointer");
|
||||
th.addEventListener('click', event => ZoteroPane_Local.loadURI(doi, event));
|
||||
th.setAttribute("tooltiptext", Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
th.setAttribute('title', Zotero.getString('pane.item.viewOnline.tooltip'));
|
||||
valueElement.oncontextmenu = (event) => {
|
||||
this._id('zotero-doi-menu').openPopupAtScreen(
|
||||
event.screenX + 1,
|
||||
|
@ -1043,7 +1043,7 @@
|
|||
// Switch to single-field mode
|
||||
if (fieldMode == 1) {
|
||||
button.style.background = `url("chrome://zotero/skin/textfield-dual${Zotero.hiDPISuffix}.png") center/21px auto no-repeat`;
|
||||
button.setAttribute('tooltiptext', Zotero.getString('pane.item.switchFieldMode.two'));
|
||||
button.setAttribute('title', Zotero.getString('pane.item.switchFieldMode.two'));
|
||||
lastName.setAttribute('fieldMode', '1');
|
||||
button.setAttribute('onclick', "this.getRootNode().host.switchCreatorMode(this.closest('tr'), 0, false, true)");
|
||||
lastName.setAttribute('flex', '1');
|
||||
|
@ -1083,7 +1083,7 @@
|
|||
// Switch to two-field mode
|
||||
else {
|
||||
button.style.background = `url("chrome://zotero/skin/textfield-single${Zotero.hiDPISuffix}.png") center/21px auto no-repeat`;
|
||||
button.setAttribute('tooltiptext', Zotero.getString('pane.item.switchFieldMode.one'));
|
||||
button.setAttribute('title', Zotero.getString('pane.item.switchFieldMode.one'));
|
||||
lastName.setAttribute('fieldMode', '0');
|
||||
button.setAttribute('onclick', "this.getRootNode().host.switchCreatorMode(this.closest('tr'), 1, false, true)");
|
||||
lastName.setAttribute('flex', '0');
|
||||
|
@ -1403,7 +1403,7 @@
|
|||
// Display the SQL date as a tooltip for date fields
|
||||
// TEMP - filingDate
|
||||
if (Zotero.ItemFields.isFieldOfBase(fieldID, 'date') || fieldName == 'filingDate') {
|
||||
valueElement.setAttribute('tooltiptext',
|
||||
valueElement.setAttribute('title',
|
||||
Zotero.Date.multipartToSQL(this.item.getField(fieldName, true)));
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@
|
|||
width="1000" height="600"
|
||||
persist="screenX screenY width height sizemode"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
style="display: flex;">
|
||||
style="display: flex;"
|
||||
tooltip="html-tooltip">
|
||||
|
||||
|
||||
<html:link rel="localization" href="branding/brand.ftl"/>
|
||||
|
@ -844,7 +845,7 @@
|
|||
oncommand="ZoteroPane_Local.search()"/>
|
||||
</hbox>
|
||||
|
||||
<hbox id="zotero-item-toolbar" flex="1" align="center" tooltip="html-tooltip">
|
||||
<hbox id="zotero-item-toolbar" flex="1" align="center">
|
||||
<hbox align="center" pack="start" flex="1">
|
||||
<toolbarbutton
|
||||
is="menu-toolbarbutton"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue