fix: #169 template editor bug

This commit is contained in:
xiangyu 2022-10-09 07:56:04 +08:00
parent 732e79005b
commit 5644eb56e9

View File

@ -16,7 +16,7 @@
%knowledgeDTD;
]>
<window id="zotero-knowledge-template-editor" onload="Zotero.Knowledge4Zotero.template.initTemplates(window);" orient="vertical" width="600" height="350" title="&zotero.__addonRef__.template.title;" persist="screenX screenY width height" windowtype="zotero:knowledgeTemplateEditor" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<window id="zotero-knowledge-template-editor" onload="Zotero.Knowledge4Zotero.TemplateWindow.initTemplates(window);" orient="vertical" width="600" height="350" title="&zotero.__addonRef__.template.title;" persist="screenX screenY width height" windowtype="zotero:knowledgeTemplateEditor" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml">
<script src="chrome://zotero/content/include.js" />
<keyset>
@ -24,14 +24,14 @@
<key id="key_help" key="H" modifiers="accel" command="cmd_help" />
<key id="key_close" key="W" modifiers="accel" command="cmd_close" />
</keyset>
<command id="cmd_save" oncommand="Zotero.Knowledge4Zotero.template.saveSelectedTemplate();" />
<command id="cmd_save" oncommand="Zotero.Knowledge4Zotero.TemplateWindow.saveSelectedTemplate();" />
<command id="cmd_help" oncommand="Zotero.launchURL('https://github.com/windingwind/zotero-better-notes/blob/master/Template.md');" />
<command id="cmd_more" oncommand="Zotero.launchURL('https://github.com/windingwind/zotero-better-notes/issues/85');" />
<command id="cmd_close" oncommand="window.close();" />
<hbox flex="1">
<vbox id="template-container" flex="1" minwidth="400px">
<listbox id="template-list" flex="1" seltype="single" onselect="Zotero.Knowledge4Zotero.template.updateEditorView();">
<listbox id="template-list" flex="1" seltype="single" onselect="Zotero.Knowledge4Zotero.TemplateWindow.updateEditorView();">
<listhead>
<listheader id="name" label="&zotero.__addonRef__.template.list.label;" flex="1" />
</listhead>
@ -40,8 +40,8 @@
</listcols>
</listbox>
<row style="margin: 10px 0 10px 0;">
<button id="create-template" label="&zotero.__addonRef__.template.create.label;" oncommand="Zotero.Knowledge4Zotero.template.createTemplate();"></button>
<button id="import-template" label="&zotero.__addonRef__.template.import.label;" oncommand="Zotero.Knowledge4Zotero.template.importNoteTemplate();"></button>
<button id="create-template" label="&zotero.__addonRef__.template.create.label;" oncommand="Zotero.Knowledge4Zotero.TemplateWindow.createTemplate();"></button>
<button id="import-template" label="&zotero.__addonRef__.template.import.label;" oncommand="Zotero.Knowledge4Zotero.TemplateWindow.importNoteTemplate();"></button>
<button id="help" label="&helpMenu.label;" command="cmd_help" key="key_help" accesskey="H"></button>
<button id="more" label="&zotero.__addonRef__.template.more.label;" command="cmd_more"></button>
</row>
@ -57,8 +57,8 @@
</row>
<row style="margin: 10px 0 10px 0;">
<button id="save-template" label="&zotero.__addonRef__.template.save.label;" command="cmd_save" key="key_save" accesskey="S"></button>
<button id="delete-template" label="&zotero.__addonRef__.template.delete.label;" oncommand="Zotero.Knowledge4Zotero.template.deleteSelectedTemplate();"></button>
<button id="reset-template" label="&zotero.__addonRef__.template.reset.label;" oncommand="Zotero.Knowledge4Zotero.template.resetSelectedTemplate();" hidden="hidden"></button>
<button id="delete-template" label="&zotero.__addonRef__.template.delete.label;" oncommand="Zotero.Knowledge4Zotero.TemplateWindow.deleteSelectedTemplate();"></button>
<button id="reset-template" label="&zotero.__addonRef__.template.reset.label;" oncommand="Zotero.Knowledge4Zotero.TemplateWindow.resetSelectedTemplate();" hidden="hidden"></button>
</row>
</rows>
</hbox>