Add "Remove All Tags…" option to item tags box context menu
This commit is contained in:
parent
918ae23418
commit
ba514b80d9
3 changed files with 30 additions and 1 deletions
|
@ -858,6 +858,16 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
|
||||||
|
<method name="removeAll">
|
||||||
|
<body><![CDATA[
|
||||||
|
if (Services.prompt.confirm(null, "", Zotero.getString('pane.item.tags.removeAll'))) {
|
||||||
|
this.item.setTags([]);
|
||||||
|
this.item.saveTx();
|
||||||
|
}
|
||||||
|
]]></body>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
|
||||||
<method name="updateCount">
|
<method name="updateCount">
|
||||||
<parameter name="count"/>
|
<parameter name="count"/>
|
||||||
<body>
|
<body>
|
||||||
|
@ -984,6 +994,14 @@
|
||||||
</method>
|
</method>
|
||||||
|
|
||||||
|
|
||||||
|
<method name="_onBackgroundContextMenuShowing">
|
||||||
|
<body><![CDATA[
|
||||||
|
var removeAllTags = this.id('remove-all-item-tags');
|
||||||
|
removeAllTags.disabled = this.count == 0;
|
||||||
|
]]></body>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
|
||||||
<!-- unused -->
|
<!-- unused -->
|
||||||
<method name="getTagIndex">
|
<method name="getTagIndex">
|
||||||
<parameter name="id"/>
|
<parameter name="id"/>
|
||||||
|
@ -1051,7 +1069,15 @@
|
||||||
</method>
|
</method>
|
||||||
</implementation>
|
</implementation>
|
||||||
<content>
|
<content>
|
||||||
<xul:scrollbox xbl:inherits="flex" orient="vertical" style="overflow:auto" class="zotero-box">
|
<xul:scrollbox xbl:inherits="flex" orient="vertical" style="overflow:auto" class="zotero-box"
|
||||||
|
context="tags-context-menu">
|
||||||
|
<xul:popupset>
|
||||||
|
<xul:menupopup id="tags-context-menu"
|
||||||
|
onpopupshowing="document.getBindingParent(this)._onBackgroundContextMenuShowing()">
|
||||||
|
<xul:menuitem id="remove-all-item-tags" label="&zotero.item.tags.removeAll;"
|
||||||
|
oncommand="document.getBindingParent(this).removeAll()"/>
|
||||||
|
</xul:menupopup>
|
||||||
|
</xul:popupset>
|
||||||
<xul:hbox align="center">
|
<xul:hbox align="center">
|
||||||
<xul:label id="tagsNum"/>
|
<xul:label id="tagsNum"/>
|
||||||
<xul:button id="addButton" label="&zotero.item.add;"
|
<xul:button id="addButton" label="&zotero.item.add;"
|
||||||
|
|
|
@ -143,6 +143,8 @@
|
||||||
<!ENTITY zotero.item.copyAsURL "Copy as URL">
|
<!ENTITY zotero.item.copyAsURL "Copy as URL">
|
||||||
<!ENTITY zotero.item.deletePermanently "Delete Permanently…">
|
<!ENTITY zotero.item.deletePermanently "Delete Permanently…">
|
||||||
|
|
||||||
|
<!ENTITY zotero.item.tags.removeAll "Remove All Tags…">
|
||||||
|
|
||||||
<!ENTITY zotero.toolbar.newNote "New Note">
|
<!ENTITY zotero.toolbar.newNote "New Note">
|
||||||
<!ENTITY zotero.toolbar.note.standalone "New Standalone Note">
|
<!ENTITY zotero.toolbar.note.standalone "New Standalone Note">
|
||||||
<!ENTITY zotero.toolbar.note.child "Add Child Note">
|
<!ENTITY zotero.toolbar.note.child "Add Child Note">
|
||||||
|
|
|
@ -354,6 +354,7 @@ pane.item.tags.count.singular = %S tag:
|
||||||
pane.item.tags.count.plural = %S tags:
|
pane.item.tags.count.plural = %S tags:
|
||||||
pane.item.tags.icon.user = User-added tag
|
pane.item.tags.icon.user = User-added tag
|
||||||
pane.item.tags.icon.automatic = Automatically added tag
|
pane.item.tags.icon.automatic = Automatically added tag
|
||||||
|
pane.item.tags.removeAll = Remove all tags from this item?
|
||||||
pane.item.related.count.zero = %S related:
|
pane.item.related.count.zero = %S related:
|
||||||
pane.item.related.count.singular = %S related:
|
pane.item.related.count.singular = %S related:
|
||||||
pane.item.related.count.plural = %S related:
|
pane.item.related.count.plural = %S related:
|
||||||
|
|
Loading…
Add table
Reference in a new issue