2019-08-02 10:09:36 +00:00
<?xml version="1.0"?>
<!--
***** BEGIN LICENSE BLOCK *****
Copyright © 2011 Center for History and New Media
George Mason University, Fairfax, Virginia, USA
http://zotero.org
This file is part of Zotero.
Zotero is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Zotero is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with Zotero. If not, see <http://www.gnu.org/licenses/>.
***** END LICENSE BLOCK *****
-->
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://scaffold/skin/scaffold.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/overlay.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://scaffold/locale/scaffold.dtd">
<window id="scaffold" width="600" height="600" minheight="600" persist="screenX screenY width height"
title="Scaffold"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="chrome://zotero/content/include.js"/>
<script src="chrome://zotero/content/tools/testTranslators/translatorTester.js"/>
<script src="translators.js"/>
<script src="scaffold.js"/>
<keyset>
<key id="run-do-web" modifiers="accel" key="R" oncommand="Scaffold.run('do')"/>
<key id="detect-web" modifiers="accel" key="T" oncommand="Scaffold.run('detect')"/>
<key id="save" modifiers="accel" key="S" oncommand="Scaffold.save()"/>
<key id="increase-font-size" modifiers="accel" key="+" oncommand="Scaffold.increaseFontSize()"/>
2019-08-07 05:03:13 +00:00
<key id="increase-font-size" modifiers="accel" key="=" oncommand="Scaffold.increaseFontSize()"/>
2019-08-02 10:09:36 +00:00
<key id="decrease-font-size" modifiers="accel" key="-" oncommand="Scaffold.decreaseFontSize()"/>
<key id="restore-font-size" modifiers="accel" key="0" oncommand="Scaffold.setFontSize(11)"/>
</keyset>
<popupset>
<menupopup id="testing-context-menue">
<menuitem label="&scaffold.testing.edit.import;" tooltiptext="Edit the input data for the current test" oncommand="Scaffold.editImportFromTest()"/>
<menuitem label="&scaffold.testing.copyToClipboard;" tooltiptext="Copy the URL or data for the current test to the clipboard" oncommand="Scaffold.copyToClipboard()"/>
<menuitem label="&scaffold.testing.openUrl;" tooltiptext="Open the URL for the current test in the browser" oncommand="Scaffold.openURL()"/>
</menupopup>
</popupset>
<vbox flex="1" id="scaffold-pane">
<menubar id="mb">
<menu id="mb-help" label="&scaffold.menu.help;">
<menupopup id="mb-help-popup">
<menuitem id="mb-help-types" label="&scaffold.toolbar.template.itemTypes.label;" oncommand="Scaffold.addTemplate('templateAllTypes')"/>
<menu id="mb-help-fields" label="&scaffold.toolbar.template.newItem.label;">
<menupopup id="mb-help-fields-popup">
<menuitem id="mb-help-fields-book" label="book" oncommand="Scaffold.addTemplate('templateNewItem', 'book')"/>
<menuitem id="mb-help-fields-booksection" label="bookSection" oncommand="Scaffold.addTemplate('templateNewItem', 'bookSection')"/>
<menuitem id="mb-help-fields-conferencepaper" label="conferencePaper" oncommand="Scaffold.addTemplate('templateNewItem', 'conferencePaper')"/>
<menuitem id="mb-help-fields-journalarticle" label="journalArticle" oncommand="Scaffold.addTemplate('templateNewItem', 'journalArticle')"/>
<menuitem id="mb-help-fields-magazinearticle" label="magazineArticle" oncommand="Scaffold.addTemplate('templateNewItem', 'magazineArticle')"/>
<menuitem id="mb-help-fields-newspaperarticle" label="newspaperArticle" oncommand="Scaffold.addTemplate('templateNewItem', 'newspaperArticle')"/>
<menu id="mb-help-fields-more" label="&scaffold.toolbar.template.more.label;">
<menupopup id="mb-help-fields-more-popup">
<!-- This will be filled on load with all other item types -->
</menupopup>
</menu>
</menupopup>
</menu>
<menuitem id="mb-help-shortcuts" label="&scaffold.toolbar.help.shortcuts;" oncommand="Scaffold.addTemplate('shortcuts')"/>
</menupopup>
</menu>
</menubar>
<toolbar id="tb" align="center">
<toolbarbutton id="tb-load" tooltiptext="&scaffold.toolbar.load.label;" oncommand="Scaffold.load()" />
<toolbarbutton id="tb-save" tooltiptext="&scaffold.toolbar.save.label;" oncommand="Scaffold.save()" />
<toolbarbutton id="tb-saveToZotero" tooltiptext="&scaffold.toolbar.saveToZotero.label;" oncommand="Scaffold.save(true)" />
<toolbarseparator/>
<toolbarbutton id="tb-detectWeb" tooltiptext="&scaffold.toolbar.detectWeb.label;" oncommand="Scaffold.run('detectWeb')" />
<toolbarbutton id="tb-doWeb" tooltiptext="&scaffold.toolbar.doWeb.label;" oncommand="Scaffold.run('doWeb')" />
<toolbarseparator/>
<toolbarbutton id="tb-detectImport" tooltiptext="&scaffold.toolbar.detectImport.label;" oncommand="Scaffold.run('detectImport')" />
<toolbarbutton id="tb-doImport" tooltiptext="&scaffold.toolbar.doImport.label;" oncommand="Scaffold.run('doImport')" />
<toolbarseparator/>
<toolbarbutton id="tb-setTranslatorsDir" tooltiptext="&scaffold.toolbar.setTranslatorsDir.label;" oncommand="Scaffold.promptForTranslatorsDirectory()" />
</toolbar>
<hbox flex="1">
<tabbox id="left-tabbox" flex="1" width="300">
<tabs id="tabs">
<tab id="tab-metadata" label="&scaffold.tabs.metadata.label;"/>
<tab id="tab-code" label="&scaffold.tabs.code.label;"/>
<tab id="tab-import" label="&scaffold.tabs.import.label;"/>
<tab id="tab-tests" label="&scaffold.tabs.tests.label;"/>
<tab id="tab-testing" label="&scaffold.tabs.testing.label;"/>
<tab id="tab-browser" label="Browser"/>
</tabs>
<tabpanels flex="1">
<tabpanel flex="1" id="tabpanel-metadata">
<vbox flex="1">
<hbox>
<label class="label-metadata" value="&scaffold.metadata.translatorID.label;" control="textbox-translatorID"/>
<textbox id="textbox-translatorID" flex="1"/>
<button label="&scaffold.metadata.translatorID.generate;" oncommand="Scaffold.generateTranslatorID()"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.label.label;" control="textbox-label"/>
<textbox id="textbox-label" flex="1" value="&scaffold.metadata.label.default;"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.creator.label;" control="textbox-creator"/>
<textbox id="textbox-creator" flex="1"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.target.label;" control="textbox-target"/>
<textbox id="textbox-target" flex="1"/>
<button label="&scaffold.metadata.target.testRegex;" oncommand="Scaffold.testTargetRegex()"/>
</hbox>
<hbox style="display:none">
<label class="label-metadata" value="&scaffold.metadata.targetAll.label;" control="textbox-target-all"/>
<textbox id="textbox-target-all" flex="1"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.configOptions.label;" control="textbox-configOptions"/>
<textbox id="textbox-configOptions" flex="1"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.displayOptions.label;" control="textbox-displayOptions"/>
<textbox id="textbox-displayOptions" flex="1"/>
</hbox>
<hbox>
<label class="label-metadata" value="&scaffold.metadata.minVersion.label;" control="textbox-minVersion"/>
<textbox id="textbox-minVersion" flex="1" value="3.0"/>
<label class="label-metadata" value="&scaffold.metadata.maxVersion.label;" control="textbox-maxVersion"/>
<textbox id="textbox-maxVersion" flex="1"/>
<label class="label-metadata" value="&scaffold.metadata.priority.label;" control="textbox-priority"/>
<textbox id="textbox-priority" flex="1" value="&scaffold.metadata.priority.default;"/>
</hbox>
<hbox style="display:none">
<label class="label-metadata" value="&scaffold.metadata.hiddenPrefs.label;" control="textbox-hidden-prefs"/>
<textbox id="textbox-hidden-prefs" flex="1"/>
</hbox>
<grid flex="1">
<columns>
<column flex="2"/>
<column flex="1"/>
</columns>
<rows><row><groupbox>
<caption label="&scaffold.metadata.translatorType.label;"/>
<checkbox id="checkbox-import" label="&scaffold.metadata.translatorType.import;"/>
<checkbox id="checkbox-export" label="&scaffold.metadata.translatorType.export;"/>
<checkbox id="checkbox-web" label="&scaffold.metadata.translatorType.web;" checked="true"/>
<checkbox id="checkbox-search" label="&scaffold.metadata.translatorType.search;"/>
</groupbox>
<groupbox>
<caption label="&scaffold.metadata.browserSupport.label;"/>
<checkbox id="checkbox-gecko" label="&scaffold.metadata.browserSupport.gecko;" checked="true"/>
<checkbox id="checkbox-chrome" label="&scaffold.metadata.browserSupport.chrome;" checked="true"/>
<checkbox id="checkbox-safari" label="&scaffold.metadata.browserSupport.safari;" checked="true"/>
<checkbox id="checkbox-ie" label="&scaffold.metadata.browserSupport.ie;" checked="true"/>
<checkbox id="checkbox-bookmarklet" label="&scaffold.metadata.browserSupport.bookmarklet;" checked="true"/>
<checkbox id="checkbox-server" label="&scaffold.metadata.browserSupport.server;" checked="true"/>
</groupbox></row></rows>
</grid>
</vbox>
</tabpanel>
<tabpanel flex="1" id="tabpanel-code">
<vbox flex="1">
<hbox id="editor-toolbar" align="center">
<toolbarbutton id="tb-template" tooltiptext="&scaffold.toolbar.template.label;" type="menu">
<menupopup id="tb-template-popup">
<menuitem id="tb-template-new-web-add" label="&scaffold.toolbar.template.newWeb.label;" oncommand="Scaffold.addTemplate('newWeb')"/>
<menu id="tb-template-scrape-add" label="&scaffold.toolbar.template.scrape.label;">
<menupopup id="tb-template-scrape-popup">
<menuitem id="tb-template-scrape-em" label="Embedded Metadata" oncommand="Scaffold.addTemplate('scrapeEM')"/>
<menuitem id="tb-template-scrape-ris" label="RIS" oncommand="Scaffold.addTemplate('scrapeRIS')"/>
<menuitem id="tb-template-scrape-bibtex" label="BibTeX" oncommand="Scaffold.addTemplate('scrapeBibTeX')"/>
<menuitem id="tb-template-scrape-marc" label="MARC" oncommand="Scaffold.addTemplate('scrapeMARC')"/>
</menupopup>
</menu>
</menupopup>
</toolbarbutton>
</hbox>
<iframe src="data:text/html,%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.1//EN%22%20%22http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Chead%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/ace.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/mode-javascript.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/aceWrapper.js%22%3E%3C/script%3E%3C/head%3E%3Cbody%20id=%22body%22%3E%3C/body%3E%3C/html%3E" id="editor-code" flex="1"/>
<hbox id="editor-external-box" align="center">
<checkbox id="checkbox-editor-external"/>
<label class="label-metadata" value="&scaffold.editor.external.label;" control="checkbox-editor-external"/>
</hbox>
</vbox>
</tabpanel>
<tabpanel flex="1" id="tabpanel-import">
<iframe src="data:text/html,%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.1//EN%22%20%22http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Chead%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/ace.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/mode-javascript.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/aceWrapper.js%22%3E%3C/script%3E%3C/head%3E%3Cbody%20id=%22body%22%3E%3C/body%3E%3C/html%3E" id="editor-import" flex="1"/>
</tabpanel>
<tabpanel flex="1" id="tabpanel-tests">
<iframe src="data:text/html,%3C!DOCTYPE%20html%20PUBLIC%20%22-//W3C//DTD%20XHTML%201.1//EN%22%20%22http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd%22%3E%3Chtml%20xmlns=%22http://www.w3.org/1999/xhtml%22%3E%3Chead%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/ace.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/ace/mode-javascript.js%22%3E%3C/script%3E%3Cscript%20type=%22text/javascript%22%20src=%22chrome://scaffold/content/aceWrapper.js%22%3E%3C/script%3E%3C/head%3E%3Cbody%20id=%22body%22%3E%3C/body%3E%3C/html%3E" id="editor-tests" flex="1"/>
</tabpanel>
<tabpanel flex="1" id="tabpanel-testing">
<vbox flex="1"><hbox><description>&scaffold.testing.description;</description></hbox>
<hbox flex="1" context="testing-context-menue">
<listbox id="testing-listbox" flex="1" seltype="multiple">
<listhead>
<listheader label="&scaffold.testing.input.label;"/>
<listheader label="&scaffold.testing.status.label;"/>
</listhead>
<listcols>
<listcol flex="1"/>
<listcol/>
</listcols>
</listbox>
</hbox>
<hbox>
<button label="&scaffold.testing.populate;" tooltiptext="Load test definitions from the current translator" oncommand="Scaffold.populateTests()"/>
<button label="&scaffold.testing.save;" tooltiptext="Save the above test definitions into the current translator, and save the translator" oncommand="Scaffold.saveTests()"/>
<button label="&scaffold.testing.delete;" tooltiptext="Delete the selected tests" oncommand="Scaffold.deleteSelectedTests()"/>
<button label="&scaffold.testing.run;" tooltiptext="Run the selected tests" oncommand="Scaffold.runSelectedTests()"/>
</hbox>
<hbox>
<button label="&scaffold.testing.update;" tooltiptext="Update a test to match current item" oncommand="Scaffold.updateSelectedTests()"/>
<button label="&scaffold.testing.new;" tooltiptext="Create a new test from the current page" oncommand="Scaffold.newTestFromCurrent('web')" />
<button label="&scaffold.testing.new.import;" tooltiptext="Create a new test from the current import" oncommand="Scaffold.newTestFromCurrent('import')" />
</hbox>
</vbox>
</tabpanel>
<tabpanel>
<vbox flex="1">
<hbox align="center">
<label control="textbox-tabUrl" value="&scaffold.tabUrl.label;"/>
<menulist id="browser-url" editable="true" flex="1">
<menupopup></menupopup>
</menulist>
</hbox>
<browser src="about:blank" type="content" flex="1"></browser>
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
<splitter resizeafter="farthest" oncommand="Scaffold.onResize();" />
<vbox id="right-pane" flex="1">
<hbox id="hbox-testFrame" width="300">
<label control="menulist-testFrame" id="label-testFrame" value="&scaffold.testFrame.label;"/>
<menulist id="menulist-testFrame"/>
</hbox>
<textbox flex="1" id="output" multiline="true" readonly="true"/>
</vbox>
</hbox>
</vbox>
</window>