From 39d43f4c16d6f7eef88e0f72d663a1dd6620ae91 Mon Sep 17 00:00:00 2001 From: Talitha Pumar Date: Tue, 6 Nov 2018 15:17:11 -0200 Subject: [PATCH] =?UTF-8?q?Fix=20#1928=20-=20usar=20teclas=20para=20vota?= =?UTF-8?q?=C3=A7=C3=A3o=20(#2343)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix #1928 * Update voto_nominal.html * addd legenda no botao * Update voto_nominal.html * tira getelementbyclassname * add switch case --- sapl/templates/index.html | 9 ++++++++- sapl/templates/painel/voto_nominal.html | 26 ++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/sapl/templates/index.html b/sapl/templates/index.html index bbcfb97e2..69c53e075 100644 --- a/sapl/templates/index.html +++ b/sapl/templates/index.html @@ -192,4 +192,11 @@ -{% endblock %} \ No newline at end of file + +{% endblock %} diff --git a/sapl/templates/painel/voto_nominal.html b/sapl/templates/painel/voto_nominal.html index a1830a54a..59a6a83b3 100644 --- a/sapl/templates/painel/voto_nominal.html +++ b/sapl/templates/painel/voto_nominal.html @@ -86,7 +86,7 @@
-
+
 
  @@ -97,7 +97,7 @@


-
+
@@ -132,6 +132,26 @@ $( "#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; + switch (tecla_press) { + case 83: // 83 = valor da tecla S + document.querySelectorAll("#votosim input")[0].click(); + break; + case 78: //78 = valor da tecla N + document.querySelectorAll("#votonao input")[0].click(); + break; + case 65: //65 = valor da tecla A + document.querySelectorAll("#votoabstencao input")[0].click(); + break; + case 86: //86 = valor da tecla V + document.querySelectorAll("#voltar button")[0].click(); + break; + + }; + }); + $(document).ready( function(){ @@ -158,4 +178,4 @@ }, 30000) }); - \ No newline at end of file +