This repository has been archived by the owner on Nov 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 293
/
manifest.xml
148 lines (148 loc) · 9.26 KB
/
manifest.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
<?xml version="1.0" encoding="UTF-8"?>
<confdriver name="sql" id="conf.sql" label="CONF_MESSAGE[DB Storage]" description="CONF_MESSAGE[Stores the conf data in an SQL database.]"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd"
mixins="dibidriver_consumer" >
<client_settings>
<resources>
<i18n namespace="sql_conf" path="plugins/conf.sql/i18n"/>
</resources>
</client_settings>
<server_settings>
<param name="SQL_DRIVER" type="group_switch:dibi" label="CONF_MESSAGE[Connexion]" description="CONF_MESSAGE[The Database Connexion]" mandatory="true"/>
<param type="button" name="INSTALL_SQL" choices="run_plugin_action:conf.sql:installSQLTables" label="CONF_MESSAGE[SQL Tables]" description="CONF_MESSAGE[Install SQL Tables]" mandatory="false"/>
</server_settings>
<class_definition filename="plugins/conf.sql/class.sqlConfDriver.php" classname="sqlConfDriver"/>
<registry_contributions>
<external_file filename="plugins/core.conf/standard_conf_actions.xml" include="actions/*,client_configs/*" exclude=""/>
<actions>
<action name="user_team_create">
<processing>
<serverCallback methodName="userTeamsActions"/>
</processing>
</action>
<action name="user_team_add_user">
<processing>
<serverCallback methodName="userTeamsActions"/>
</processing>
</action>
<action name="user_team_edit_users">
<gui src="delete.png" iconClass="icon-edit" text="user_dash.54" title="user_dash.55">
<context dir="false" recycle="false" selection="true" actionBar="true" actionBarGroup="team_address_book"/>
<selectionContext dir="false" file="true" recycle="false" unique="true" allowedMimes="ajxp_team"/>
</gui>
<processing>
<clientCallback dialogOpenForm="team_edit_form" prepareModal="true">
<dialogOnOpen><![CDATA[
var oForm = modal.getForm();
var textA = oForm.down('#team_edit_input');
var users = ajaxplorer.getContextHolder().getUniqueNode().getMetadata().get('users').stripTags().strip();
textA.setValue(users.replace(/, /g, '\n') + '\n');
moveCaretToEnd(textA);
var completer = new AjxpUsersCompleter(
oForm.down('#team_edit_input'),
null,
oForm.down('#team_edit_container'),
{
tmpUsersPrefix:'',
usersOnly: true,
existingOnly: true,
updateUserEntryAfterCreate:null,
createUserPanel:null,
indicator: oForm.down("#team_loader"),
minChars:parseInt(ajaxplorer.getPluginConfigs("conf").get("USERS_LIST_COMPLETE_MIN_CHARS")),
afterUpdateElement: function(elem, selectedLi){
var label = selectedLi.readAttribute('data-label');
var id = selectedLi.readAttribute('data-entry_id') || selectedLi.readAttribute('data-group');
var isGroup = selectedLi.hasClassName('complete_group_entry');
var composedLabel = label + ' (' + id + ')';
var currentValue = textA.getValue().strip();
currentValue = currentValue.replace(composedLabel, id);
var users = currentValue.strip().split(new RegExp('[ ,\n]+', 'g'));
textA.setValue($A(users).uniq().join('\n') + '\n');
moveCaretToEnd(textA);
}
}
);
]]></dialogOnOpen>
<dialogOnComplete><![CDATA[
var newValues = modal.getForm().down('#team_edit_input').getValue().strip().split(new RegExp('[ ,\n]+', 'g'));
var teamId = getBaseName(ajaxplorer.getContextHolder().getUniqueNode().getPath());
var teamLabel = ajaxplorer.getContextHolder().getUniqueNode().getLabel();
console.log(teamId, newValues);
var c = new Connexion();
c.setParameters($H({
get_action:'user_team_edit_users',
team_id:teamId,
team_label:teamLabel,
'users[]':newValues
}));
c.setMethod('POST');
c.onComplete = function(t){
hideLightBox();
$('team_panel').ajxpPaneObject.reloadDataModel();
};
c.sendAsync();
]]></dialogOnComplete>
<dialogOnCancel><![CDATA[]]></dialogOnCancel>
</clientCallback>
<clientForm id="team_edit_form"><![CDATA[
<div id="team_edit_form">
<div class="dialogLegend" style="width: 400px;padding: 10px 0;">AJXP_MESSAGE[user_dash.56]</div>
<div style="position: relative;">
<div id="team_loader" style="position: absolute;top: 2px;right: 3px;font-size: 17px;display: none;"><span class="icon-spinner"></span></div>
<textarea type="text" style="width:410px; min-height: 100px;" id="team_edit_input"></textarea>
<div id="team_edit_container"></div>
</div>
</div>
]]></clientForm>
<serverCallback methodName="userTeamsActions"/>
</processing>
</action>
<action name="user_team_delete">
<gui src="delete.png" iconClass="icon-trash" text="7" title="7">
<context dir="false" recycle="false" selection="true" actionBar="true" actionBarGroup="team_address_book"/>
<selectionContext dir="false" file="true" recycle="false" unique="true" allowedMimes="ajxp_team"/>
</gui>
<processing>
<clientCallback><![CDATA[
if(window.confirm(MessageHash["user_dash.52"])){
var sel = ajaxplorer.getUserSelection().getUniqueNode();
var conn = new Connexion();
conn.setParameters($H({
get_action: "user_team_delete",
team_id: getBaseName(sel.getPath())
}));
conn.onComplete = function(){
var pane = $("team_panel").ajxpPaneObject;
pane.getCurrentContextNode().observeOnce("loaded", function(){
pane.reload();
});
pane.getCurrentContextNode().reload();
};
conn.sendAsync();
}
]]></clientCallback>
<serverCallback methodName="userTeamsActions"/>
</processing>
</action>
<action name="user_team_delete_user">
<processing>
<serverCallback methodName="userTeamsActions"/>
</processing>
</action>
</actions>
<client_configs>
<component_config className="AjxpTabulator::userdashboard_main_tab">
<additional_tab id="team_pane"
tabInfo='{"id":"team_pane","position":2,"iconClass":"icon-group","element":"team_pane","closeable":false,"label":"user_dash.50","title":"user_dash.51","dontFocus":true}'
paneInfo='{"type":"widget"}'><![CDATA[
<div id="team_pane" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height"}'>
<div id="buttons_bar" class="action_bar" ajxpClass="ActionsToolbar" ajxpOptions='{"toolbarsList":["team_address_book"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}'></div>
<h3 class="dashboard_panel_title">AJXP_MESSAGE[user_dash.50]</h3>
<div id="team_panel" ajxpClass="FetchedResultPane" ajxpOptions='{"updateGlobalContext":true,"nodeProviderProperties":{"get_action":"ls","dir":"teams"}}' class="tabbed_editor display_metadata"></div>
</div>
]]></additional_tab>
</component_config>
</client_configs>
</registry_contributions>
</confdriver>