This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
/
ajxp_confActions.xml
624 lines (621 loc) · 33.8 KB
/
ajxp_confActions.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
<?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"/>
<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+" developerComment="List the content of the config. Depending on the path, will return users, workspaces, roles, etc..">
<input_param name="dir" type="path" description="Path to config data to list. See URIs in webapp to guess the correct path."/>
</serverCallback>
</processing>
</action>
<action name="admin_search">
<processing>
<serverCallback methodName="searchAction" restParams="/query/dir+" 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" restParams="/" 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" restParams="/" developerComment="Returns all repository (output format is XML)"/>
</processing>
</action>
<action name="list_all_repositories_json">
<processing>
<serverCallback methodName="listAllActions" restParams="/" developerComment="Returns all repository (output format is JSON)"/>
</processing>
</action>
<action name="list_all_users">
<processing>
<serverCallback methodName="listAllActions" restParams="/" developerComment="Returns all users"/>
</processing>
</action>
<action name="generate_api_docs">
<processing>
<serverCallback methodName="switchAction" restParams="/version" developerComment="Generate API docs">
<input_param name="version" type="string" description="A two-digits version string, like 5.4, 6.2"/>
</serverCallback>
</processing>
</action>
<action name="get_plugin_manifest">
<processing>
<serverCallback methodName="switchAction" restParams="/plugin_id" developerComment="Send a plugin Manifest file.">
<input_param description="Plugin identifier (like type.name)" name="plugin_id" type="string"/>
<output type="XML" description="Manifest content"/>
</serverCallback>
</processing>
</action>
<action name="run_plugin_action">
<processing>
<serverCallback methodName="switchAction" restParams="/action_plugin_id/action_plugin_method" developerComment="Execute a class method on a plugin. Used for example for testing a DB connexion.">
<input_param name="action_plugin_id" type="string" description="A plugin id, in the form type.name"/>
<input_param name="action_plugin_method" type="string" description="A plugin method"/>
<input_param name="form_data" type="FORM_DATA"
description="A set of parameters complying to the standard form parser"/>
</serverCallback>
</processing>
</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" allowedMimes="users_zone,group" behaviour="hidden"
actionBar="true" contextMenu="true" 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(!pydio.getController().configEditor){
pydio.getController().configEditor = new ConfigEditor(oForm);
}
pydio.getController().configEditor.setForm(oForm);
result = pydio.getController().configEditor.submitCreateUser();
if(result) hideLightBox();
return false;
};
var loadFunc = function(oForm){
if(!pydio.getController().configEditor){
pydio.getController().configEditor = new ConfigEditor(oForm);
}
pydio.getController().configEditor.setForm(oForm);
pydio.getController().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" allowedMimes="roles_zone" 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"/>
<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" allowedMimes="users_zone,group" 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"/>
<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="ajxp_conf.90" 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" allowedMimes="workspaces_zone"
actionBar="true" 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 loadFunc = function(oForm){
ajaxplorer.getUserSelection().updateFormOrUrl(oForm);
if(!pydio.getController().configEditor){
pydio.getController().configEditor = new ConfigEditor(oForm);
}
pydio.getController().configEditor.setForm(oForm);
pydio.getController().configEditor.initCreateRepoWizard('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="380">
<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" developerComment="Create a workspace ( = repository, it's the same ) by passing a structured JSON object.">
<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). <br><br> 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="create_repository_template">
<gui text="ajxp_conf.91" title="ajxp_conf.92" iconClass="icon-th" src="hdd_external_unmount.png" hasAccessKey="false">
<context selection="false" dir="false" recycle="hidden" behaviour="hidden" allowedMimes="workspaces_zone"
actionBar="true" 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 loadFunc = function(oForm){
ajaxplorer.getUserSelection().updateFormOrUrl(oForm);
if(!pydio.getController().configEditor){
pydio.getController().configEditor = new ConfigEditor(oForm);
}
pydio.getController().configEditor.setForm(oForm);
pydio.getController().configEditor.initCreateRepoWizard('template');
};
modal.showDialogForm('Create Repository', 'create_repository_box', loadFunc, null, null, false, true);
]]></clientCallback>
</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(!pydio.getController().configEditor){
pydio.getController().configEditor = new ConfigEditor(oForm);
}
pydio.getController().configEditor.setForm(oForm);
pydio.getController().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 = pydio.getController().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"
actionBar="true" contextMenu="true" infoPanel="true"
actionBarGroup="get" inZip="false">
</context>
<selectionContext dir="true" file="true" recycle="false" unique="true" allowedMimes="user,user_editable,repository,repository_editable,role,group,ajxp_plugin,ajxp_role,ajxp_graphs,datagrid" behaviour="hidden"/>
</gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
<processing>
<clientCallback prepareModal="false"><![CDATA[
var editorData = window.actionArguments[0];
pydio.UI.openCurrentSelectionInEditor(editorData);
]]></clientCallback>
<serverCallback methodName="switchAction" restParams="/sub_action" developerComment="Shortcut for various actions, calling edit with subaction parameter."/>
</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" allowedMimes="workspaces_zone"
actionBar="true" contextMenu="true" infoPanel="false"
actionBarGroup="get" inZip="false">
</context>
<selectionContext dir="false" file="true" recycle="false" unique="true" allowedMimes="repository_editable" behaviour="hidden"/>
</gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
<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){
pydio.getController().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" developerComment="Update a workspace label">
<input_param description="Repository Identifier" name="repository_id" type="string"/>
<input_param description="New Label" name="newLabel" type="string"/>
</serverCallback>
</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="get" inZip="false">
</context>
<selectionContext dir="true" file="true" recycle="false" unique="false" allowedMimes="user_editable,repository_editable,role,group" image="false" editable="false" behaviour="hidden"/></gui>
<rightsContext noUser="true" userLogged="only" read="true" write="true" adminOnly=""/>
<processing>
<clientCallback prepareModal="true"><![CDATA[
var userSelection;
if(window.actionArguments && window.actionArguments.length){
userSelection = window.actionArguments[0];
}else{
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_conf.126'];
fieldName = "role_id";
fieldValue = getBaseName(meta.get("filename"));
}else if(meta.get("ajxp_mime") == "group"){
deleteMessage = MessageHash['ajxp_conf.126'];
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();
pydio.getController().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{
value = meta.get("text");
}
hidden.setAttribute("value", value);
pydio.getController().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+" developerComment="Generic delete action for config driver, used to delete users, workspaces, roles, etc.">
<input_param description="Type of the data to delete. Can be : user, group, role, repository" name="data_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="user_update_right">
<processing>
<serverCallback methodName="switchAction" restParams="/repository_id/user_id/right" checkParams="true" developerComment="Update a user access right on a given workspace.">
<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="role_update_right">
<processing>
<serverCallback methodName="switchAction" restParams="/repository/role_id/right" checkParams="true" developerComment="Update a role access right on a given workspace.">
<input_param name="role_id" type="AJXP_ROLE" mandatory="true" description="ID of the role"/>
<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"/>
</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="admin"/>
</gui>
<processing>
<clientCallback><![CDATA[
var win = window.open('https://pydio.com/?referrer=settings');
]]></clientCallback>
</processing>
</action>
<action name="cli_update_user_list">
<processing>
<serverCallback methodName="switchAction"/>
</processing>
</action>
<action name="clear_plugins_cache">
<gui src="plugins" text="ajxp_conf.129" title="ajxp_conf.130">
<context dir="true" recycle="true" allowedMimes="plugins_zone" selection="false" actionBar="true" actionBarGroup="get"/>
</gui>
<processing>
<clientCallback><![CDATA[
var conn = new Connexion();
conn.setParameters($H({get_action:'clear_plugins_cache'}));
conn.sendAsync();
]]></clientCallback>
<serverCallback methodName="switchAction"/>
</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>