blob: 78a95af4fff9224664f478ca5c546852a5753cee (
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
|
$("#gDeveloperTools").ready(function() {
$("#gDeveloperTools").tabs();
});
var module_success = function(data) {
$("#gGenerateModule").after('<div id="moduleProgress" style="margin-left: 5.5em;"></div>');
$("#moduleProgress").progressbar();
var task = data.task;
var url = data.url;
var done = false;
while (!done) {
$.ajax({async: false,
success: function(data, textStatus) {
$("#moduleProgress").progressbar("value", data.task.percent_complete);
done = data.task.done;
},
dataType: "json",
type: "POST",
url: url
});
}
document.location.reload();
};
function ajaxify_developer_form(selector, success) {
$(selector).ajaxForm({
dataType: "json",
success: function(data) {
if (data.form && data.result != "started") {
$(selector).replaceWith(data.form);
ajaxify_developer_form(selector, success);
}
if (data.result == "started") {
success(data);
}
}
});
}
|