From d8b982a74c53e0944d2441b72b11e6e6984903ff Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 25 Oct 2012 23:51:15 -0700 Subject: Create setup page for adjusting/specifying calculator parameters --- js/bitcoin_pos.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'js/bitcoin_pos.js') diff --git a/js/bitcoin_pos.js b/js/bitcoin_pos.js index 9a2ac153..014732b1 100644 --- a/js/bitcoin_pos.js +++ b/js/bitcoin_pos.js @@ -1,14 +1,23 @@ $(function() { var websocket = null; + var title = getParameterByName('title'); var address = getParameterByName('address'); + var logo = getParameterByName('logo'); var exchange = 0; + if (title != "") + $('#title').html(title); + + if (logo != "") { + $('#logo').attr('src', logo).show(); + $('#title').hide(); + } + if (address == "") - window.location = 'index.html?address=1KDaKixtYqPdDNsu3fMeAHHB52R2WHvXCQ' + address = '1VAnbtCAnYccECnjaMCPnWwt81EHCVgNr' + $('#address').html(address); $('#received').hide() - $('div.container-fluid').css('width', Math.min(screen.width, 600) + 'px'); - $('#address').html(address); setupQR(); setInterval(setupSocket, 5000); @@ -29,6 +38,8 @@ $(function() { updateTotal(); }); + $('div.container-fluid').fadeIn('slow'); + function updateTotal() { var amount = parseFloat($('#amount').val()); var total = amount / exchange; -- cgit v1.2.3