diff options
author | gebele <gebele@in-silico.ch> | 2017-12-12 14:51:57 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-12-12 14:51:57 +0000 |
commit | 5cd1ed2404a030ab6e09e9beb26614aab26d49cd (patch) | |
tree | ac96959b1075facc743d8db31dac5307119e9f58 /views | |
parent | f5a0d4ab14e55a72c4cb182ce0e81f599e4857ed (diff) |
extended execution rule for tasks
Diffstat (limited to 'views')
-rw-r--r-- | views/batch.haml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/views/batch.haml b/views/batch.haml index c770247..c71d056 100644 --- a/views/batch.haml +++ b/views/batch.haml @@ -125,9 +125,19 @@ :javascript var timer = #{ctimer}; $(document).ready(function(){ - markers[#{idx}] = setInterval(function(){ - renderTask('#{task}','#{model}',#{idx}); - }, timer ); + // check button class before execute a task + if (#{idx} > 0){ + markers[#{idx}] = setInterval(function(){ + var button = document.getElementById("detailsbutton_#{idx-1}"); + if(!button.classList.contains('disabled')){ + renderTask('#{task}','#{model}',#{idx}); + } + }, timer ); + }else{ + markers[#{idx}] = setInterval(function(){ + renderTask('#{task}','#{model}',#{idx}); + }, timer ); + }; }); #data-container{:id=>idx,:style=>"width:100%;"} -#pager{:id=>idx} |