www

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

commit a3eea03a38da31783342da8a1fea3fed70c796b4
parent ddc9989d820700d217ea74b800630f29e4c93056
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 22 May 2017 06:03:14 -0400

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

Diffstat:
Mchrome/content/zotero/bindings/noteeditor.xml | 4++--
Mchrome/content/zotero/bindings/tagsbox.xml | 6+++---
Mchrome/content/zotero/bindings/tagselector.xml | 4++--
Mtest/tests/tagSelectorTest.js | 2+-
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/chrome/content/zotero/bindings/noteeditor.xml b/chrome/content/zotero/bindings/noteeditor.xml @@ -442,7 +442,7 @@ // If editable and no existing tags, open new empty row var tagsBox = this.id('tags'); if (tagsBox.mode == 'edit' && tagsBox.count == 0) { - this.id('tags').new(); + this.id('tags').newTag(); } ]]></body> </method> @@ -573,7 +573,7 @@ tagsbox and tagsLabel above, so be sure to update fixPopup() if it changes --> <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'); }"> <xul:tagsbox id="tags" flex="1" mode="edit"/> </xul:menupopup> diff --git a/chrome/content/zotero/bindings/tagsbox.xml b/chrome/content/zotero/bindings/tagsbox.xml @@ -725,7 +725,7 @@ </method> - <method name="new"> + <method name="newTag"> <body> <![CDATA[ var rowsElement = this.id('tagRows'); @@ -954,7 +954,7 @@ next.click(); } else { - next = this.new(); + next = this.newTag(); next = next.firstChild.nextSibling; } @@ -1056,7 +1056,7 @@ <xul:label id="tagsNum"/> <xul:button id="addButton" label="&zotero.item.add;" onkeypress="return document.getBindingParent(this)._onAddButtonKeypress(event)" - oncommand="document.getBindingParent(this).new();"/> + oncommand="document.getBindingParent(this).newTag();"/> </xul:hbox> <xul:grid> <xul:columns> diff --git a/chrome/content/zotero/bindings/tagselector.xml b/chrome/content/zotero/bindings/tagselector.xml @@ -805,7 +805,7 @@ </method> - <method name="delete"> + <method name="deleteTag"> <parameter name="name"/> <body><![CDATA[ return Zotero.spawn(function* () { @@ -1090,7 +1090,7 @@ <menuitem label="&zotero.tagSelector.renameTag;" oncommand="document.getBindingParent(this).rename(_popupNode.textContent); event.stopPropagation()"/> <menuitem label="&zotero.tagSelector.deleteTag;" - oncommand="document.getBindingParent(this).delete(_popupNode.textContent); event.stopPropagation()"/> + oncommand="document.getBindingParent(this).deleteTag(_popupNode.textContent); event.stopPropagation()"/> </menupopup> <deck id="tags-deck"> diff --git a/test/tests/tagSelectorTest.js b/test/tests/tagSelectorTest.js @@ -363,7 +363,7 @@ describe("Tag Selector", function () { promise = waitForTagSelector(win); var dialogPromise = waitForDialog(); var tagSelector = doc.getElementById('zotero-tag-selector'); - yield tagSelector.delete("A"); + yield tagSelector.deleteTag("A"); yield promise; // Tag selector shouldn't show the deleted item's tag