<?xml version="1.0" encoding="UTF-8"?>
<editor id="editor.diaporama" order="-1" openable="true" previewProvider="true" text="186" title="136" icon="frame_image.png" className="Diaporama" mimes="png,jpg,jpeg,gif" formId="diaporama_box" label="CONF_MESSAGE[Image viewer]" description="CONF_MESSAGE[Image viewer, used for previewing images and browsing them in a diaporam. Generates a thumbnail version of the images.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
	<server_settings>
		<global_param name="META_EXTRACTION_REMOTEWRAPPERS" type="array" label="CONF_MESSAGE[Remote Wrappers]" description="CONF_MESSAGE[When connected to a remote server, metadata extraction can make the listing action very long, as it must first copy each file locally. For plugins using the defined wrappers and files whose size is greater than this threshold, the image type and dimension will be skipped.]" default="ftpAccessWrapper"/>
		<global_param name="META_EXTRACTION_THRESHOLD" type="string" label="CONF_MESSAGE[Size Threshold]" description="CONF_MESSAGE[Threshold]" default="50000"/>
		<global_param name="GENERATE_THUMBNAIL" type="boolean" label="CONF_MESSAGE[Thumbnails]" description="CONF_MESSAGE[Generate thumbnails or not]" default="true"/>
		<global_param name="THUMBNAIL_QUALITY" type="integer" label="CONF_MESSAGE[Quality]" description="CONF_MESSAGE[Thumbs quality]" default="2"/>
	</server_settings>
	<class_definition filename="plugins/editor.diaporama/class.ImagePreviewer.php" classname="ImagePreviewer"/>
    <client_settings>
        <resources>
            <js file="plugins/editor.diaporama/class.Diaporama.js" className="Diaporama"/>
            <i18n namespace="diaporama" path="plugins/editor.diaporama/i18n"/>
        </resources>
    </client_settings>
	<clientForm id="diaporama_box"><![CDATA[
		<div id="diaporama_box" action="view_diapo" box_width="90%" box_height="90%" box_resize="true" box_padding="0">
			<div class="action_bar" style="width: 100%;" title="AJXP_MESSAGE[414]">
				<div align="right" id="diaporama_input_boxes" style="float:right; padding-top: 1px; padding-right: 5px; height: 21px;margin-top:28px;margin-left:30px;">
					<input id="zoomValue" type="text" style="text-align: center; width: 34px;height: 16px;padding:0px;border: 1px solid #ccc; padding-right: 1px;"/><input id="time" type="text" value="3 s" style="text-align: center; width: 26px;height: 16px;padding:0px;border: 1px solid #ccc; padding-right: 1px;margin-left:10px;"/>
				</div>
				<a href="#" access_key="KEY_LEFT" id="prevButton" onclick="return false;"><img  width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/back_22.png" alt="" border="0"><br><span message_id="178">AJXP_MESSAGE[178]</span></a>
				<a href="#" access_key="s" id="stopButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/player_stop.png" alt="AJXP_MESSAGE[233]" border="0"><br><span message_id="232">AJXP_MESSAGE[232]</span></a>
				<a href="#" access_key="p" id="playButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/player_play.png" alt="AJXP_MESSAGE[231]" border="0"><br><span message_id="230">AJXP_MESSAGE[230]</span></a>
				<a href="#" access_key="KEY_RIGHT" id="nextButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/forward_22.png" alt="" border="0"><br><span message_id="179">AJXP_MESSAGE[179]</span></a>
				<div class="separator"></div>
				<a href="#" id="actualSizeButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/zoom-original.png" alt="" border="0"><br><span message_id="327">AJXP_MESSAGE[327]</span></a>
				<a href="#" id="fitToScreenButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/zoom-fit-best.png" alt="AJXP_MESSAGE[325]" border="0"><br><span message_id="325">AJXP_MESSAGE[325]</span></a>
				<div class="separator"></div>
				<a href="#" id="downloadDiapoButton" onclick="return false;"><img width="22" height="22" src="AJXP_THEME_FOLDER/images/actions/22/download_manager.png" alt="" border="0"><br><span message_id="88">AJXP_MESSAGE[88]</span></a>
			</div>
			<div id="diaporamaSplitter">
			    <div id="diaporamaMetadataContainer"></div>
                <div style="text-align:center; vertical-align:center;overflow:auto; background-color:#757575;" id="imageContainer">
                    <div id="imageBorder" style="background-color:transparent;-webkit-box-shadow:rgb(51, 51, 51) 2px 2px 6px;-moz-box-shadow:rgb(51, 51, 51) 2px 2px 6px;box-shadow:rgb(51, 51, 51) 2px 2px 6px;"><img id="mainImage" src=""></div>
                </div>
			</div>
		</div>
	]]></clientForm>
    <dependencies>
        <!-- Image proxy must be implemented -->
        <activePlugin pluginName="access.AJXP_STREAM_PROVIDER"/>
    </dependencies>				    
	<registry_contributions>
		<hooks>
			<serverCallback hookName="node.change" methodName="removeThumbnail" defer="true"></serverCallback>
		</hooks>		
		<actions>
			<action name="slideshow_sel">
				<gui text="234" title="234" src="frame_image.png" accessKey="" hasAccessKey="false">
					<context selection="true" dir="" recycle="hidden"
						actionBar="false" contextMenu="false" infoPanel="true"
						actionBarGroup="get">
					</context>
					<selectionContext dir="true" file="true" recycle="true" unique="false" multipleOnly="true" allowedMimes="AJXP_MIMES_IMAGE" behaviour="hidden"></selectionContext></gui>
				<rightsContext noUser="true" userLogged="only" read="true" write="false" adminOnly=""></rightsContext>
				<processing>
					<clientCallback prepareModal="true"><![CDATA[					
						var selectedMime = getAjxpMimeType(ajaxplorer.getUserSelection().getUniqueNode());
						var editors = ajaxplorer.findEditorsForMime(selectedMime);
						var editorData;
						if(editors.length){
							editorData = editors[0];							
						}					
						if(editorData){
							ajaxplorer.loadEditorResources(editorData.resourcesManager);
							modal.openEditorDialog(editorData);
						}else{
							alert('no data found!');
						}
						]]></clientCallback>
					<serverCallback methodName="switchAction"></serverCallback>
					</processing>
			</action>
			<action name="preview_data_proxy">
				<processing>
					<serverCallback methodName="switchAction"></serverCallback>
				</processing>
			</action>
		</actions>
		<hooks>
			<serverCallback hookName="node.info" methodName="extractImageMetaData" applyCondition="$apply=($args[2]!='minimal');"></serverCallback>
		</hooks>
		<client_configs>
			<component_config className="FilesList">
				<columns>
					<additional_column messageId="135" attributeName="readable_dimension" sortType="String"/>
				</columns>
			</component_config>
			<component_config className="InfoPanel">			
				<infoPanelExtension mime="AJXP_MIMES_IMAGE" attributes="image_width,image_height,image_type">
					<messages>
						<message key="type_string" id="134"/>				
						<message key="dim_string" id="135"/>
						<message key="header_string" id="343"/>
					</messages>
					<html><![CDATA[
						<div style="">
							<div class="panelHeader infoPanelGroup" colspan="2">#{header_string}</div>
							<table class="infoPanelTable" cellspacing="0" border="0" cellpadding="0">
								<tr>
									<td class="infoPanelLabel">#{dim_string}</td>
									<td class="infoPanelValue">#{image_width}px X #{image_height}px</td>
								</tr>
								<tr class="even">
									<td class="infoPanelLabel">#{type_string}</td>
									<td class="infoPanelValue">#{image_type}</td>
								</tr>
							</table>
						</div>
					]]></html>
				</infoPanelExtension>
			</component_config>
		</client_configs>			
	</registry_contributions>
</editor>