zotero-better-notes/addon/chrome/content/workspace.xul

178 lines
17 KiB
XML

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/standalone.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/overlay.css"?>
<?xml-stylesheet href="chrome://__addonRef__/skin/workspace.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
%globalDTD;
<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd">
%standaloneDTD;
<!ENTITY % editMenuOverlayDTD SYSTEM "chrome://zotero/locale/mozilla/editMenuOverlay.dtd">
%editMenuOverlayDTD;
<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd">
%zoteroDTD;
<!ENTITY % knowledgeDTD SYSTEM "chrome://__addonRef__/locale/overlay.dtd">
%knowledgeDTD;
]>
<window id="zotero-knowledge-workspace" orient="vertical" width="1000" height="350" title="&zotero.__addonRef__.workspace.title;" persist="screenX screenY width height sizemode" windowtype="zotero:knowledgeWorkspace" onload="Zotero.BetterNotes.WorkspaceWindow._workspacePromise.resolve()" 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>
<key id="key_new" key="N" modifiers="accel" command="cmd_new" />
<key id="key_open" key="O" modifiers="accel" command="cmd_open" />
<key id="key_export" key="E" modifiers="accel" command="cmd_export" />
<key id="key_sync_betternotes" key="S" modifiers="accel,shift" command="cmd_sync_betternotes" />
<key id="key_close" key="W" modifiers="accel" command="cmd_close" />
<!-- <key id="key_insertNotes" key="I" modifiers="accel" command="cmd_insertNotes" /> -->
<key id="key_indent" keycode="VK_TAB" command="cmd_indent_betternotes" />
<key id="key_unindent" keycode="VK_TAB" modifiers="shift" command="cmd_unindent_betternotes" />
</keyset>
<command id="cmd_new" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'createWorkspace'});" />
<command id="cmd_open" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'selectMainNote'});" />
<command id="cmd_openWindow" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'openWorkspaceInWindow'});" />
<command id="cmd_export" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'export', content: {editorInstance: {_item: false}}});" />
<command id="cmd_sync_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'sync'});" />
<command id="cmd_sync_manager_betternotes" oncommand="Zotero.BetterNotes.SyncListWindow.openSyncList();" />
<command id="cmd_close" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'closeWorkspace'});" />
<!-- <command id="cmd_insertNotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'insertNotes'});" /> -->
<command id="cmd_editTemplate" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'editTemplate'});" />
<!-- <command id="cmd_importlink_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'importLink'});" />
<command id="cmd_updatelink_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'updateLink'});" /> -->
<command id="cmd_autoannotation_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'updateAutoAnnotation', content: {event: event}});" />
<command id="cmd_convertmd_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'convertMD'});" />
<command id="cmd_convertasciidoc_betternotes" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'convertAsciiDoc'});" />
<command id="cmd_treeview" oncommand="Zotero.BetterNotes.WorkspaceOutline.switchView(1);" />
<command id="cmd_mindmap" oncommand="Zotero.BetterNotes.WorkspaceOutline.switchView(2);" />
<command id="cmd_bubblemap" oncommand="Zotero.BetterNotes.WorkspaceOutline.switchView(3);" />
<command id="cmd_guide" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'openUserGuide'});" />
<command id="cmd_about" oncommand="Zotero.BetterNotes.ZoteroEvents.onEditorEvent({type: 'openAbout'});" />
<!-- Menu -->
<menubar id="better-notes-menu">
<menu id="fileMenu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
<menupopup id="menu_FilePopup">
<menuitem id="menu_new" label="&zotero.__addonRef__.workspace.menu.new;" key="key_new" accesskey="N" command="cmd_new" />
<menuitem id="menu_open" label="&zotero.__addonRef__.workspace.menu.open;" key="key_open" accesskey="O" command="cmd_open" />
<menuitem id="menu_export" label="&zotero.__addonRef__.workspace.menu.export;" key="key_export" accesskey="E" command="cmd_export" />
<menuitem id="menu_sync_betternotes" label="&zotero.__addonRef__.workspace.menu.sync;" key="key_sync_betternotes" accesskey="S" command="cmd_sync_betternotes" />
<menuitem id="menu_sync_manager_betternotes" label="&zotero.__addonRef__.workspace.menu.syncmanager;" command="cmd_sync_manager_betternotes" />
<menuitem id="menu_close" label="&closeCmd.label;" key="key_close" accesskey="&closeCmd.accesskey;" command="cmd_close" />
</menupopup>
</menu>
<menu id="menu_edit" label="&editMenu.label;" accesskey="&editMenu.accesskey;">
<menupopup id="menu_EditPopup">
<!-- <menuitem id="menu_insertNotes" label="&zotero.__addonRef__.workspace.menu.insertNotes;" key="key_insertNotes" accesskey="I" command="cmd_insertNotes" /> -->
<menu id="menu_insertTextTemplate" label="&zotero.__addonRef__.workspace.menu.insertTextTemplate;">
<menupopup id="menu_insertTextTemplatePopup" onpopupshowing="Zotero.BetterNotes.ZoteroViews.updateTemplateMenu(arguments[0], 'Text');" />
</menu>
<menu id="menu_insertItemTemplate" label="&zotero.__addonRef__.workspace.menu.insertItemTemplate;">
<menupopup id="menu_insertItemTemplatePopup" onpopupshowing="Zotero.BetterNotes.ZoteroViews.updateTemplateMenu(arguments[0], 'Item');" />
</menu>
<menuitem id="menu_editTemplate" label="&zotero.__addonRef__.workspace.menu.editTemplate;" command="cmd_editTemplate" />
<menu id="menu_citeSetting_betternotes" class="menu-type-betternotes" label="&zotero.__addonRef__.workspace.menu.citeSetting;">
<menupopup id="menu_citeSettingPopup" onpopupshowing="Zotero.BetterNotes.ZoteroViews.updateCitationStyleMenu();" />
</menu>
<!-- <menuitem id="menu_importlink_betternotes" class="menu-type-betternotes" label="&zotero.__addonRef__.workspace.menu.importLink;" command="cmd_importlink_betternotes" />
<menuitem id="menu_updatelink_betternotes" class="menu-type-betternotes" label="&zotero.__addonRef__.workspace.menu.updateLink;" command="cmd_updatelink_betternotes" /> -->
<menuseparator />
<menuitem id="menu_autoannotation_betternotes" type="checkbox" label="&zotero.__addonRef__.workspace.menu.autoannotation;" command="cmd_autoannotation_betternotes" />
<menuseparator />
<menuitem id="menu_convertmd_betternotes" label="&zotero.__addonRef__.workspace.menu.convertmd;" command="cmd_convertmd_betternotes" />
<menuitem id="menu_convertasciidoc_betternotes" class="menu-betternotes" label="&zotero.__addonRef__.workspace.menu.convertasciidoc;" command="cmd_convertasciidoc_betternotes" />
</menupopup>
</menu>
<menu id="view-menu" label="&viewMenu.label;" accesskey="&viewMenu.accesskey;" onpopupshowing="Zotero.BetterNotes.WorkspaceMenu.updateViewMenu();">
<menupopup id="menu_ViewPopup">
<menuitem id="menu_openWindow" label="&zotero.__addonRef__.workspace.menu.openWindow;" command="cmd_openWindow" />
<menuseparator />
<menuitem id="menu_treeview" type="checkbox" label="&zotero.__addonRef__.workspace.menu.treeview;" command="cmd_treeview" />
<menuitem id="menu_mindmap" type="checkbox" label="&zotero.__addonRef__.workspace.menu.mindmap;" command="cmd_mindmap" />
<menuitem id="menu_bubblemap" type="checkbox" label="&zotero.__addonRef__.workspace.menu.bubblemap;" command="cmd_bubblemap" />
<menuseparator />
<menu id="note-font-size-menu" label="&noteFontSize.label;">
<menupopup oncommand="Zotero.Prefs.set('note.fontSize', event.originalTarget.getAttribute('label'));">
<menuitem label="11" type="checkbox" />
<menuitem label="12" type="checkbox" />
<menuitem label="13" type="checkbox" />
<menuitem label="14" type="checkbox" />
<menuitem label="18" type="checkbox" />
<menuitem label="24" type="checkbox" />
<menuitem label="36" type="checkbox" />
<menuitem label="48" type="checkbox" />
<menuitem label="64" type="checkbox" />
<menuitem label="72" type="checkbox" />
<menuitem label="96" type="checkbox" />
<menuseparator />
<menuitem id="view-menuitem-note-font-size-reset" label="&zotero.general.reset;" oncommand="Zotero.Prefs.clear('note.fontSize');" />
</menupopup>
</menu>
<menuseparator />
<menuitem id="menu_wordcount_betternotes" disabled="true" />
</menupopup>
</menu>
<menu id="helpMenu" label="&helpMenu.label;" accesskey="&helpMenu.accesskey;">
<menupopup id="menu_HelpPopup">
<menuitem id="menu_guide" label="&zotero.__addonRef__.workspace.menu.guide;" command="cmd_guide" />
<menuitem id="menu_about" label="&zotero.__addonRef__.workspace.menu.about;" command="cmd_about" />
</menupopup>
</menu>
</menubar>
<hbox flex="1">
<vbox id="zotero-knowledge-outline" flex="1" width="330" minwidth="300" style="overflow: hidden;">
<html:div id="mindmap-container">
<!-- Inser Here -->
</html:div>
<html:div id="outline-tools" height="50" maxheight="50" minheight="50" style="display: flex; flex-flex-direction: row; justify-content: space-between; margin: 0px 20px 0px 20px;">
<div class="tooltip">
<html:button id="outline-switchview" class="tool-button">
<svg t="1652006549395" class="icon tool-icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14217" width="18" height="18">
<path d="M928 637c-8.8 0-16-7.2-16-16v-77c0-53-43-96-96-96H560c-8.8 0-16-7.2-16-16v-32c0-8.8 7.2-16 16-16h80c53 0 96-43 96-96V144c0-53-43-96-96-96H384c-53 0-96 43-96 96v144c0 53 43 96 96 96h80c8.8 0 16 7.2 16 16v32c0 8.8-7.2 16-16 16H208c-53 0-96 43-96 96v77c0 8.8-7.2 16-16 16-53 0-96 43-96 96v131c0 53 43 96 96 96h96c53 0 96-43 96-96V733c0-53-43-96-96-96-8.8 0-16-7.2-16-16v-77c0-17.7 14.3-32 32-32h256c8.8 0 16 7.2 16 16v94c0 8.3-6.7 15-15 15h-1c-53 0-96 43-96 96v131c0 53 43 96 96 96h96c53 0 96-43 96-96V733c0-53-43-96-96-96h-1c-8.3 0-15-6.7-15-15v-94c0-8.8 7.2-16 16-16h256c17.7 0 32 14.3 32 32v77c0 8.8-7.2 16-16 16-53 0-96 43-96 96v131c0 53 43 96 96 96h96c53 0 96-43 96-96V733c0-53-43-96-96-96z m-736 64c17.6 0 32 14.4 32 32v131c0 17.6-14.4 32-32 32H96c-17.6 0-32-14.4-32-32V733c0-17.6 14.4-32 32-32h96z m368 0c17.6 0 32 14.4 32 32v131c0 17.6-14.4 32-32 32h-96c-17.6 0-32-14.4-32-32V733c0-17.6 14.4-32 32-32h96zM384 320c-17.6 0-32-14.4-32-32V144c0-17.6 14.4-32 32-32h256c17.6 0 32 14.4 32 32v144c0 17.6-14.4 32-32 32H384z m576 544c0 17.6-14.4 32-32 32h-96c-17.6 0-32-14.4-32-32V733c0-17.6 14.4-32 32-32h96c17.6 0 32 14.4 32 32v131z" p-id="14218"></path>
</svg>
</html:button>
<span class="tooltiptext">Switch Outline Mode</span>
</div>
<div>
<div class="tooltip">
<html:button id="outline-saveImage" class="tool-button">
<svg t="1668585252314" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6557" width="18" height="18">
<path d="M828.1 896.7H199.9c-73.2 0-132.8-59.6-132.8-132.8V514.5c0-17.7 14.3-32 32-32s32 14.3 32 32v249.4c0 37.9 30.9 68.8 68.8 68.8h628.2c37.9 0 68.8-30.9 68.8-68.8V514.5c0-17.7 14.3-32 32-32s32 14.3 32 32v249.4c0 73.2-59.6 132.8-132.8 132.8z" p-id="6558"></path>
<path d="M512.4 740.7c-17.7 0-32-14.3-32-32V151.8c0-17.7 14.3-32 32-32s32 14.3 32 32v556.9c0 17.7-14.3 32-32 32z" p-id="6559"></path>
<path d="M518.5 737.4c-8.2 0-16.4-3.1-22.6-9.4-12.5-12.5-12.5-32.8 0-45.3l156.9-156.9c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3L541.1 728c-6.2 6.3-14.4 9.4-22.6 9.4z" p-id="6560"></path>
<path d="M506.2 737.2c-8.2 0-16.4-3.1-22.6-9.4L326.7 570.9c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l156.9 156.9c12.5 12.5 12.5 32.8 0 45.3-6.3 6.3-14.5 9.4-22.7 9.4z" p-id="6561"></path>
</svg>
</html:button>
<span class="tooltiptext">Save As Image</span>
</div>
<div class="tooltip">
<html:button id="outline-saveFreeMind" class="tool-button">
<svg t="1668587671777" class="icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1778" width="18" height="18">
<path d="M903.526 542.788c-11.476-109.267-69.113-209.266-157.91-273.966 1.775-42.203-8.091-85.392-30.916-124.607C651.078 34.909 510.893-2.126 401.587 61.495c-75.837 44.141-116.869 125.136-113.649 207.104-69.606 50.492-123.007 124.277-147.063 213.792a391.809 391.809 0 0 0-11.196 59.809c-37.458 19.563-69.947 49.713-92.506 89.106-62.851 109.751-24.832 249.672 84.919 312.523 76.13 43.597 166.769 38.645 236.139-5.102a391.907 391.907 0 0 0 57.362 20.29c89.516 24.056 180.13 14.833 258.713-20.088 35.68 22.675 78.051 35.746 123.464 35.587 126.472-0.444 228.638-103.331 228.194-229.803-0.31-87.709-49.894-163.714-122.438-201.925zM343.497 234.956c7.264-51.226 37.068-98.744 85.254-126.791 83.531-48.619 190.659-20.317 239.278 63.214 11.79 20.256 19.044 41.901 22.096 63.762a175.057 175.057 0 0 1-2.102 60.33c-9.855 46.729-38.683 89.27-83.209 115.186-83.531 48.619-190.659 20.317-239.278-63.214-9.688-16.645-16.312-34.228-20.063-52.097a174.622 174.622 0 0 1-1.976-60.39z m9.101 640.606a174.59 174.59 0 0 1-51.354 31.888c-47.97 19.273-103.973 17.204-152.318-10.482-83.87-48.03-112.925-154.957-64.894-238.828 11.641-20.328 26.749-37.424 44.142-50.994a175.094 175.094 0 0 1 53.336-28.371c45.394-14.826 96.646-11.13 141.349 14.471 83.871 48.031 112.925 154.957 64.894 238.828-9.586 16.742-21.526 31.292-35.155 43.488z m77.009 31.305a339.803 339.803 0 0 1-24.38-7.545 229.776 229.776 0 0 0 29.388-40.412c62.851-109.751 24.832-249.672-84.919-312.523-51.188-29.314-108.937-36.677-162.371-25.063a339.779 339.779 0 0 1 5.7-24.919c18.21-67.764 55.959-125.048 105.538-167.454a229.77 229.77 0 0 0 20.304 45.656c63.621 109.306 203.806 146.341 313.112 82.72 51.001-29.685 86.26-76.04 102.911-128.148 57.693 49.633 96.988 117.799 111.025 192.597a229.761 229.761 0 0 0-49.756-5.258c-126.472 0.444-228.638 103.331-228.194 229.803 0.207 58.987 22.705 112.68 59.48 153.148-61.556 21.657-130.06 25.612-197.838 7.398z m367.972 13.649c-23.467 0.082-45.866-4.47-66.346-12.777a175.093 175.093 0 0 1-51.198-32.023c-35.495-31.897-57.89-78.104-58.07-129.584-0.34-96.649 77.735-175.274 174.384-175.614 19.296-0.068 37.87 2.998 55.249 8.705a174.572 174.572 0 0 1 53.254 28.504c40.693 31.906 66.915 81.451 67.111 137.175 0.34 96.649-77.735 175.274-174.384 175.614z" p-id="1779"></path>
</svg>
</html:button>
<span class="tooltiptext">Save As FreeMind</span>
</div>
</div>
</html:div>
</vbox>
<splitter id="outline-splitter" collapse="before">
<grippy></grippy>
</splitter>
<zoteronoteeditor id="zotero-note-editor-main" flex="1" width="700" onerror="return;onError()" />
<splitter id="preview-splitter" collapse="after" state="collapsed">
<grippy></grippy>
</splitter>
<zoteronoteeditor id="zotero-note-editor-preview" flex="1" width="500" onerror="return;onError()" />
</hbox>
</window>