Firefox 54 compatibility: rename "new" and "delete" XBL methods

This commit is contained in:
Dan Stillman 2017-05-22 06:03:14 -04:00
parent 9f43934934
commit 4bdef6d24a
3 changed files with 6 additions and 6 deletions

View File

@ -530,7 +530,7 @@
tagsbox and tagsLabel above, so be sure to update fixPopup() if it changes tagsbox and tagsLabel above, so be sure to update fixPopup() if it changes
--> -->
<xul:menupopup id="tagsPopup" ignorekeys="true" <xul:menupopup id="tagsPopup" ignorekeys="true"
onpopupshown="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ /* DEBUG: it would be nice to make this work -- if (this.firstChild.count==0){ this.firstChild.new(); } */ this.setAttribute('showing', 'true'); }" onpopupshown="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ /* DEBUG: it would be nice to make this work -- if (this.firstChild.count==0){ this.firstChild.newTag(); } */ this.setAttribute('showing', 'true'); }"
onpopuphidden="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ this.setAttribute('showing', 'false'); }"> onpopuphidden="if (!document.commandDispatcher.focusedElement || document.commandDispatcher.focusedElement.tagName=='xul:label'){ this.setAttribute('showing', 'false'); }">
<xul:tagsbox id="tags" flex="1" mode="edit"/> <xul:tagsbox id="tags" flex="1" mode="edit"/>
</xul:menupopup> </xul:menupopup>

View File

@ -726,7 +726,7 @@
</method> </method>
<method name="new"> <method name="newTag">
<body> <body>
<![CDATA[ <![CDATA[
var row = this.addDynamicRow(); var row = this.addDynamicRow();
@ -967,7 +967,7 @@
next.click(); next.click();
} }
else { else {
next = this.new(); next = this.newTag();
next = next.firstChild.nextSibling; next = next.firstChild.nextSibling;
} }
@ -1072,7 +1072,7 @@
<xul:label id="tagsNum"/> <xul:label id="tagsNum"/>
<xul:button id="addButton" label="&zotero.item.add;" <xul:button id="addButton" label="&zotero.item.add;"
onkeypress="return document.getBindingParent(this)._onAddButtonKeypress(event)" onkeypress="return document.getBindingParent(this)._onAddButtonKeypress(event)"
oncommand="document.getBindingParent(this).new();"/> oncommand="document.getBindingParent(this).newTag();"/>
</xul:hbox> </xul:hbox>
<xul:grid> <xul:grid>
<xul:columns> <xul:columns>

View File

@ -772,7 +772,7 @@
</method> </method>
<method name="delete"> <method name="deleteTag">
<parameter name="name"/> <parameter name="name"/>
<body> <body>
<![CDATA[ <![CDATA[
@ -1002,7 +1002,7 @@
<menuitem label="&zotero.tagSelector.renameTag;" <menuitem label="&zotero.tagSelector.renameTag;"
oncommand="document.getBindingParent(this).rename(document.popupNode.getAttribute('value')); event.stopPropagation()"/> oncommand="document.getBindingParent(this).rename(document.popupNode.getAttribute('value')); event.stopPropagation()"/>
<menuitem label="&zotero.tagSelector.deleteTag;" <menuitem label="&zotero.tagSelector.deleteTag;"
oncommand="document.getBindingParent(this).delete(document.popupNode.getAttribute('value')); event.stopPropagation()"/> oncommand="document.getBindingParent(this).deleteTag(document.popupNode.getAttribute('value')); event.stopPropagation()"/>
</menupopup> </menupopup>
<vbox id="no-tags-box" align="center" pack="center" flex="1"> <vbox id="no-tags-box" align="center" pack="center" flex="1">