diff options
author | mr <mr@mrautenberg.de> | 2011-02-08 18:31:02 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-02-08 18:31:02 +0100 |
commit | ce68f6a763ce8de8957f84af4f52dbe1d74cd232 (patch) | |
tree | 28424895491d50870dc6126fc60cc01006284f55 /public/javascripts/toxcreate.js | |
parent | 076de3e6bdde29936926814409bdce4b0c7b7477 (diff) |
minor fixes and graphical progressbar from jquery-ui
Diffstat (limited to 'public/javascripts/toxcreate.js')
-rwxr-xr-x | public/javascripts/toxcreate.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js index 493168f..949b9ea 100755 --- a/public/javascripts/toxcreate.js +++ b/public/javascripts/toxcreate.js @@ -23,6 +23,7 @@ $(function() { $("body") var newstati = new Array; $.each(stati, function(){ + checkProgress(this, subjectstr); if(checkStatus(this, subjectstr) > 0) newstati.push(this); }); if (newstati.length > 0) var statusCheck = setTimeout('checkStati("' + newstati.join(", ") + '", "' + subjectstr + '")',10000); @@ -59,6 +60,31 @@ $(function() { }); return id; }; + + + checkProgress = function(id, subjectstr) { + var opts = {action: 'model/' + id + '/progress' + subjectstr, id: id}; + var progress_changed = $.ajax({ + url: opts.action, + async: false, + dataType: 'html', + data: { + '_method': 'get' + }, + success: function(data) { + var progress = data.trim(); + if (progress == "100") return -1; + + $("div#model_" + id + "_progress").progressbar("value", parseInt(progress)); + }, + error: function(data) { + id = -1; + } + }); + return id; + }; + + loadModel = function(id, view) { if(id == "") return -1; |