From 4331f041b4a98d34dac30f47d8c8762db8173c8a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 20 Oct 2012 10:20:22 -0700 Subject: Display payment received notification --- css/bitcoin_pos.css | 2 +- index.html | 14 ++++++++------ js/bitcoin_pos.js | 10 ++++++++-- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/css/bitcoin_pos.css b/css/bitcoin_pos.css index 2346ea18..b97f586d 100644 --- a/css/bitcoin_pos.css +++ b/css/bitcoin_pos.css @@ -1,5 +1,5 @@ body { text-align: center; } -body, input[type="text"], input[type="number"] { font-size: 24px; height: 30px; line-height: 24px; } +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; } input[type="submit"] { display: none; } diff --git a/index.html b/index.html index 1eb2423e..91d77cf9 100644 --- a/index.html +++ b/index.html @@ -17,21 +17,23 @@ - + CAD / BTC CAD - -

-

Please send 0.0 bitcoins to:


- +
+

Please send 0.0 bitcoins to:


+ + + No Canvas Support +
- No Canvas Support + Payment Received. Thank you! diff --git a/js/bitcoin_pos.js b/js/bitcoin_pos.js index 0ecc9264..49bf5c14 100644 --- a/js/bitcoin_pos.js +++ b/js/bitcoin_pos.js @@ -4,6 +4,8 @@ $(function() { var total = 0; var received = 0; var address = getParameterByName('address'); + + $('#received').hide(); setupqr(); @@ -33,9 +35,9 @@ $(function() { } }); - $('#status').html('Received: ' + received.toString()); if (total <= received) { - $('#status').css('color', 'green'); + $('#payment').hide(); + $('#received').fadeIn('slow'); } $.get('record_transaction.php', @@ -58,6 +60,10 @@ $(function() { $('#owing').keyup(updateTotal); $('#owing').focus(); + $('#owing').click(function() { + $('#payment').show(); + $('#received').hide(); + }); function updateTotal() { var owing = parseFloat($('#owing').val()); -- cgit v1.2.3