<?xml version="1.0" encoding="UTF-8"?>
<registry_contributions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
	<actions>
		<action name="ls" dirDefault="true">
			<gui text="32" title="32" src="fileopen.png"
				accessKey="folder_access_key" iconClass="icon-folder-open-alt">
				<context selection="true" dir="" recycle="false"
					actionBar="false" actionBarGroup="get" contextMenu="true" infoPanel="false">
				</context>
				<selectionContext dir="true" file="false" recycle="false"
					unique="true" allowedMimes="*">
				</selectionContext>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true"
				write="false" adminOnly="false">
			</rightsContext>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var path;
					if(window.actionArguments && window.actionArguments.length>0){
						path = window.actionArguments[0];
						if(Object.isString(path)){path = new AjxpNode(path,false,getBaseName(path));}
					}else{
						userSelection = ajaxplorer.getUserSelection();
						if(userSelection && userSelection.isUnique() && (userSelection.hasDir() || userSelection.hasMime(["zip"]))){
							path = userSelection.getUniqueNode();
						}
					}
					if(path){
						ajaxplorer.updateContextData(path);
					}
					]]></clientCallback>
				<serverCallback methodName="switchAction" restParams="/dir+/"></serverCallback>
			</processing>
		</action>
		<action name="admin_search">
			<processing>
				<serverCallback methodName="searchAction" developerComment="Remote search implementation, currently only supporting users search."/>
			</processing>
		</action>
		<action name="stat">
			<processing>
				<serverCallback methodName="switchAction" developerComment="To comply with GUI client, always returns true."/>
			</processing>
		</action>
        <action name="list_all_plugins_actions">
            <processing>
                <serverCallback methodName="listAllActions" restParams="/" developerComment="Returns a structured JSON object of all plugins and all their available actions"/>
            </processing>
        </action>
        <action name="list_all_plugins_parameters">
            <processing>
                <serverCallback methodName="listAllActions" restParams="/" developerComment="Returns a structured JSON object of all plugins and all their available parameter"/>
            </processing>
        </action>
        <action name="parameters_to_form_definitions">
            <processing>
                <serverCallback methodName="listAllActions" developerComment="Takes in input a list of plugin parameters and builds the corresponding XML to create a standard form."/>
            </processing>
        </action>
        <action name="list_all_repositories">
            <processing>
                <serverCallback methodName="listAllActions" developerComment="Returns all repository (output format is XML)"/>
            </processing>
        </action>
        <action name="list_all_repositories_json">
            <processing>
                <serverCallback methodName="listAllActions" developerComment="Returns all repository (output format is JSON)"/>
            </processing>
        </action>
        <action name="list_all_users">
            <processing>
                <serverCallback methodName="listAllActions" developerComment="Returns all users"/>
            </processing>
        </action>
		<action name="get_plugin_manifest">
			<processing>
				<serverCallback methodName="switchAction" restParams="/plugin_id">
                    <input_param description="Plugin identifier (like type.name)" name="plugin_id" type="string"/>
				</serverCallback>
			</processing>
		</action>
		<action name="run_plugin_action">
			<processing>
				<serverCallback methodName="switchAction" developerComment="Execute a class method on a plugin. Used for testing connexions."/>
			</processing>
		</action>
        <action name="create_users_menu">
            <gui text="ajxp_conf.2" title="ajxp_conf.2" iconClass="icon-user" src="yast_user_add.png" hasAccessKey="false">
                <context selection="false" dir="" recycle="hidden"
                         actionBar="true" contextMenu="false" infoPanel="false" actionBarGroup="put"/>
            </gui>
            <subMenu>
                <dynamicItems>
                    <item1 actionId="create_user"/>
                    <item2 actionId="create_group"/>
                    <item3 actionId="create_role"/>
                </dynamicItems>
            </subMenu>
        </action>
		<action name="create_user">
			<gui text="297" title="298" src="yast_user_add.png" iconClass="icon-user" accessKey="create_user_accesskey" hasAccessKey="true">
				<context selection="false" dir="false" recycle="hidden"  behaviour="hidden"
					actionBar="false" contextMenu="false" infoPanel="false"
					actionBarGroup="put" inZip="false">
				</context>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var completeFunc = function(){
						var oForm = modal.getForm();
						if(!ajaxplorer.actionBar.configEditor){
							ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
						}
						ajaxplorer.actionBar.configEditor.setForm(oForm);
						result = ajaxplorer.actionBar.configEditor.submitCreateUser();
						if(result) hideLightBox();
						return false;
					};
					var loadFunc = function(oForm){
						if(!ajaxplorer.actionBar.configEditor){
							ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
						}
						ajaxplorer.actionBar.configEditor.setForm(oForm);
						ajaxplorer.actionBar.configEditor.loadCreateUserForm();

						new Protopass(oForm.down('input[name="new_user_pwd"]'), {
							barContainer:$('pwd_strength_container'),
							barPosition:'bottom'
						});
					};
					modal.showDialogForm('Create User', 'create_user_box', loadFunc, completeFunc, null, null, null, true);
					]]></clientCallback>
				<clientForm id="create_user_box"><![CDATA[
					<div id="create_user_box" action="create_user" box_width="210">
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="94">AJXP_MESSAGE[94] : </div><input name="new_user_login" type="text" class="dialogFocus SF_input"/>
						</div>
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="182">AJXP_MESSAGE[182] : </div><input name="new_user_pwd" type="password" class="SF_input"/>
						</div>
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="199">AJXP_MESSAGE[199] : </div><input name="new_user_pwd_conf" type="password" class="SF_input"/>
						</div>
						<div class="SF_element" id="pwd_strength_container"></div>
						<div style="clear:both; display:none;" class="dialogLegend" ajxp_message_id="89">AJXP_MESSAGE[ajxp_conf.89]</div>
						<div id="custom_pane" class="config_subblock" style="display:none;">

						</div>
					</div>
				]]></clientForm>
				<serverCallback methodName="switchAction"
                                developerComment="Create a user with login and password in the AUTH directory."
                                restParams="/new_user_login/new_user_pwd"
                        >
                    <input_param description="User login, must be alphanumerical, no special chars" name="new_user_login" type="string"/>
                    <input_param description="User password, must be alphanumerical, no special chars" name="new_user_pwd" type="string"/>
				</serverCallback>
				</processing>
		</action>
		<action name="create_role">
			<gui text="ajxp_conf.75" title="ajxp_conf.75" iconClass="icon-th" src="user_group_new.png" accessKey="ajxp_conf.role_access" hasAccessKey="true">
				<context selection="false" dir="false" recycle="hidden"  behaviour="hidden"
					actionBar="false" contextMenu="false" infoPanel="false"
					actionBarGroup="put" inZip="false">
				</context>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					modal.showDialogForm('Create Role', 'create_role_box');
					]]></clientCallback>
				<clientForm id="create_role_box"><![CDATA[
					<div id="create_role_box" action="create_role" box_width="210">
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="ajxp_conf.76">AJXP_MESSAGE[ajxp_conf.76] : </div><input name="role_id" type="text" class="dialogFocus SF_input"/>
						</div>
					</div>
				]]></clientForm>
				<serverCallback methodName="switchAction" developerComment="Create an empty role" restParams="/role_id">
                    <input_param description="Role identifier" name="role_id" type="string"/>
				</serverCallback>
			</processing>
		</action>
		<action name="create_group">
			<gui text="ajxp_conf.118" title="ajxp_conf.118" iconClass="icon-group" src="user_group_new.png" accessKey="ajxp_conf.group_access" hasAccessKey="true">
				<context selection="false" dir="false" recycle="hidden"  behaviour="hidden"
					actionBar="false" contextMenu="false" infoPanel="false"
					actionBarGroup="put" inZip="false">
				</context>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					modal.showDialogForm('Create Role', 'create_group_box');
					]]></clientCallback>
				<clientForm id="create_group_box"><![CDATA[
					<div id="create_group_box" action="create_group" box_width="210">
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="ajxp_conf.76">Group ID : </div><input name="group_name" type="text" class="dialogFocus SF_input"/>
						</div>
						<div class="SF_element">
							<div class="SF_label" ajxp_message_id="ajxp_conf.76">Group Label : </div><input name="group_label" type="text" class="dialogFocus SF_input"/>
						</div>
					</div>
				]]></clientForm>
				<serverCallback methodName="switchAction" developerComment="Create a new group of users" restParams="/group_label/group_path+">
                    <input_param description="Full group path, must be in the form /group/path/name" name="group_path" type="String"/>
                    <input_param description="Group Label" name="group_label" type="String"/>
				</serverCallback>
			</processing>
		</action>
		<action name="user_update_group" dragndropDefault="true">
			<gui text="ajxp_conf.119" title="ajxp_conf.119" src="user_group_new.png" accessKey="ajxp_conf.role_access" hasAccessKey="true">
				<context selection="false" dir="false" recycle="hidden"  behaviour="hidden"
					actionBar="false" contextMenu="false" infoPanel="false"
					actionBarGroup="put" inZip="false">
				</context>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
            <processing>
                <serverCallback methodName="switchAction" developerComment="Move an existing user to an existing group" restParams="/file/group_path+">
                    <input_param description="User identifier" name="file" type="String"/>
                    <input_param description="Target group path, must be /group/path" name="group_path" type="String"/>
                </serverCallback>
            </processing>
		</action>
		<action name="create_repository">
			<gui text="299" title="300" iconClass="icon-sitemap" src="hdd_external_unmount.png" accessKey="ajxp_conf.repository_access_key" hasAccessKey="false">
				<context selection="false" dir="false" recycle="hidden"  behaviour="hidden"
					actionBar="true" contextMenu="false" infoPanel="false"
					actionBarGroup="put" inZip="false">
				</context>
			</gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly="true"/>
			<subMenu>
				<dynamicBuilder><![CDATA[
					var context = window.builderContext;
					context.builderMenuItems = $A([]);
                    context.builderMenuItems.push({
                        name:MessageHash['ajxp_conf.90'],
                        alt:MessageHash[300],
                        isDefault : true,
                        icon_class:'icon-hdd',
                        image:resolveImageSource('images/actions/22/hdd_external_unmount.png', '',  22),
                        callback:function(e){
                            window.createRepoCmd = "repository";
                            this.options.src = 'hdd_external_unmount.png';
                            this.options.title = MessageHash[300];
                            this.apply();
                        }.bind(context)
                    } );
                    context.builderMenuItems.push({
                        name:MessageHash['ajxp_conf.91'],
                        alt:MessageHash['ajxp_conf.92'],
                        isDefault : false,
                        icon_class:'icon-th',
                        image:resolveImageSource('images/actions/22/hdd_external_mount.png', '',  22),
                        callback:function(e){
                            window.createRepoCmd = "template";
                            this.options.src = 'hdd_external_mount.png';
                            this.options.title = MessageHash['ajxp_conf.92'];
                            this.apply();
                        }.bind(context)
                    } );
				]]></dynamicBuilder>
			</subMenu>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var loadFunc = function(oForm){
						ajaxplorer.getUserSelection().updateFormOrUrl(oForm);
						if(!ajaxplorer.actionBar.configEditor){
							ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
						}
						ajaxplorer.actionBar.configEditor.setForm(oForm);
						ajaxplorer.actionBar.configEditor.initCreateRepoWizard((window.createRepoCmd?window.createRepoCmd:'repository'));
					};
					modal.showDialogForm('Create Repository', 'create_repository_box', loadFunc, null, null, false, true);
					]]></clientCallback>
				<clientForm id="create_repository_box"><![CDATA[
					<div id="create_repository_box" action="create_repository" box_width="320">
					    <div id="creation_form" style="padding:5px;padding-top:0px;">
                            <div class="dialogLegend repoCreationString">AJXP_MESSAGE[ajxp_conf.95]</div>
                            <div class="dialogLegend tplCreationString">AJXP_MESSAGE[ajxp_conf.96]</div>
                            <div class="SF_element">
                                <div class="SF_label repoCreationString" ajxp_message_id="ajxp_conf.8">AJXP_MESSAGE[ajxp_conf.8]* : </div>
                                <div class="SF_label tplCreationString" ajxp_message_id="ajxp_conf.116">AJXP_MESSAGE[ajxp_conf.116]* : </div>
                                <input name="new_user_login" type="text" class="SF_input dialogFocus"/>
                            </div>
                            <div class="SF_element">
                                <div class="SF_label repoCreationString" ajxp_message_id="ajxp_conf.32">AJXP_MESSAGE[ajxp_conf.32]* : </div>
                                <div class="SF_label tplCreationString" ajxp_message_id="ajxp_conf.117">AJXP_MESSAGE[ajxp_conf.117]* : </div>
                                <select class="SF_input"><option>AJXP_MESSAGE[ajxp_conf.33]</option></select>
                            </div>
						</div>
						<div id="driver_form" style="margin-top:32px;"></div>
						<div class="dialogButtons" style="direction:rtl;">
							<input type="image" src="AJXP_THEME_FOLDER/images/actions/22/forward.png" height="22" width="22" class="dialogButton" id="submit_create_repo" value="Next" class="button" onclick="return false;">
							<input type="image" src="AJXP_THEME_FOLDER/images/actions/22/dialog_close.png" height="22" width="22" class="dialogButton" value="Cancel" class="button" onclick="hideLightBox();return false;">
						</div>
					</div>
				]]></clientForm>
				<serverCallback methodName="switchAction" restParams="/json_data">
                    <input_param description="A JSON object containing the following mandatory keys : DISPLAY (string), DRIVER (string), DRIVER_OPTIONS (array of options) and optional keys : DISPLAY_ID (string), DESCRIPTION_ID (string), AJXP_SLUG (string), IS_TEMPLATE (boolean). &lt;br&gt;&lt;br&gt; The expected DRIVER value can be either an access type plugin name (fs, ftp, etc), or a template id by using the ajxp_template_ prefix (ajxp_template_TEMPLATE_ID). The DRIVER_OPTIONS array may depend on the used access type." name="json_data" type="JSON"/>
				</serverCallback>
				</processing>
		</action>
		<action name="edit_repository_label">
			<gui text="6" title="158" src="applix.png" iconClass="icon-pencil" accessKey="rename_access_key" hasAccessKey="true">
				<context selection="true" dir="" recycle="hidden"
					actionBar="true" contextMenu="true" infoPanel="false"
					actionBarGroup="change" inZip="false">
				</context>
				<selectionContext dir="false" file="true" recycle="false" unique="true" allowedMimes="repository_editable" behaviour="hidden"></selectionContext></gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""></rightsContext>
			<processing>
				<clientCallback prepareModal="false"><![CDATA[
					var callback = function(node, newValue){
						var conn = new Connexion();
						conn.addParameter('get_action', 'edit');
						conn.addParameter('sub_action', 'edit_repository_label');
						conn.addParameter('repository_id', node.getMetadata().get('repository_id'));
						conn.addParameter('newLabel', newValue);
						conn.onComplete = function(transport){
							ajaxplorer.actionBar.parseXmlMessage(transport.responseXML);
						};
						conn.sendSync();
					};

					if(ajaxplorer.getUserSelection() && ajaxplorer.getUserSelection().getSelectionSource() && ajaxplorer.getUserSelection().getSelectionSource().switchCurrentLabelToEdition) {ajaxplorer.getUserSelection().getSelectionSource().switchCurrentLabelToEdition(callback);}
					]]></clientCallback>
				<serverCallback methodName="switchAction" restParams="/repository_id/newLabel">
                    <input_param description="Repository Identifier" name="repository_id" type="string"/>
                    <input_param description="New Label" name="newLabel" type="string"/>
				</serverCallback>
				</processing>
		</action>
		<action name="user_update_role" fileDefault="false">
			<gui text="ajxp_conf.94" title="ajxp_conf.82" src="edit.png" accessKey="edit_access_key" hasAccessKey="true">
				<context selection="true" dir="" recycle="hidden"  behaviour="hidden"
					actionBar="true" contextMenu="true" infoPanel="true"
					actionBarGroup="get" inZip="false">
				</context>
				<selectionContext dir="false" file="true" recycle="false" unique="false" multipleOnly="true" allowedMimes="user,user_editable" behaviour="hidden"/></gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var userSelection =  ajaxplorer.getUserSelection();
					var loadFunc = function(oForm){
						ajaxplorer.getUserSelection().updateFormOrUrl(oForm);
						if(!ajaxplorer.actionBar.configEditor){
							ajaxplorer.actionBar.configEditor = new ConfigEditor(oForm);
						}
						ajaxplorer.actionBar.configEditor.setForm(oForm);
						ajaxplorer.actionBar.configEditor.loadUsers(userSelection);
					};
					modal.showDialogForm('Batch Edition', 'batch_roles_edit_box', loadFunc, function(){hideLightBox();}, null, true);
				]]></clientCallback>
                <clientForm id="batch_roles_edit_box"><![CDATA[
                    <div id="batch_roles_edit_box" action="edit_user" box_width="420">
                        <div id="user_acl">
                            <div id="roles_pane">
                                <div class="dialogLegend" ajxp_message_id="ajxp_conf.83">AJXP_MESSAGE[ajxp_conf.83]</div>
                                <div>
                                    <div style="width:44%;float:left;"><span ajxp_message_id="ajxp_conf.71">AJXP_MESSAGE[ajxp_conf.71]</span> : <br><div id="available_roles"></div></div>
                                    <div style="width:10%;float:left;text-align:center;vertical-align:middle; margin-top: 20px;"><span class="icon-chevron-left"></span> <span  class="icon-chevron-right"></span></div>
                                    <div style="width:44%;float:left;"><span ajxp_message_id="ajxp_conf.70">AJXP_MESSAGE[ajxp_conf.70]</span> : <br><div id="user_roles"></div></div>
                                </div>
                            </div>
                        </div>
                    </div>
                ]]></clientForm>
				<clientListener name="selectionChange"><![CDATA[
				if(ajaxplorer){
					var userSelection = ajaxplorer.getUserSelection();
					var action = ajaxplorer.getActionBar().getActionByName("user_update_role");
					if(action){
						if(userSelection.isUnique()){
							action.selectionContext.dir = true;
							action.selectionContext.file = false;
						}else{
							action.selectionContext.dir = false;
							action.selectionContext.file = true;
						}
					}
				}
				]]></clientListener>
				<serverCallback methodName="switchAction" developerComment="Add or remove a given role to a set of users. The rest access can only handle one user at a time, using the file parameter." restParams="/file/update_role_action/role_id">
                    <input_param description="Users selection" name="file_0...N" type="string"/>
                    <input_param description="Role identifier" name="role_id" type="string"/>
                    <input_param description="Action : add or remove role?" name="update_role_action" type="string"/>
				</serverCallback>
			</processing>
		</action>
		<action name="edit" fileDefault="true">
			<gui text="ajxp_conf.93" title="301" iconClass="icon-edit" src="edit.png" accessKey="edit_access_key" hasAccessKey="true">
				<context selection="true" dir="" recycle="hidden"  behaviour="hidden"
					actionBar="true" contextMenu="true" infoPanel="true"
					actionBarGroup="get" inZip="false">
				</context>
				<selectionContext dir="true" file="true" recycle="false" unique="true" allowedMimes="role,group,user,user_editable,repository,repository_editable,ajxp_plugin" behaviour="hidden"></selectionContext></gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""></rightsContext>
            <processing>
                <clientCallback prepareModal="false"><![CDATA[
                    var editorData = window.actionArguments[0];
                    if(!editorData){
                        var selectedMime = getAjxpMimeType(ajaxplorer.getUserSelection().getUniqueNode());
                        var editors = ajaxplorer.findEditorsForMime(selectedMime);
                        if(editors.length && editors[0].openable){
                            editorData = editors[0];
                        }
                    }
                    if(editorData){
                        ajaxplorer.loadEditorResources(editorData.resourcesManager);
                        modal.openEditorDialog(editorData);
                    }
                ]]></clientCallback>
                <serverCallback methodName="switchAction" developerComment="Shortcut for various actions, calling edit with subaction parameter."/>
            </processing>
        </action>
		<action name="save_user_preference">
			<processing>
				<serverCallback methodName="switchAction" developerComment="Sets a user preference value. Rest can only take one value, but CLI or http GET can pass many preferences, using _1, _2, _3, etc." restParams="/user_id/pref_name_0/pref_value_0">
                    <input_param description="User login" name="user_id" type="string"/>
                    <input_param description="Preference name" name="pref_name_0" type="string"/>
                    <input_param description="Preference value" name="pref_value_0" type="string"/>
				</serverCallback>
			</processing>
		</action>
		<action name="meta_source_edit">
			<processing>
				<serverCallback methodName="switchAction" developerComment="Edit an existing meta source parameters." restParams="/repository_id/plugId/json_data">
                    <input_param description="Id of the repository" name="repository_id" type="string"/>
                    <input_param description="Id of the plugin" name="plugId" type="string"/>
                    <input_param description="JSON Representation of the plugin necessary options" name="json_data"
                                 type="JSON"/>
				</serverCallback>
			</processing>
		</action>
		<action name="meta_source_add">
			<processing>
				<serverCallback methodName="switchAction" developerComment="Add a meta source to a repository, setting its parameters." restParams="/repository_id/plugId/json_data">
                    <input_param description="Id of the repository" name="repository_id" type="string"/>
                    <input_param description="Id of the plugin" name="plugId" type="string"/>
                    <input_param description="JSON Representation of the plugin necessary options" name="json_data"
                                 type="JSON"/>
				</serverCallback>
			</processing>
		</action>
		<action name="meta_source_delete">
			<processing>
				<serverCallback methodName="switchAction" developerComment="Remove a given meta source from a repository." restParams="/repository_id/plugId">
                    <input_param description="Id of the repository" name="repository_id" type="string"/>
                    <input_param description="Id of the plugin" name="plugId" type="string"/>
				</serverCallback>
			</processing>
		</action>
		<action name="delete">
			<gui text="7" title="161" src="editdelete.png" iconClass="icon-trash" accessKey="delete_access_key" hasAccessKey="true" specialAccessKey="delete">
				<context selection="true" dir="" recycle="false"
					actionBar="true" contextMenu="true" infoPanel="false"
					actionBarGroup="change" inZip="false">
				</context>
				<selectionContext dir="true" file="true" recycle="false" unique="false"  allowedMimes="user_editable,repository_editable,shared_file,role,group" image="false" editable="false"/></gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var userSelection =  ajaxplorer.getUserSelection();
					var node = userSelection.getUniqueNode();
					var meta = node.getMetadata();
					var deleteMessage, fieldName, fieldValue;
					if(meta.get("ajxp_mime") == "user_editable"){
						deleteMessage = MessageHash['ajxp_conf.34'];
						fieldName = "user_id";
						fieldValue = getBaseName(meta.get("filename"));
					}else if(meta.get("ajxp_mime") == "role"){
						deleteMessage = MessageHash['ajxp_shared.11'];
						fieldName = "role_id";
						fieldValue = getBaseName(meta.get("filename"));
					}else if(meta.get("ajxp_mime") == "shared_file"){
						deleteMessage = MessageHash['ajxp_shared.11'];
						fieldName = "shared_file";
						fieldValue = meta.get("filename");
					}else if(meta.get("ajxp_mime") == "group"){
						deleteMessage = MessageHash['ajxp_shared.11'];
						fieldName = "group";
						fieldValue = meta.get("filename");
					}else{
						deleteMessage = MessageHash['ajxp_conf.35'];
						fieldName = "repository_id";
						fieldValue = meta.get("repository_id");
					}
					var onLoad = function(oForm){
		   		    	$(oForm).select('span[id="delete_message"]')[0].update(deleteMessage);
		   		    	var hidden = $(oForm).select('input[type="hidden"]')[0];
		   		    	hidden.setAttribute("name", fieldName);
		   		    	hidden.setAttribute("value", fieldValue);
					};
					modal.showDialogForm('Delete', 'delete_config_form', onLoad, function(){
						var oForm = modal.getForm();
						ajaxplorer.actionBar.submitForm(oForm);
                        if (userSelection.isMultiple()) {
                           var i = 1;
	   		    	       var hidden = $(oForm).select('input[type="hidden"]')[0];
                           while (true) {
                              try {
                                  var node = userSelection.getNode(i);
                                  var meta = node.getMetadata();
                                  var value;
                                  if(meta.get("ajxp_mime") == "user_editable"){
                                  	value = meta.get("text");
                                  }else if(meta.get("ajxp_mime") == "shared_file"){
                                  	value = meta.get("filename");
                                  }else{
                                  	value = meta.get("text");
                                  }
                                  hidden.setAttribute("value", value);
            					  ajaxplorer.actionBar.submitForm(oForm);
                                  i++;
                              } catch (e)
                              {
                                  break;
                              }
                           }
                        }
						hideLightBox(true);
						return false;
					});
					]]></clientCallback>
				<clientForm id="delete_config_form"><![CDATA[
				<div id="delete_config_form" action="delete" box_width="280">
					<span id="delete_message"></span>
					<input type="hidden" name="" value=""/>
				</div>
				]]></clientForm>
				<serverCallback methodName="switchAction" restParams="/data_type/data_id+">
                    <input_param description="Type of the data to delete. Can be : user, group, role, repository, shared_file" name="date_type" type="String"/>
                    <input_param description="Id of the data to delete. For groups, full group path." name="data_id"
                                 type="string"/>
				</serverCallback>
				</processing>
		</action>
		<action name="copyAsText">
			<gui text="302" title="303" iconClass="icon-copy" src="editcopy.png" accessKey="" hasAccessKey="false">
				<context selection="true" dir="" recycle="false"
					actionBar="true" contextMenu="true" infoPanel="false"
					actionBarGroup="change" inZip="false">
				</context>
				<selectionContext dir="false" file="true" recycle="false" unique="false" allowedMimes="log,testResult"  image="false" editable="false"/></gui>
			<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
			<processing>
				<clientCallback prepareModal="true"><![CDATA[
					var onLoad = function(oForm){
						var userSelection =  ajaxplorer.getUserSelection();
						var nodes = userSelection.getSelectedNodes();
						var firstNode = userSelection.getUniqueNode();
		   		    	var copyDiv = $(oForm).select('textarea[id="text_copy"]')[0];
		   		    	var attributes = ['date','ip','level','user','action','params'];
			   		    var message = attributes.join("\t") + "\n\n";
		   		    	nodes.each(function(node){
		   		    		var meta = node.getMetadata();
		   		    		for(var i=0;i<attributes.length;i++){
		   		    			var attName = attributes[i];
		   		    			if(attName == "ajxp_label") attName = "text";
		   		    			message += meta.get(attName) + '\t';
		   		    		}
			   		    	message += '\n';
		   		    	});
		   		    	copyDiv.setValue(message);
		   		    	copyDiv.select();
					};
					modal.showDialogForm('Delete', 'copy_as_text', onLoad, function(){
						hideLightBox(true);
						return false;
					},null,true);
					]]></clientCallback>
				<clientForm id="copy_as_text"><![CDATA[
				<div id="copy_as_text" action="copy" box_width="650">
					<textarea id="text_copy" style="width:630px; height: 350px;"></textarea>
				</div>
				]]></clientForm>
				</processing>
		</action>
	    <action name="user_update_right">
            <processing>
                <serverCallback methodName="switchAction" restParams="/repository_id/user_id/right" checkParams="true">
                    <input_param name="user_id" type="AJXP_USER" mandatory="true" description="ID of the user"/>
                    <input_param name="repository_id" type="AJXP_REPOSITORY" mandatory="true" description="Repository ID"/>
                    <input_param name="right" type="string" mandatory="true" description="Must be r (read), w (write) or n (none)"/>
                </serverCallback>
            </processing>
        </action>
        <action name="get_bookmarks">
            <pre_processing>
                <serverCallback methodName="preProcessBookmarkAction"></serverCallback>
            </pre_processing>
        </action>
        <action name="pydio-go-pro">
            <gui src="gopro" text="ajxp_conf.120" title="ajxp_conf.121" iconClass="icon-rocket">
                <context dir="true" recycle="true" selection="false" actionBar="true" actionBarGroup="user"/>
            </gui>
            <processing>
                <clientCallback><![CDATA[
                    var win = window.open('https://pydio.com/');
                ]]></clientCallback>
            </processing>
        </action>
	</actions>
	<client_configs>
		<component_config className="InfoPanel">
			<infoPanel mime="generic_file" attributes="icon,text">
				<messages>
					<message key="name_string" id="133"/>
					<message key="size_string" id="127"/>
					<message key="type_string" id="134"/>
					<message key="modif_string" id="138"/>
				</messages>
				<html><![CDATA[
				<div style="padding:10px;">
					<div class="folderImage">
						<img src="AJXP_THEME_FOLDER/images/mimes/64/#{icon}" height="64" width="64">
					</div>
					<b>#{name_string}</b> : #{text}
				</div>
				]]></html>
			</infoPanel>
			<infoPanel mime="generic_dir" attributes="icon,text">
				<messages>
					<message key="name_string" id="133"/>
					<message key="modif_string" id="138"/>
				</messages>
				<html><![CDATA[
					<div style="padding:10px;">
						<div class="folderImage">
							<img src="AJXP_THEME_FOLDER/images/mimes/64/#{icon}" height="64" width="64">
						</div>
						<b>#{name_string}</b> : #{text}
					</div>
				]]></html>
			</infoPanel>
			<infoPanel mime="no_selection" attributes="">
				<messages>
					<message key="files_string" id="265"/>
				</messages>
				<html><![CDATA[
					<div style="padding:10px;">
						<div class="folderImage">
							<img src="AJXP_THEME_FOLDER/images/mimes/64/admin.png" height="64" width="64">
						</div>
					</div>
				]]></html>
			</infoPanel>
		</component_config>
	</client_configs>
</registry_contributions>
