aboutsummaryrefslogtreecommitdiffstats
path: root/public/js/index.coffee
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2012-11-14 14:31:19 -0800
committerAdam Soltys <[email protected]>2012-11-14 14:31:19 -0800
commit02b4129f6beaec8eb0ca584e4ba3aec686f43e79 (patch)
tree09a1fe6e09b8588ba4ab1f33f0e33b0cc908f21a /public/js/index.coffee
parentbb5a18653075ed57e89ce1965eccd8893d9e6458 (diff)
downloadcoinos-server-02b4129f6beaec8eb0ca584e4ba3aec686f43e79.tar.gz
coinos-server-02b4129f6beaec8eb0ca584e4ba3aec686f43e79.zip
Address validation
Diffstat (limited to 'public/js/index.coffee')
-rw-r--r--public/js/index.coffee13
1 files changed, 12 insertions, 1 deletions
diff --git a/public/js/index.coffee b/public/js/index.coffee
index d832c4ed..a5821e90 100644
--- a/public/js/index.coffee
+++ b/public/js/index.coffee
@@ -1,9 +1,20 @@
#= require jquery-1.8.2.min.js
+#= require 2.5.3-crypto-sha256.js
+#= require jsbn.js
+#= require jsbn2.js
+#= require check_address.js
$(->
symbols = ['mtgoxUSD', 'btceUSD', 'bitstampUSD', 'virwoxSLL', 'btcdeEUR', 'mtgoxEUR', 'btc24EUR', 'mtgoxAUD', 'cryptoxAUD', 'mtgoxGBP', 'btcnCNY', 'intrsngEUR', 'virtexCAD', 'mtgoxPLN', 'cbxUSD', 'bitcurexPLN', 'bitmarketEUR', 'bitfloorUSD', 'mrcdBRL', 'bcEUR']
$.each(symbols, (i, v) ->
- $('#symbol').append("<option>#{v}</option>")
+ $('#symbol').append("<option value='#{v}'>#{v}</option>")
+ )
+
+ $('#address').change(->
+ if check_address($(this).val())
+ $(this).css('color', 'black')
+ else
+ $(this).css('color', 'red')
)
)