<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/"?>
<?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"?>

<!DOCTYPE window [
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd">
	%zoteroDTD;
	<!ENTITY % searchboxDTD SYSTEM "chrome://zotero/locale/searchbox.dtd">
	%searchboxDTD;
]>

<window
	id="zotero-advanced-search-dialog"
	title="&zotero.toolbar.advancedSearch;"
	orient="vertical"
	persist="screenX screenY width height"
	onload="ZoteroAdvancedSearch.onLoad()"
	onunload="ZoteroAdvancedSearch.onUnload()"
	xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
	windowtype="zotero:search">
	
	<script src="include.js"/>
	<script src="advancedSearch.js"/>
	
	<vbox id="zotero-search-box-container" flex="1">
		<vbox id="zotero-search-box-controls">
			<zoterosearch id="zotero-search-box" oncommand="if (this.active) { ZoteroAdvancedSearch.search(); }" flex="1"/>
			
			<hbox id="zotero-search-buttons">
				<button label="&zotero.search.search;" default="true" oncommand="ZoteroAdvancedSearch.search()"/>
				<button label="&zotero.search.clear;" oncommand="ZoteroAdvancedSearch.clear()"/>
				<button id="zotero-search-save" label="&zotero.search.saveSearch;" oncommand="ZoteroAdvancedSearch.save()"/>
			</hbox>
		</vbox>
		
		<tree id="zotero-items-tree" flex="1" hidecolumnpicker="true" seltype="multiple"
				ondblclick="ZoteroAdvancedSearch.onDblClick(event, this)"
				ondragstart="if (event.target.localName == 'treechildren') { ZoteroAdvancedSearch.itemsView.onDragStart(event); }">
			<treecols>
				<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"/>
			</treecols>
			<treechildren alternatingbackground="true"/>
		</tree>
	</vbox>
	
	<keyset>
		<key id="key_close" key="W" modifiers="accel" oncommand="window.close()"/>
	</keyset>
</window>
