aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2012-10-20 10:20:22 -0700
committerAdam Soltys <[email protected]>2012-10-20 10:20:22 -0700
commit4331f041b4a98d34dac30f47d8c8762db8173c8a (patch)
tree23db098ec04a396ff7f313fae724db500d4123e4
parentb1e7d176518d8e0c842e80b10ac227c0ae72cc8b (diff)
downloadcoinos-server-4331f041b4a98d34dac30f47d8c8762db8173c8a.tar.gz
coinos-server-4331f041b4a98d34dac30f47d8c8762db8173c8a.zip
Display payment received notification
-rw-r--r--css/bitcoin_pos.css2
-rw-r--r--index.html14
-rw-r--r--js/bitcoin_pos.js10
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 @@
<img id="banner" src="img/banner.jpg" alt="The Daily Catch" />
<label for="exchange">Exchange Rate:</label>
- <input type="number" id="exchange" value="0" disabled="disabled" />
+ <input type="text" id="exchange" value="0" disabled="disabled" />
<small>CAD / BTC</small>
<label for="owing">Amount:</label>
<input type="text" id="owing" value="0" />
<small>CAD</small>
- <input type="submit" />
-
<br /><br />
- <p>Please send <strong id="total">0.0</strong> bitcoins to:</p><br />
- <span id="address"></span>
+ <div id="payment">
+ <p>Please send <strong id="total">0.0</strong> bitcoins to:</p><br />
+ <span id="address"></span>
+
+ <canvas id="qrcanv">No Canvas Support</canvas>
+ </div>
- <canvas id="qrcanv">No Canvas Support</canvas>
+ <span id="received" class="btn btn-success">Payment Received. Thank you!</span>
</div>
</body>
</html>
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());