diff options
| author | Adam Soltys <[email protected]> | 2015-11-28 23:57:34 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2015-11-30 21:10:59 -0800 |
| commit | 41f8c6831bb91c0b0be1219b1566e59e48673465 (patch) | |
| tree | 39626cf1a8fe7b8d73f750ccaf433bfa8c425d6b /public/js/profile.js | |
| parent | f2bff842cbe16c18923b905f70ed168096648727 (diff) | |
| download | coinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.tar.gz coinos-server-41f8c6831bb91c0b0be1219b1566e59e48673465.zip | |
Use bower, grunt and browserify instead of connect-assets
Diffstat (limited to 'public/js/profile.js')
| -rw-r--r-- | public/js/profile.js | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/public/js/profile.js b/public/js/profile.js new file mode 100644 index 00000000..d680e209 --- /dev/null +++ b/public/js/profile.js @@ -0,0 +1,41 @@ +;(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0](function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){ +(function() { + var g; + + g = typeof exports !== "undefined" && exports !== null ? exports : this; + + g.proceed = false; + + $(function() { + var user; + $('[data-toggle=popover]').popover(); + $('#title').focus(); + user = $('#username').val(); + $.getJSON("/" + user + ".json", function(data) { + $('#username').val(data.username); + $('#email').val(data.email); + return $('#profile').fadeIn(); + }); + $('#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'); + } + }); + return $('#profile').submit(function() { + $('#profile .form-control').blur(); + if ($('#profile .has-error').length > 0) { + $('#profile .has-error').effect('shake', 500); + return false; + } + }); + }); + +}).call(this); + + +},{}]},{},[1]) +;
\ No newline at end of file |
