From 561ab2d01e059da44c0e5b34f5527fe946a1448c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 8 Aug 2014 07:11:56 -0700 Subject: Use connect-assets for js and css --- public/js/setup.js | 81 ------------------------------------------------------ 1 file changed, 81 deletions(-) delete mode 100644 public/js/setup.js (limited to 'public/js/setup.js') 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(""); - }); - $("#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(""); - }); - 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('
Passwords don\'t match
'); - } 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); -- cgit v1.2.3