diff options
| author | Adam Soltys <[email protected]> | 2014-08-08 07:11:56 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2014-08-08 07:11:56 -0700 |
| commit | 561ab2d01e059da44c0e5b34f5527fe946a1448c (patch) | |
| tree | 6165fcae53610081d5f7f3ba8a5b4e56a57d14fb /public/js/setup.js | |
| parent | e1464288b2f53fd4c200d64df9a085dbb0ca80b7 (diff) | |
| download | coinos-server-561ab2d01e059da44c0e5b34f5527fe946a1448c.tar.gz coinos-server-561ab2d01e059da44c0e5b34f5527fe946a1448c.zip | |
Use connect-assets for js and css
Diffstat (limited to 'public/js/setup.js')
| -rw-r--r-- | public/js/setup.js | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/public/js/setup.js b/public/js/setup.js deleted file mode 100644 index 9552e715..00000000 --- a/public/js/setup.js +++ /dev/null @@ -1,81 +0,0 @@ -(function() { - var g; - - g = typeof exports !== "undefined" && exports !== null ? exports : this; - - g.proceed = false; - - $(function() { - $('#title').focus(); - return $.getJSON("/js/rates.json", function(data) { - var currencies, user; - currencies = Object.keys(data); - currencies = currencies.sort(); - currencies.pop(); - $.each(currencies, function(i, v) { - return $('#currency').append("<option value='" + v + "'>" + v + "</option>"); - }); - $("#currency option[value='CAD']").attr('selected', 'selected'); - user = $('#username').val(); - $('#currency').change(function() { - var symbol, symbols; - $('#symbol option').remove(); - symbol = $(this).val(); - if (!symbol) { - return; - } - symbols = Object.keys(data[symbol]); - $.each(symbols, function(i, v) { - return $('#symbol').append("<option value='" + v + "'>" + v + " bid price</option>"); - }); - switch ($(this).val()) { - case 'CAD': - return $("#symbol option[value='quadrigacx']").attr('selected', 'selected'); - case 'USD': - return $("#symbol option[value='bitstamp']").attr('selected', 'selected'); - } - }).change(); - $('#title').blur(function() { - if ($(this).val() === '') { - return $(this).parent().addClass('has-error'); - } else { - return $(this).parent().removeClass('has-error'); - } - }); - $('#address').blur(function() { - if (check_address($(this).val())) { - return $(this).parent().removeClass('has-error'); - } else { - return $(this).parent().addClass('has-error'); - } - }); - $('#confirm').blur(function() { - $('#confirm_error').remove(); - if ($('#password').val() !== $('#confirm').val()) { - $('#password, #confirm').parent().addClass('has-error'); - return $('#confirm').parent().after('<div id="confirm_error" class="alert alert-danger">Passwords don\'t match</div>'); - } else { - return $('#password, #confirm').parent().removeClass('has-error'); - } - }); - $('#setup').submit(function() { - $('.form-control').blur(); - if ($('.has-error').length > 0) { - $('.has-error').effect('shake', 500); - return false; - } - }); - if (user) { - $('#setup').attr('action', "/" + user).attr('method', 'post'); - return $.getJSON("/" + user + ".json", function(data) { - $('#title').val(data.title); - $('#logo').val(data.logo); - $('#address').val(data.address); - $("#symbol option[value='" + data.symbol + "']").attr('selected', 'selected'); - return $('#commission').val(data.commission); - }); - } - }); - }); - -}).call(this); |
