aboutsummaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2012-10-25 23:51:15 -0700
committerAdam Soltys <[email protected]>2012-10-25 23:51:15 -0700
commitd8b982a74c53e0944d2441b72b11e6e6984903ff (patch)
tree1b3738739a4c99ea3e4cd7dfef238fd3cd27dd08 /js
parentce8c0d58ce8b5e4102be7b89cfbe38a61e030d21 (diff)
downloadcoinos-server-d8b982a74c53e0944d2441b72b11e6e6984903ff.tar.gz
coinos-server-d8b982a74c53e0944d2441b72b11e6e6984903ff.zip
Create setup page for adjusting/specifying calculator parameters
Diffstat (limited to 'js')
-rw-r--r--js/bitcoin_pos.js17
-rw-r--r--js/report.js2
2 files changed, 15 insertions, 4 deletions
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;
diff --git a/js/report.js b/js/report.js
index 6cacf077..a470f348 100644
--- a/js/report.js
+++ b/js/report.js
@@ -1,5 +1,5 @@
$(function() {
- $('#date').datepicker();
+ $('.date').datepicker();
$.getJSON('transactions.json', function(data) {
$.each(data.transactions, function() {