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. 36
      sapl/templates/painel/voto_nominal.html

36
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>
</div>
</br> </br>
</br> </br>
</br> <center><table style="width:30%">
</br> <tr>
</br> <td style="text-align:center"><button type="button" class="btn btn-lg btn-primary" onclick="javascript:window.location.reload(true)">Atualizar</button></td>
<div id='voltar'><center><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Voltar</button></center></div> <td style="text-align:center"><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Sair</button></td>
</div> </tr>
</div> </table></center>
</form> </form>
</div> </div>
{% else %} {% else %}
@ -141,9 +139,11 @@
$(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,17 +160,15 @@
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(){
function checkTime(i) { function checkTime(i) {
if (i<10) {i = "0" + i}; // add zero in front of numbers < 10 if (i<10)
i = "0" + i; // add zero in front of numbers < 10
return i; return i;
} }
function startTime() { function startTime() {
var today=new Date(); var today=new Date();
var h=today.getHours(); var h=today.getHours();
@ -183,6 +181,8 @@
startTime() startTime()
}, 500); }, 500);
} }
$(document).ready(function(){
startTime(); startTime();
setTimeout(function() { setTimeout(function() {

Loading…
Cancel
Save