275 lines
15 KiB
XML
275 lines
15 KiB
XML
<?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"?>
|
|
<?xml-stylesheet href="chrome://zotero-platform-version/content/style.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/xpcom/translate/testTranslators/translatorTester.js"/>
|
|
<script src="translators.js"/>
|
|
<script src="scaffold.js"/>
|
|
|
|
<keyset>
|
|
<key id="run-do-web" modifiers="accel" key="R" oncommand="Scaffold.runTranslatorOrTests()"/>
|
|
<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()"/>
|
|
<key id="increase-font-size" modifiers="accel" key="=" oncommand="Scaffold.increaseFontSize()"/>
|
|
<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()"/>
|
|
<menu label="&scaffold.testing.openUrl;">
|
|
<menupopup>
|
|
<menuitem label="&scaffold.testing.openUrl.internally;" tooltiptext="Open the URL for the current test in the Scaffold browser" oncommand="Scaffold.openURL(false)"/>
|
|
<menuitem label="&scaffold.testing.openUrl.externally;" tooltiptext="Open the URL for the current test in your default browser" oncommand="Scaffold.openURL(true)"/>
|
|
</menupopup>
|
|
</menu>
|
|
</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" onselect="Scaffold.handleTabSelect(event)">
|
|
<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.logTargetRegex()"/>
|
|
</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="chrome://zotero/content/ace/ace.html" 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="chrome://zotero/content/ace/ace.html" id="editor-import" flex="1"/>
|
|
</tabpanel>
|
|
<tabpanel flex="1" id="tabpanel-tests">
|
|
<iframe src="chrome://zotero/content/ace/ace.html" id="editor-tests" flex="1"/>
|
|
</tabpanel>
|
|
<tabpanel flex="1" id="tabpanel-testing">
|
|
<keyset>
|
|
<key id="key-delete-tests" keycode="VK_BACK" oncommand="Scaffold.deleteSelectedTests()"/>
|
|
</keyset>
|
|
|
|
<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>
|
|
|
|
<keyset>
|
|
<key id="key_close" key="W" modifiers="accel" oncommand="window.close()"/>
|
|
</keyset>
|
|
</window>
|