From 91121a442b9ae73a674c85d04c05e8d7390ac801 Mon Sep 17 00:00:00 2001 From: Cesar Carvalho Date: Fri, 14 Jun 2019 11:02:04 -0300 Subject: [PATCH] =?UTF-8?q?Disparo=20pr=C3=A9vio=20do=20cron=C3=B4metro=20?= =?UTF-8?q?configur=C3=A1vel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/templates/painel/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sapl/templates/painel/index.html b/sapl/templates/painel/index.html index 1d0d58844..db25c62b5 100644 --- a/sapl/templates/painel/index.html +++ b/sapl/templates/painel/index.html @@ -178,6 +178,10 @@ }) {% endfor %} + var tempo_disparo_antecedencia = "{{ painel_config.tempo_disparo_antecedencia }}" + let tmp = tempo_disparo_antecedencia.split(":"); + tempo_disparo_antecedencia = checkTime(parseInt(tmp[0])) + ":" + checkTime(parseInt(tmp[1])) + ":" + checkTime(parseInt(tmp[2])); + var counter = 1; (function poll() { $.ajax({ @@ -296,8 +300,10 @@ cronometros_previous[i] = status_cronometros[i]; } - if($('#cronometro_' + ids[i]).runner('info').formattedTime == 30) + if($('#cronometro_' + ids[i]).runner('info').formattedTime == tempo_disparo_antecedencia && + "{{ painel_config.disparo_cronometro }}" == "True" ) audioAlertFinish.play(); + } if(data['sessao_finalizada']){