|
|
@ -20,7 +20,12 @@ $('.register').live('click', function() { |
|
|
|
showLoggedIn(data); |
|
|
|
showLoggedIn(data); |
|
|
|
}, |
|
|
|
}, |
|
|
|
error: function(err) { |
|
|
|
error: function(err) { |
|
|
|
alert(JSON.stringify($.parseJSON(err.responseText)));
|
|
|
|
var errMsg = "To try this, you need a home server running!"; |
|
|
|
|
|
|
|
var errJson = $.parseJSON(err.responseText); |
|
|
|
|
|
|
|
if (errJson) { |
|
|
|
|
|
|
|
errMsg = JSON.stringify(errJson);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
alert(errMsg);
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -36,7 +41,12 @@ var login = function(user, password) { |
|
|
|
showLoggedIn(data); |
|
|
|
showLoggedIn(data); |
|
|
|
}, |
|
|
|
}, |
|
|
|
error: function(err) { |
|
|
|
error: function(err) { |
|
|
|
alert(JSON.stringify($.parseJSON(err.responseText)));
|
|
|
|
var errMsg = "To try this, you need a home server running!"; |
|
|
|
|
|
|
|
var errJson = $.parseJSON(err.responseText); |
|
|
|
|
|
|
|
if (errJson) { |
|
|
|
|
|
|
|
errMsg = JSON.stringify(errJson);
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
alert(errMsg);
|
|
|
|
} |
|
|
|
} |
|
|
|
});
|
|
|
|
});
|
|
|
|
}; |
|
|
|
}; |
|
|
|