<?xml version="1.0"?>
<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2011 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/zotero.css" type="text/css"?>
<?xml-stylesheet href="chrome://zotero/skin/standalone.css" type="text/css"?>
<?xul-overlay href="chrome://zotero/content/standalone/editMenuOverlay.xul"?>
<?xul-overlay href="chrome://zotero-platform/content/standalone/menuOverlay.xul"?>

<!DOCTYPE window [
	<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> %globalDTD;
	<!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd" > %textcontextDTD;
	<!ENTITY % standaloneDTD SYSTEM "chrome://zotero/locale/standalone.dtd" > %standaloneDTD;
	<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > %brandDTD;
	<!ENTITY % zoteroDTD SYSTEM "chrome://zotero/locale/zotero.dtd"> %zoteroDTD;
]>

<window id="main-window"
				xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
				onload="window.sizeToContent()"
				windowtype="zotero:basicViewer" 
				title="&brandShortName;"
				width="1000" height="500"
				persist="screenX screenY width height sizemode">
	<script type="application/javascript" src="chrome://global/content/globalOverlay.js"/>
	<script type="application/javascript" src="chrome://global/content/contentAreaUtils.js"/>
	<script type="application/javascript" src="chrome://global/content/printUtils.js"/>
	<script type="application/javascript" src="chrome://global/content/inlineSpellCheckUI.js"/>
	<script type="application/javascript" src="chrome://zotero/content/include.js"/>
	<script type="application/javascript" src="basicViewer.js"/>
	
	<commandset id="mainCommandSet">
		<!--FILE-->
		<command id="cmd_close" oncommand="window.close();"/>
		<command id="cmd_save" oncommand="saveDocument(browser.contentDocument);"/>
		<command id="cmd_print" oncommand="browser.contentWindow.print()"/>
		<command id="cmd_quitApplication" oncommand="goQuitApplication();"/>
		
		<!--EDIT-->
		<commandset id="editMenuCommands"/>
		<command id="cmd_find"
			oncommand="document.getElementById('zotero-tb-search').focus();"/>
	</commandset>
	
	<keyset id="mainKeyset">
		<key id="key_close" key="&closeCmd.key;" command="cmd_close" modifiers="accel"/>
		<key id="key_print" key="&printCmd.key;" command="cmd_print" modifiers="accel"/>
		<key id="key_save" key="&saveCmd.key;" command="cmd_save" modifiers="accel"/>
	</keyset>
	<keyset id="editMenuKeys"/>
	
	<popup id="contentAreaContextMenu">
		<menuitem id="context-undo"
				label="&undoCmd.label;"
				accesskey="&undoCmd.accesskey;"
				command="cmd_undo"/>
		<menuseparator id="context-sep-undo"/>
		<menuitem id="context-cut"
				label="&cutCmd.label;"
				accesskey="&cutCmd.accesskey;"
				command="cmd_cut"/>
		<menuitem id="context-copy"
				label="&copyCmd.label;"
				accesskey="&copyCmd.accesskey;"
				command="cmd_copy"/>
		<menuitem id="context-paste"
				label="&pasteCmd.label;"
				accesskey="&pasteCmd.accesskey;"
				command="cmd_paste"/>
		<menuitem id="context-delete"
				label="&deleteCmd.label;"
				accesskey="&deleteCmd.accesskey;"
				command="cmd_delete"/>
		<menuseparator id="context-sep-paste"/>
		<menuitem id="context-selectall"
				label="&selectAllCmd.label;"
				accesskey="&selectAllCmd.accesskey;"
				command="cmd_selectAll"/>
	</popup>
	<toolbox id="navigator-toolbox" class="toolbox-top" mode="icons" defaultmode="icons">
		<!-- Menu -->
		<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
				defaultset="menubar-items"
				mode="icons" iconsize="small" defaulticonsize="small"
				context="toolbar-context-menu">
			<toolbaritem id="menubar-items" align="center">
				<menubar id="main-menubar"
				style="border:0px;padding:0px;margin:0px;-moz-appearance:none">
					<menu id="fileMenu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
						<menupopup id="menu_FilePopup">
							<menuitem id="menu_close" label="&closeCmd.label;" key="key_close"
									accesskey="&closeCmd.accesskey;" command="cmd_close"/>
							<menuseparator/>
							<menuitem id="menu_save" label="&saveCmd.label;" key="key_save"
									accesskey="&saveCmd.accesskey;" command="cmd_save"/>
							<menuseparator/>
							<menuitem id="menu_print" label="&printCmd.label;" key="key_print"
									accesskey="&printCmd.accesskey;" command="cmd_print"/>
							
						</menupopup>
					</menu>
					
					<menu id="menu_edit">
						<menupopup id="menu_EditPopup">
							<menuitem id="menu_undo"/>
							<menuitem id="menu_redo"/>
							<menuseparator/>
							<menuitem id="menu_cut"/>
							<menuitem id="menu_copy"/>
							<menuitem id="menu_paste"/>
							<menuitem id="menu_delete"/>
							<menuseparator/>
							<menuitem id="menu_selectAll"/>
							<menuseparator/>
							<menuitem id="menu_find"/>
							<menuseparator hidden="true" id="textfieldDirection-separator"/>
							<menuitem id="textfieldDirection-swap"
									command="cmd_switchTextDirection"
									key="key_switchTextDirection"
									label="&bidiSwitchTextDirectionItem.label;"
									accesskey="&bidiSwitchTextDirectionItem.accesskey;"
									hidden="true"/>
						</menupopup>
					</menu>
					
					<menu id="windowMenu" />
				</menubar>
			</toolbaritem>
		</toolbar>
	</toolbox>
	
	<hbox flex="1" id="browser">
		<vbox id="appcontent" flex="1">
			<browser id="my-browser" type="content-primary" flex="1"/>
		</vbox>
	</hbox>
</window>
