summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-12-12 14:51:57 +0000
committergebele <gebele@in-silico.ch>2017-12-12 14:51:57 +0000
commit5cd1ed2404a030ab6e09e9beb26614aab26d49cd (patch)
treeac96959b1075facc743d8db31dac5307119e9f58
parentf5a0d4ab14e55a72c4cb182ce0e81f599e4857ed (diff)
extended execution rule for tasks
-rw-r--r--views/batch.haml16
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}