diff options
author | mr <mr@mrautenberg.de> | 2011-02-14 09:58:54 +0100 |
---|---|---|
committer | mr <mr@mrautenberg.de> | 2011-02-14 09:58:54 +0100 |
commit | cf3995c5b82dcd29763bfa22bfbfb4030bddef7d (patch) | |
tree | ff62e0ec87fe0a2d5d06ba4faa20001992e49b3d | |
parent | 50a06e7077681317bcf0da4fc4aa6ff36c19e4a3 (diff) |
get percentageCompleted direct from task
-rw-r--r-- | application.rb | 2 | ||||
-rwxr-xr-x | public/javascripts/toxcreate.js | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/application.rb b/application.rb index a36252b..a892c03 100644 --- a/application.rb +++ b/application.rb @@ -97,7 +97,7 @@ get '/model/:id/progress/?' do response['Content-Type'] = 'text/plain' model = ToxCreateModel.get(params[:id]) if model.task_uri - if (task = OpenTox::Task.exist?(model.task_uri)) + if (OpenTox::Task.exist?(model.task_uri)) task = OpenTox::Task.exist?(model.task_uri) percentage_completed = task.percentageCompleted end diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js index de5e73d..410778f 100755 --- a/public/javascripts/toxcreate.js +++ b/public/javascripts/toxcreate.js @@ -63,7 +63,8 @@ $(function() { checkProgress = function(id, subjectstr) { - var opts = {action: 'model/' + id + '/progress' + subjectstr, id: id}; + var task = $("input#model_" + id + "_task").attr('value'); + var opts = {action: task + "/percentageCompleted" , id: id}; var progress_changed = $.ajax({ url: opts.action, async: false, |