Fehler beim Scannen der Anwesenheitsliste behoben

This commit is contained in:
Nikolaus Krondraf
2015-08-10 15:25:40 +02:00
parent 7471efa59a
commit 3c72d27e5b
+13 -7
View File
@@ -130,24 +130,30 @@ echo '<!DOCTYPE HTML>
document.getElementById("usercode").focus();
else
document.getElementById("lvcode").focus();
})
$(document).ready(function()
{
$("#t1").tablesorter(
// Tablesorter
$("#t1").tablesorter(
{
sortList: [[4,0]],
widgets: ["zebra"]
});
// Enter-Taste beim Scannen abfangen
$("#usercode").keydown(function(event) {
if (event.which == 13)
event.preventDefault();
});
});
function inputUsercode()
{
var usercode = $("#usercode").val();
if(usercode.length==13)
if(usercode.length==12)
{
var person_id = parseInt(usercode, 10);
person_id = person_id.toString();
person_id = person_id.substring(0, person_id.length - 1);
$("#img_"+person_id).attr("src","../../skin/images/false.png");
var uid = $("#uid_"+person_id).val();
$("#anwesenheit_"+uid).val("false");