quickCopySiteEditor.xul (4253B)
1 <?xml version="1.0"?> 2 <!-- 3 ***** BEGIN LICENSE BLOCK ***** 4 5 Copyright © 2007 Center for History and New Media 6 George Mason University, Fairfax, Virginia, USA 7 http://zotero.org 8 9 This file is part of Zotero. 10 11 Zotero is free software: you can redistribute it and/or modify 12 it under the terms of the GNU Affero General Public License as published by 13 the Free Software Foundation, either version 3 of the License, or 14 (at your option) any later version. 15 16 Zotero is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 GNU Affero General Public License for more details. 20 21 You should have received a copy of the GNU Affero General Public License 22 along with Zotero. If not, see <http://www.gnu.org/licenses/>. 23 24 ***** END LICENSE BLOCK ***** 25 --> 26 27 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> 28 <?xml-stylesheet href="chrome://zotero/skin/preferences.css"?> 29 30 31 <!DOCTYPE window [ 32 <!ENTITY % prefWindow SYSTEM "chrome://zotero/locale/preferences.dtd"> 33 %prefWindow; 34 <!ENTITY % common SYSTEM "chrome://zotero/locale/zotero.dtd"> 35 %common; 36 ]> 37 38 <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" 39 title="" buttons="cancel,accept" 40 id="zotero-quickCopySiteEditor" 41 onload="Zotero_Preferences.Export.updateQuickCopyUI(); sizeToContent()" 42 ondialogaccept="Zotero_QuickCopySiteEditor.onAccept();"> 43 44 <script src="chrome://zotero/content/include.js"/> 45 <script src="preferences.js"/> 46 <script src="preferences_export.js"/> 47 48 <vbox id="zotero-preferences-quickCopySiteEditor"> 49 <label value="&zotero.preferences.quickCopy.siteEditor.domainPath; &zotero.preferences.quickCopy.siteEditor.domainPath.example;" control="zotero-quickCopy-domain"/> 50 <textbox id="zotero-quickCopy-domain" oninput="Zotero_QuickCopySiteEditor.onDomainInput(event)"/> 51 52 <separator class="thin"/> 53 54 <label value="&zotero.preferences.quickCopy.siteEditor.format;" control="zotero-quickCopy-menu"/> 55 <menulist id="zotero-quickCopy-menu"/> 56 57 <separator class="thin"/> 58 59 <label id="zotero-quickCopy-locale-menu-label" value="&zotero.preferences.quickCopy.siteEditor.locale;" control="zotero-quickCopy-locale-menu"/> 60 <hbox align="center"> 61 <menulist id="zotero-quickCopy-locale-menu" oncommand="Zotero_Preferences.Export._lastSelectedLocale = this.value"/> 62 </hbox> 63 64 <separator class="thin"/> 65 66 <checkbox id="zotero-quickCopy-copyAsHTML" label="&zotero.preferences.quickCopy.copyAsHTML;" 67 oncommand="Zotero_Preferences.Export.buildQuickCopyFormatDropDown( 68 document.getElementById('zotero-quickCopy-menu'), 69 this.checked ? 'html' : '', 70 null, 71 io.translators 72 )"/> 73 </vbox> 74 75 <script> 76 <![CDATA[ 77 var Zotero_QuickCopySiteEditor = new function () { 78 var menu = document.getElementById('zotero-quickCopy-menu'); 79 80 this.onAccept = function () { 81 var io = window.arguments[0]; 82 io.domain = document.getElementById('zotero-quickCopy-domain').value; 83 io.format = menu.value; 84 85 io.locale = ''; 86 if (!document.getElementById('zotero-quickCopy-locale-menu').disabled) { 87 io.locale = document.getElementById('zotero-quickCopy-locale-menu').value; 88 } 89 90 io.ok = true; 91 } 92 93 this.onDomainInput = function (event) { 94 if (event.target.value == 'wikipedia.org') { 95 Zotero.debug("SETTING TO WIKI"); 96 menu.value = 'export=3f50aaac-7acc-4350-acd0-59cb77faf620'; 97 Zotero_Preferences.Export.updateQuickCopyUI(); 98 } 99 }; 100 } 101 102 var io = window.arguments[0]; 103 var contentType = io.asHTML ? 'html' : ''; 104 document.getElementById('zotero-quickCopy-domain').value = io.domain ? io.domain : ''; 105 Zotero_Preferences.Export.buildQuickCopyFormatDropDown( 106 document.getElementById('zotero-quickCopy-menu'), 107 contentType, 108 io.format, 109 io.translators 110 ); 111 Zotero.Styles.populateLocaleList( 112 document.getElementById('zotero-quickCopy-locale-menu') 113 ); 114 document.getElementById('zotero-quickCopy-copyAsHTML').checked = io.asHTML; 115 Zotero_Preferences.Export._lastSelectedLocale = io.locale; 116 ]]> 117 </script> 118 </dialog>