99dd1c0697
Since modal windows (e.g., the Create Bib window and the Quick Copy site editor window) can't use yield, style retrieval (Zotero.Styles.getVisible()/getAll()) is now synchronous, depending on a previous async Zotero.Styles.init(). The translator list is generated in the prefs window and passed into the Quick Copy site editor, but it's possible the translators API should be changed to make getTranslators() synchronous with a prior init() as well.
114 lines
3.9 KiB
XML
114 lines
3.9 KiB
XML
<?xml version="1.0"?>
|
|
<!--
|
|
***** BEGIN LICENSE BLOCK *****
|
|
|
|
Copyright © 2007 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://zotero/skin/preferences.css"?>
|
|
|
|
|
|
<!DOCTYPE window [
|
|
<!ENTITY % prefWindow SYSTEM "chrome://zotero/locale/preferences.dtd">
|
|
%prefWindow;
|
|
<!ENTITY % common SYSTEM "chrome://zotero/locale/zotero.dtd">
|
|
%common;
|
|
]>
|
|
|
|
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
title="" buttons="cancel,accept"
|
|
id="zotero-quickCopySiteEditor"
|
|
onload="Zotero_Preferences.Export.updateQuickCopyUI(); sizeToContent()"
|
|
ondialogaccept="Zotero_QuickCopySiteEditor.onAccept();">
|
|
|
|
<script src="chrome://zotero/content/include.js"/>
|
|
<script src="preferences.js"/>
|
|
<script src="preferences_export.js"/>
|
|
|
|
<script>
|
|
<![CDATA[
|
|
var Zotero_QuickCopySiteEditor = new function () {
|
|
this.onAccept = onAccept;
|
|
|
|
function onAccept() {
|
|
var io = window.arguments[0];
|
|
io.domain = document.getElementById('zotero-quickCopy-domain').value;
|
|
io.format = document.getElementById('zotero-quickCopy-menu').value;
|
|
|
|
io.locale = '';
|
|
if (!document.getElementById('zotero-quickCopy-locale-menu').disabled) {
|
|
io.locale = document.getElementById('zotero-quickCopy-locale-menu').value;
|
|
}
|
|
|
|
io.ok = true;
|
|
}
|
|
}
|
|
]]>
|
|
</script>
|
|
|
|
<vbox id="zotero-preferences-quickCopySiteEditor">
|
|
<label value="&zotero.preferences.quickCopy.siteEditor.domainPath; &zotero.preferences.quickCopy.siteEditor.domainPath.example;" control="zotero-quickCopy-domain"/>
|
|
<textbox id="zotero-quickCopy-domain"/>
|
|
|
|
<separator class="thin"/>
|
|
|
|
<label value="&zotero.preferences.quickCopy.siteEditor.outputFormat;" control="zotero-quickCopy-menu"/>
|
|
<menulist id="zotero-quickCopy-menu"/>
|
|
|
|
<separator class="thin"/>
|
|
|
|
<label id="zotero-quickCopy-locale-menu-label" value="&zotero.preferences.quickCopy.siteEditor.locale;" control="zotero-quickCopy-locale-menu"/>
|
|
<hbox align="center">
|
|
<menulist id="zotero-quickCopy-locale-menu" oncommand="Zotero_Preferences.Export._lastSelectedLocale = this.value"/>
|
|
</hbox>
|
|
|
|
<separator class="thin"/>
|
|
|
|
<checkbox id="zotero-quickCopy-copyAsHTML" label="&zotero.preferences.quickCopy.copyAsHTML;"
|
|
oncommand="Zotero_Preferences.Export.buildQuickCopyFormatDropDown(
|
|
document.getElementById('zotero-quickCopy-menu'),
|
|
this.checked ? 'html' : '',
|
|
null,
|
|
io.translators
|
|
)"/>
|
|
</vbox>
|
|
|
|
<script>
|
|
<![CDATA[
|
|
var io = window.arguments[0];
|
|
var contentType = io.asHTML ? 'html' : '';
|
|
document.getElementById('zotero-quickCopy-domain').value = io.domain ? io.domain : '';
|
|
Zotero_Preferences.Export.buildQuickCopyFormatDropDown(
|
|
document.getElementById('zotero-quickCopy-menu'),
|
|
contentType,
|
|
io.format,
|
|
io.translators
|
|
);
|
|
Zotero.Styles.populateLocaleList(
|
|
document.getElementById('zotero-quickCopy-locale-menu')
|
|
);
|
|
document.getElementById('zotero-quickCopy-copyAsHTML').checked = io.asHTML;
|
|
Zotero_Preferences.Export._lastSelectedLocale = io.locale;
|
|
]]>
|
|
</script>
|
|
</dialog>
|