This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($("#reg-password2").val() === $("#reg-password1").val()) { | |
} else { | |
$("#register-message").show().html("Passwords do not match."); | |
$("#register-message").addClass("text-error"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user.set({stardust: res}); | |
user.save(null, { | |
success: function(){ | |
StarDust.save("user", user); | |
window.location.href = "#profile"; | |
}, | |
error: function(){ | |
$("#register-message").show().html("Error updating parse."); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var q = require('q'); | |
exports.findOrCreateDB = function (config, creds, cb) { | |
var nano = require('nano')("http://" + config.couch_admin + ":" + config.couch_password + "@" + config.couch_host + ':' + config.couch_port); | |
var users = nano.use('_users'); | |
var user = { | |
_id: "org.couchdb.user:" + creds.username, | |
name: creds.username, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.findOrCreateDB = function (config, creds, cb) { | |
var nano = require('nano')("http://" + config.couch_admin + ":" + config.couch_password + "@" + config.couch_host + ':' + config.couch_port); | |
var users = nano.use('_users'); | |
var user = { | |
_id: "org.couchdb.user:" + creds.username, | |
name: creds.username, | |
roles: [], | |
type: "user", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.home .mb-wrap { | |
padding: 20px; | |
position: relative; | |
} | |
.home .mb-wrap p{ | |
margin: 0; | |
padding: 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ADD IMAGE | |
//http://hacks.mozilla.org/2011/03/the-shortest-image-uploader-ever/ | |
var files = $('input[id = upImage]')[0].files; | |
var file = files[0]; | |
if (!file || !file.type.match(/image.*/)) return; | |
var fd = new FormData(); | |
fd.append("image", file); | |
fd.append("type", "file"); | |
fd.append("name", "test"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ADD IMAGE | |
//http://www.html5rocks.com/en/tutorials/file/dndfiles/ | |
var files = $('input[id = file]')[0].files; // FileList object | |
var fileName = $('#pretty-input').val(); | |
// Loop through the FileList | |
for (var i = 0, f; f = files[i]; i++) { | |
// Only process image files. | |
if (!f.type.match('image.*')) { | |
continue; |
NewerOlder