Browse Source

HOT-FIX: Melhora HTML de voto nominal (#2858)

pull/2862/head
Cesar Augusto de Carvalho 6 years ago
committed by Edward
parent
commit
d473a21f1f
  1. 94
      sapl/templates/painel/voto_nominal.html

94
sapl/templates/painel/voto_nominal.html

@ -90,25 +90,23 @@
<br /><br /> <br /><br />
<form method='POST'> <form method='POST'>
{% csrf_token %} {% csrf_token %}
<div class="row container-detail clearfix" style="text-align:center"> <div class="row" align="center">
<div class="row">
<div class="col-md-12" id="votos"> <div class="col-md-12" id="votos">
<div id="votosim"><input type="submit" class="btn btn-lg btn-success" id="voto" name="voto" type="submit" value="Sim" /></div>
<div id="votosim"><input type="submit" class="btn btn-lg btn-success" id="voto" name="voto" type="submit" value="Sim" /></div> &nbsp;
&nbsp; <div id="votonao"><input type="submit" class="btn btn-lg btn-danger" id="voto" name="voto" type="submit" value="Não"/></div>
<div id="votonao"><input type="submit" class="btn btn-lg btn-danger" id="voto" name="voto" type="submit" value="Não"/></div> &nbsp;
&nbsp; <div id="votoabstencao"><input type="submit" class="btn btn-lg btn-secondary" id="voto" name="voto" type="submit" value="Abstenção"/></div>
<div id="votoabstencao"><input type="submit" class="btn btn-lg btn-secondary" id="voto" name="voto" type="submit" value="Abstenção"/></div>
</div> </div>
</br>
</br>
</br>
</br>
</br>
<div id='voltar'><center><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Voltar</button></center></div>
</div> </div>
</div> </br>
</br>
<center><table style="width:30%">
<tr>
<td style="text-align:center"><button type="button" class="btn btn-lg btn-primary" onclick="javascript:window.location.reload(true)">Atualizar</button></td>
<td style="text-align:center"><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Sair</button></td>
</tr>
</table></center>
</form> </form>
</div> </div>
{% else %} {% else %}
@ -139,11 +137,13 @@
document.getElementById("date").innerHTML = n; document.getElementById("date").innerHTML = n;
$(window).on('beforeunload', function () { $(window).on('beforeunload', function () {
$("input[type=submit], input[type=button]").prop("disabled", "disabled"); $("input[type=submit], input[type=button]").prop("disabled", "disabled");
}); });
$( "#votosim" ).mouseleave(function(){document.location.reload(true);});
$( "#votonao" ).mouseleave(function(){document.location.reload(true);}); //TODO: Este código é necessário?
$( "#votoabstencao" ).mouseleave(function(){document.location.reload(true);}); // $( "#votosim" ).mouseleave(function(){document.location.reload(true);});
// $( "#votonao" ).mouseleave(function(){document.location.reload(true);});
// $( "#votoabstencao" ).mouseleave(function(){document.location.reload(true);});
$(document).on('keyup', (e) => { $(document).on('keyup', (e) => {
var tecla_press = e.keyCode; var tecla_press = e.keyCode;
@ -160,34 +160,34 @@
case 86: //86 = valor da tecla V case 86: //86 = valor da tecla V
document.querySelectorAll("#voltar button")[0].click(); document.querySelectorAll("#voltar button")[0].click();
break; break;
}; };
}); });
$(document).ready( function checkTime(i) {
function(){ if (i<10)
i = "0" + i; // add zero in front of numbers < 10
function checkTime(i) { return i;
if (i<10) {i = "0" + i}; // add zero in front of numbers < 10 }
return i;
} function startTime() {
function startTime() { var today=new Date();
var today=new Date(); var h=today.getHours();
var h=today.getHours(); var m=today.getMinutes();
var m=today.getMinutes(); var s=today.getSeconds();
var s=today.getSeconds(); m = checkTime(m);
m = checkTime(m); s = checkTime(s);
s = checkTime(s); $("#relogio").text(h+":"+m+":"+s)
$("#relogio").text(h+":"+m+":"+s) var t = setTimeout(function(){
var t = setTimeout(function(){ startTime()
startTime() }, 500);
}, 500); }
}
startTime(); $(document).ready(function(){
startTime();
setTimeout(function() {
document.location.reload(true); setTimeout(function() {
}, 30000) document.location.reload(true);
}); }, 30000)
});
</script> </script>

Loading…
Cancel
Save