<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2009 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://global/skin/dialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/overlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero-platform/content/overlay.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/integration.css" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://zotero/locale/zotero.dtd">

<dialog
	id="zotero-add-citation-dialog"
	windowtype="zotero:item-selector"
	orient="vertical"
	title="&zotero.integration.addEditCitation.title;"
	width="600" height="450"
	onload="Zotero_Citation_Dialog.load();"
	onunload="doUnload();"
	ondialogaccept="return Zotero_Citation_Dialog.accept();"
	ondialogcancel="Zotero_Citation_Dialog.cancel();"
	onclose="Zotero_Citation_Dialog.cancel();"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	persist="screenX screenY width height"
	resizable="true"
	buttons="extra1,extra2,accept,cancel"
	ondialogextra2="Zotero_Citation_Dialog.toggleEditor()"
	ondialogextra1="Zotero_Citation_Dialog.toggleMultipleSources()">
	
	<script src="../include.js"/>
	<script src="../selectItemsDialog.js"/>
	<script src="addCitationDialog.js"/>
	
	<vbox id="zotero-select-items-container" flex="1">
		<vbox flex="1">
			<hbox flex="1">
				<vbox align="stretch" flex="1">
					<hbox align="center" pack="end">
						<textbox id="zotero-tb-search" type="search" timeout="250" oncommand="onSearch()" tabindex="1"
								onkeypress="if(event.keyCode == event.DOM_VK_ESCAPE) { if (this.value == '') { cancelDialog(); return false; } this.value = ''; onSearch(); return false; } return true;"/>
					</hbox>
					<hbox flex="1" style="margin-top: 5px">
						<tree id="zotero-collections-tree"
							style="width: 200px;" hidecolumnpicker="true" seltype="cell"
							onselect="onCollectionSelected();">
							<treecols>
								<treecol
									id="zotero-collections-name-column"
									flex="1"
									primary="true"
									hideheader="true"/>
							</treecols>
							<treechildren/>
						</tree>
					
						<tree id="zotero-items-tree"
								enableColumnDrag="true" flex="1" seltype="single"
								onselect="Zotero_Citation_Dialog.treeItemSelected();">
							<treecols id="zotero-items-columns-header">
								<treecol
									id="zotero-items-column-title" primary="true"
									label="&zotero.items.title_column;"
									flex="4" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-firstCreator"
									label="&zotero.items.creator_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-itemType" hidden="true"
									label="&zotero.items.type_column;"
									width="40" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-date" hidden="true"
									label="&zotero.items.date_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-year" hidden="true"
									label="&zotero.items.year_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-publisher" hidden="true"
									label="&zotero.items.publisher_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-publicationTitle" hidden="true"
									label="&zotero.items.publication_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-journalAbbreviation" hidden="true"
									label="&zotero.items.journalAbbr_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-language" hidden="true"
									label="&zotero.items.language_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-accessDate" hidden="true"
									label="&zotero.items.accessDate_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-libraryCatalog" hidden="true"
									label="&zotero.items.libraryCatalog_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-callNumber" hidden="true"
									submenu="true"
									label="&zotero.items.callNumber_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-rights" hidden="true"
									submenu="true"
									label="&zotero.items.rights_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-dateAdded" hidden="true"
									label="&zotero.items.dateAdded_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-dateModified" hidden="true"
									label="&zotero.items.dateModified_column;"
									flex="1" persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-archive" hidden="true"
									submenu="true"
									label="&zotero.items.archive_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>								
								<treecol
									id="zotero-items-column-archiveLocation" hidden="true"
									submenu="true"
									label="&zotero.items.archiveLocation_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-place" hidden="true"
									submenu="true"
									label="&zotero.items.place_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-volume" hidden="true"
									submenu="true"
									label="&zotero.items.volume_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-edition" hidden="true"
									submenu="true"
									label="&zotero.items.edition_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-pages" hidden="true"
									submenu="true"
									label="&zotero.items.pages_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-issue" hidden="true"
									submenu="true"
									label="&zotero.items.issue_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-series" hidden="true"
									submenu="true"
									label="&zotero.items.series_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-seriesTitle" hidden="true"
									submenu="true"
									label="&zotero.items.seriesTitle_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-court" hidden="true"
									submenu="true"
									label="&zotero.items.court_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-medium" hidden="true"
									submenu="true"
									label="&zotero.items.medium_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-genre" hidden="true"
									submenu="true"
									label="&zotero.items.genre_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-system" hidden="true"
									submenu="true"
									label="&zotero.items.system_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
								<splitter class="tree-splitter"/>
								<treecol
									id="zotero-items-column-extra" hidden="true"
									label="&zotero.items.extra_column;"
									flex="1" zotero-persist="width ordinal hidden sortActive sortDirection"/>
							</treecols>	
							<treechildren/>
						</tree>
					</hbox>
				</vbox>
						
				<hbox hidden="true" id="multiple-sources" align="stretch">
					<vbox align="center" pack="center" id="citation-buttons">
						<toolbarbutton id="up" oncommand="Zotero_Citation_Dialog.up()" disabled="true"/>
						<toolbarbutton id="add" oncommand="Zotero_Citation_Dialog.add()" disabled="true"/>
						<toolbarbutton id="remove" oncommand="Zotero_Citation_Dialog.remove()" disabled="true"/>
						<toolbarbutton id="down" oncommand="Zotero_Citation_Dialog.down()" disabled="true"/>
					</vbox>
					<vbox align="left">
						<checkbox id="keepSorted" hidden="true" checked="false" oncommand="Zotero_Citation_Dialog.citationSortUnsort()" label="&zotero.citation.keepSorted.label;"/>
						<listbox id="citation-list" flex="1" align="stretch" seltype="single"
							onselect="Zotero_Citation_Dialog.listItemSelected();"/>
					</vbox>
				</hbox>
			</hbox>
			
			<hbox align="stretch" style="margin-top: 8px">
				<vbox flex="1">
					<hbox align="center">
						<label value="&zotero.citation.prefix.label;"/>
						<textbox oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" class="fix" id="prefix" align="stretch" flex="1" tabindex="3"/>
					</hbox>
					<hbox align="center">
						<label value="&zotero.citation.suffix.label;"/>
						<textbox oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" class="fix" id="suffix" align="stretch" flex="1" tabindex="4"/>
					</hbox>
					<spacer flex="1"/>
				</vbox>
				<separator flex="4"/>
				<vbox flex="1">
					<hbox align="stretch">
						<menulist onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="label" tabindex="5">
							<menupopup id="locator-type-popup"/>
						</menulist>
						<textbox oninput="Zotero_Citation_Dialog.confirmRegenerate(false)" onchange="Zotero_Citation_Dialog.confirmRegenerate(true)" id="locator" tabindex="2" flex="1"/>
					</hbox>
					<separator style="height: 2px" flex="1"/>
					<checkbox oncommand="Zotero_Citation_Dialog.confirmRegenerate(true)" id="suppress-author" label="&zotero.citation.suppressAuthor.label;" tabindex="6"/>
				</vbox>
			</hbox>
		</vbox>
		
		<textbox id="editor" type="styled" mode="integration" hidden="true" flex="1"/>
		<description id="zotero-editor-warning" style="margin: 9px 1px 0" hidden="true">&zotero.citation.editorWarning.label;</description>
	</vbox>
</dialog>
