-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
33 lines (33 loc) · 1.05 KB
/
Copy pathscript.js
File metadata and controls
33 lines (33 loc) · 1.05 KB
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
jQuery(function () {
jQuery('#sb__index__tree')
.jstree({
'plugins': [
'crrm',
'dnd',
'html_data',
'themes',
'ui',
]
})
.bind('move_node.jstree', function (e, data) {
data.rslt.o.each(function (i) {
// TODO: alphabetize
jQuery.ajax({
async: false,
type: 'POST',
url: DOKU_BASE + 'lib/plugins/sabal/ajax.php',
data: {
'action': 'move',
'id': jQuery(this).attr('id').replace('node_', ''),
'parent': data.rslt.np.attr('id').replace('node_', ''),
},
success: function (r) {
if (! r.status)
jQuery.jstree.rollback(data.rlbk);
else {
};
},
});
});
});
});