diff options
| author | Adam Soltys <[email protected]> | 2012-10-14 12:36:20 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2012-10-14 12:36:20 -0700 |
| commit | 0e23f43411319465776a8b1b5d788ad2db3b8178 (patch) | |
| tree | 5fbd53daacb057aa47aa5679e1072b34963cf740 | |
| parent | 2466d865492cec347c586f55a27d4f3ab6692a80 (diff) | |
| download | coinos-server-0e23f43411319465776a8b1b5d788ad2db3b8178.tar.gz coinos-server-0e23f43411319465776a8b1b5d788ad2db3b8178.zip | |
Adjust QR code size, use market depth ticker
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | index.html | 13 | ||||
| -rw-r--r-- | qr.js | 12 | ||||
| -rw-r--r-- | ticker.json | 1 |
4 files changed, 10 insertions, 18 deletions
@@ -1,3 +1,3 @@ -ticker +ticker.json transactions.csv .htpasswd @@ -58,7 +58,9 @@ } $.getJSON('ticker.json', function (data) { - exchange = data.return.last_local.value; + exchange = 100 / data.out; + exchange = exchange + exchange * 0.03; + exchange = Math.ceil(exchange * 100) / 100; $('#exchange').html(exchange); updateTotal(); }); @@ -98,13 +100,11 @@ <style> body, input { font-family: 'Arial'; font-size: 20px; } body { width: 100% } - #container { width: 50%; margin: 0px auto; } #total { font-size: 32px; } #status { color: red } </style> </head> <body> - <div id="container"> <div> $<input type="text" id="owing" value="0" size="4" /> CAD @ <span id="exchange"></span> @@ -124,10 +124,11 @@ <br /> + <canvas id="qrcanv">No Canvas Support</canvas> + + <br /> + <span id="status">Waiting for Payment</span> </div> - <div id="qrdiv"> - <canvas id="qrcanv"}>No Canvas Support? -</div> </div> </body> </html> @@ -703,24 +703,16 @@ function genframe(instring) var wd, ht, qrc; function setupqr(){ - wd = window.innerWidth-40; - ht = window.innerHeight-40; + wd = 250; + ht = 250; mp = document.getElementById("mapcanv"); - qrd = document.getElementById("qrdiv"); - qrd.style.width = wd + "px"; - qrd.style.height = ht + "px"; - - wd -= 4; - ht -= 80; - var elem = document.getElementById('qrcanv'); qrc = elem.getContext('2d'); qrc.canvas.width = wd; qrc.canvas.height = ht; qrc.fillStyle = '#eee'; qrc.fillRect(0,0,wd,ht); - } function doqr(value) { diff --git a/ticker.json b/ticker.json deleted file mode 100644 index 926e9b72..00000000 --- a/ticker.json +++ /dev/null @@ -1 +0,0 @@ -{"result":"success","return":{"high":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"low":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"avg":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"vwap":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"vol":{"value":"3.40000000","value_int":"340000000","display":"3.40000000\u00a0BTC","display_short":"3.40\u00a0BTC","currency":"BTC"},"last_local":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"last":{"value":"10.89000","value_int":"1089000","display":"CA$10.89000","display_short":"CA$10.89","currency":"CAD"},"last_orig":{"value":"11.10629","value_int":"1110629","display":"$11.10629","display_short":"$11.11","currency":"USD"},"last_all":{"value":"10.79535","value_int":"1079535","display":"CA$10.79535","display_short":"CA$10.80","currency":"CAD"},"buy":{"value":"10.64177","value_int":"1064177","display":"CA$10.64177","display_short":"CA$10.64","currency":"CAD"},"sell":{"value":"10.95000","value_int":"1095000","display":"CA$10.95000","display_short":"CA$10.95","currency":"CAD"}}}
\ No newline at end of file |
