1
0
This repository has been archived on 2021-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
gallery3-contrib/modules/developer/js/developer.js
Bharat Mediratta 4d1252870b Create gallery3-contrib hierarchy. Move atom, developer, polar_rose
and gmaps modules in here to start using svn export.

Move atom, devel
2009-03-15 22:21:15 +00:00

40 lines
994 B
JavaScript

$("#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);
}
}
});
}