diff options
| author | Adam Soltys <[email protected]> | 2012-10-20 21:22:35 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2012-10-20 21:22:35 +0000 |
| commit | 533c4c0b995d2d286912b187f34a959fefb8a230 (patch) | |
| tree | e12cebfce9c33f069f1522cedd39c0698a472891 /js | |
| parent | 30372913f39981567a622355f378d161dfd0e4dd (diff) | |
| parent | 42b5faa7eb2fee7761f4b5defe8b8593137257f4 (diff) | |
| download | coinos-server-533c4c0b995d2d286912b187f34a959fefb8a230.tar.gz coinos-server-533c4c0b995d2d286912b187f34a959fefb8a230.zip | |
Merge branch 'master' of https://github.com/asoltys/bitcoin_pos
Diffstat (limited to 'js')
| -rw-r--r-- | js/bitcoin_pos.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/js/bitcoin_pos.js b/js/bitcoin_pos.js index 753f4074..6dcf49ce 100644 --- a/js/bitcoin_pos.js +++ b/js/bitcoin_pos.js @@ -6,6 +6,8 @@ $(function() { var address = getParameterByName('address'); $('#received').hide(); + $('div.container-fluid').css('width', screen.width.toString() + 'px'); + $('div.container-fluid').css('width', 600 + 'px'); setupqr(); @@ -59,23 +61,24 @@ $(function() { updateTotal(); }); - $('#owing').keyup(updateTotal); - $('#owing').focus(); - $('#owing').click(function() { + $('#amount').keyup(updateTotal); + $('#amount').focus(); + $('#amount').focus(function() { $('#payment').show(); $('#received').hide(); + $('#total').html('0'); + $(this).val(''); }); function updateTotal() { - var owing = parseFloat($('#owing').val()); - total = owing / exchange; + var amount = parseFloat($('#amount').val()); + total = amount / exchange; total = Math.ceil(total * 10000) / 10000; if (!$.isNumeric(total)) total = ''; $('#total').html(total.toString()); doqr('bitcoin:' + address + '?amount=' + total.toString()); } - $('input').click(function() { $(this).val(''); }); }); function getParameterByName(name) { |
