<?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 SYSTEM "chrome://zotero/locale/preferences.dtd">
<dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	title="" buttons="cancel,accept"
	id="zotero-quickCopySiteEditor"
	onload="sizeToContent();"
	ondialogaccept="Zotero_QuickCopySiteEditor.onAccept();">
	
	<script src="chrome://zotero/content/include.js"/>
	<script src="preferences.js"/>
	
	<script>
	<![CDATA[
		var Zotero_Preferences = window.opener.Zotero_Preferences;
		
		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.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"/>
		<checkbox id="zotero-quickCopy-copyAsHTML" label="&zotero.preferences.quickCopy.copyAsHTML;"
			oncommand="Zotero_Preferences.Export.buildQuickCopyFormatDropDown(
				document.getElementById('zotero-quickCopy-menu'), this.checked ? 'html' : ''
			)"/>
	</vbox>
	
	<script>
	<![CDATA[
		var io = window.arguments[0];
		document.getElementById('zotero-quickCopy-domain').value = io.domain ? io.domain : '';
		Zotero_Preferences.Export.buildQuickCopyFormatDropDown(
			document.getElementById('zotero-quickCopy-menu'),
			Zotero.QuickCopy.getContentType(io.format),
			io.format
		);
		Zotero_Preferences.Export.updateQuickCopyHTMLCheckbox(document);
	]]>
	</script>
</dialog>
