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 />
<form method='POST'>
{% csrf_token %}
<div class="row container-detail clearfix" style="text-align:center">
<div class="row">
<div class="row" align="center">
<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>
&nbsp;
<div id="votonao"><input type="submit" class="btn btn-lg btn-danger" id="voto" name="voto" type="submit" value="Não"/></div>
&nbsp;
<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>
<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>
</div>
{% else %}
@ -141,9 +139,11 @@
$(window).on('beforeunload', function () {
$("input[type=submit], input[type=button]").prop("disabled", "disabled");
});
$( "#votosim" ).mouseleave(function(){document.location.reload(true);});
$( "#votonao" ).mouseleave(function(){document.location.reload(true);});
$( "#votoabstencao" ).mouseleave(function(){document.location.reload(true);});
//TODO: Este código é necessário?
// $( "#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) => {
var tecla_press = e.keyCode;
@ -160,17 +160,15 @@
case 86: //86 = valor da tecla V
document.querySelectorAll("#voltar button")[0].click();
break;
};
});
$(document).ready(
function(){
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;
}
function startTime() {
var today=new Date();
var h=today.getHours();
@ -183,6 +181,8 @@
startTime()
}, 500);
}
$(document).ready(function(){
startTime();
setTimeout(function() {

Loading…
Cancel
Save