<?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 *****
-->

<!DOCTYPE bindings SYSTEM "chrome://zotero/locale/zotero.dtd">

<bindings xmlns="http://www.mozilla.org/xbl"
		  xmlns:xbl="http://www.mozilla.org/xbl"
		  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
	
	<binding id="storage-file-box"
			extends="chrome://zotero/content/bindings/attachmentbox.xml#attachment-box">
		
		<implementation>
			<property name="mode" onget="return this._mode;">
				<setter>
				<![CDATA[
					this.editable = false;
					this.displayGoButtons = false;
					this.clickableLink = false;
					this.displayIndexed = false;
					this.displayPages = false;
					this.displayNote = false;
					
					switch (val) {
						case 'merge':
							this.displayFileName = true;
							this.displayButton = true;
							this.displayDateModified = true;
							break;
						
						case 'mergeedit':
							this.displayFileName = true;
							this.displayDateModified = true;
							break;
						
						default:
							throw ("Invalid mode '" + val + "' in storagefilebox.xml");
					}
					
					this._mode = val;
					document.getAnonymousNodes(this)[0].setAttribute('mode', val);
				]]>
				</setter>
			</property>
		</implementation>
	</binding>
</bindings>
