From f43781b8955b7f689a9280f72c62803d676e396d Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 20 Oct 2012 14:01:03 -0700 Subject: Clear amount field on focus --- js/bitcoin_pos.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'js') diff --git a/js/bitcoin_pos.js b/js/bitcoin_pos.js index 49bf5c14..23955a1b 100644 --- a/js/bitcoin_pos.js +++ b/js/bitcoin_pos.js @@ -58,23 +58,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) { -- cgit v1.2.3 From 42b5faa7eb2fee7761f4b5defe8b8593137257f4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 20 Oct 2012 14:21:50 -0700 Subject: Use relative sizes --- css/bitcoin_pos.css | 11 ++++++----- js/bitcoin_pos.js | 2 ++ 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'js') diff --git a/css/bitcoin_pos.css b/css/bitcoin_pos.css index b97f586d..967eb9c2 100644 --- a/css/bitcoin_pos.css +++ b/css/bitcoin_pos.css @@ -1,12 +1,13 @@ body { text-align: center; } -body, input[type="text"], span.btn { font-size: 24px; height: 30px; line-height: 24px; } -small, label { font-size: 24px; color: #999; line-height: 24px; } -strong#total { font-size: 30px; } +body { font-size: 100%; line-height: 100%; } +input[type="text"], span.btn { font-size: 1.5em; height: 1.5em; width: 5em; } +p, span { font-size: 1.5em; } +small, label { color: #999; font-size: 1.2em; } +strong#total { font-size: 2em; } input[type="submit"] { display: none; } -canvas { margin-left: 90px; } +img#banner { width: 100%; } div.container-fluid { - width: 600px; margin-left: auto; margin-right: auto; text-align:left; diff --git a/js/bitcoin_pos.js b/js/bitcoin_pos.js index 23955a1b..2486f469 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(); -- cgit v1.2.3