adding qr

This commit is contained in:
Yan
2017-09-13 18:38:05 +06:30
parent 807d472c01
commit 6482f05218

View File

@@ -33,7 +33,9 @@
</div>
<% end %>
<button id="member_acc_no" class="btn btn-success btn-md"><span class="fa fa-credit-card"></span> Member Card</button>
<button id="qr_code" class="btn btn-danger btn-md" data-toggle="modal" data-target="#myModal"><span class="fa fa-credit-card"></span> QR CODE</button>
<button id="qr_code" class="btn btn-danger btn-md">
<span class="fa fa-credit-card"></span> QR CODE
</button>
</td>
@@ -95,29 +97,6 @@
$(function() {
var video = document.querySelector("#videoElement");
 
navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;
 
if (navigator.getUserMedia) {      
    navigator.getUserMedia({video: true}, handleVideo, videoError);
}
 
function handleVideo(stream) {
    video.src = window.URL.createObjectURL(stream);
video.addEventListener('loadeddata', function (content) {
console.log(content);
});
// video.addEventListener('loadeddata', function() {
// console.log('Video dimensions: ' + video.videoWidth + ' x ' + video.videoHeight);
// }, false);
}
 
function videoError(e) {
    // do something
}
$('.datepicker').datepicker({
format : 'dd-mm-yyyy',
autoclose: true
@@ -138,12 +117,10 @@ $(function() {
// QR Code Reader
$("#qr_code").on('click', function(e){
var code = "";
$("#sxQRModal").show();
var code = "";
setTimeout(function(){
console.log("hi")
getQRCode();
$("#sxQRModal").hide();
console.log("hi")
getQRCode();
},100);
});
@@ -154,7 +131,7 @@ $(function() {
// get CardNo from Java
function QRCodeNo(code){
alert(code);
$("#search").val(code);
}
});