Firefox 54 compatibility: rename "new" and "delete" XBL methods
This commit is contained in:
parent
ddc9989d82
commit
a3eea03a38
4 changed files with 8 additions and 8 deletions
|
@ -442,7 +442,7 @@
|
||||||
// If editable and no existing tags, open new empty row
|
// If editable and no existing tags, open new empty row
|
||||||
var tagsBox = this.id('tags');
|
var tagsBox = this.id('tags');
|
||||||
if (tagsBox.mode == 'edit' && tagsBox.count == 0) {
|
if (tagsBox.mode == 'edit' && tagsBox.count == 0) {
|
||||||
this.id('tags').new();
|
this.id('tags').newTag();
|
||||||
}
|
}
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
@ -573,7 +573,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>
|
||||||
|
|
|
@ -725,7 +725,7 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
|
||||||
<method name="new">
|
<method name="newTag">
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
var rowsElement = this.id('tagRows');
|
var rowsElement = this.id('tagRows');
|
||||||
|
@ -954,7 +954,7 @@
|
||||||
next.click();
|
next.click();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
next = this.new();
|
next = this.newTag();
|
||||||
next = next.firstChild.nextSibling;
|
next = next.firstChild.nextSibling;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1056,7 +1056,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>
|
||||||
|
|
|
@ -805,7 +805,7 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
|
||||||
<method name="delete">
|
<method name="deleteTag">
|
||||||
<parameter name="name"/>
|
<parameter name="name"/>
|
||||||
<body><![CDATA[
|
<body><![CDATA[
|
||||||
return Zotero.spawn(function* () {
|
return Zotero.spawn(function* () {
|
||||||
|
@ -1090,7 +1090,7 @@
|
||||||
<menuitem label="&zotero.tagSelector.renameTag;"
|
<menuitem label="&zotero.tagSelector.renameTag;"
|
||||||
oncommand="document.getBindingParent(this).rename(_popupNode.textContent); event.stopPropagation()"/>
|
oncommand="document.getBindingParent(this).rename(_popupNode.textContent); event.stopPropagation()"/>
|
||||||
<menuitem label="&zotero.tagSelector.deleteTag;"
|
<menuitem label="&zotero.tagSelector.deleteTag;"
|
||||||
oncommand="document.getBindingParent(this).delete(_popupNode.textContent); event.stopPropagation()"/>
|
oncommand="document.getBindingParent(this).deleteTag(_popupNode.textContent); event.stopPropagation()"/>
|
||||||
</menupopup>
|
</menupopup>
|
||||||
|
|
||||||
<deck id="tags-deck">
|
<deck id="tags-deck">
|
||||||
|
|
|
@ -363,7 +363,7 @@ describe("Tag Selector", function () {
|
||||||
promise = waitForTagSelector(win);
|
promise = waitForTagSelector(win);
|
||||||
var dialogPromise = waitForDialog();
|
var dialogPromise = waitForDialog();
|
||||||
var tagSelector = doc.getElementById('zotero-tag-selector');
|
var tagSelector = doc.getElementById('zotero-tag-selector');
|
||||||
yield tagSelector.delete("A");
|
yield tagSelector.deleteTag("A");
|
||||||
yield promise;
|
yield promise;
|
||||||
|
|
||||||
// Tag selector shouldn't show the deleted item's tag
|
// Tag selector shouldn't show the deleted item's tag
|
||||||
|
|
Loading…
Add table
Reference in a new issue