blob: e6c249eb1f90d2502693536f2b86b30f5d5de0fd (
plain)
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
|
<?php
/**
* Elgg developers tool JavaScript
*/
?>
elgg.provide('elgg.dev');
elgg.dev.init = function() {
$('.developers-form-inspect').live('submit', elgg.dev.inspectSubmit);
}
/**
* Submit the inspect form through Ajax
*
* Requires the jQuery Form Plugin.
*
* @param {Object} event
*/
elgg.dev.inspectSubmit = function(event) {
$("#developers-inspect-results").hide();
$("#developers-ajax-loader").show();
$(this).ajaxSubmit({
success : function(response) {
if (response) {
$("#developers-inspect-results").html(response.output);
$("#developers-inspect-results").jstree({
"plugins" : [ "themes", "html_data" ],
"themes" : {"icons" : false}
}).bind("loaded.jstree", function() {
$("#developers-inspect-results").fadeIn();
$("#developers-ajax-loader").hide();
});
}
}
});
event.preventDefault();
}
elgg.register_hook_handler('init', 'system', elgg.dev.init);
|