QR codes for transaction data

Added qr code popup buttons for transaction data textareas.
This is useful for when transferring data to offline computers for
signing via camera scan.
This commit is contained in:
bitcoincoltd
2015-06-22 15:55:30 +07:00
parent 8fed2612d5
commit 1cd101fd9e
2 changed files with 31 additions and 6 deletions
+12 -2
View File
@@ -929,8 +929,18 @@ $(document).ready(function() {
$(".qrcodeBtn").click(function(){
$("#qrcode").html("");
var thisbtn = $(this).parent().parent();
var qrcode = new QRCode("qrcode");
qrcode.makeCode("bitcoin:"+$('.address',thisbtn).val());
if($('textarea',$(this).closest('.input-group')).length){
var qrcode = new QRCode("qrcode",{width:512,height:512});
var qrstr = $('textarea',$(this).closest('.input-group')).val();
if(qrstr.length > 2000){
$("#qrcode").html("<p>Sorry the data is too long for the QR generator.</p>");
}
}else{
var qrcode = new QRCode("qrcode");
var qrstr = "bitcoin:"+$('.address',thisbtn).val();
}
qrcode.makeCode(qrstr);
});
$('input[title!=""], abbr[title!=""]').tooltip({'placement':'bottom'});