Files
gallery3/themes/default/js/user.js
Bharat Mediratta b8b60df391 Rename gLogin -> gLoginForm
This disambiguates forms from blocks (for example in the comment
module we were calling both the form and block gComments).
2008-11-16 07:07:16 +00:00

31 lines
694 B
JavaScript

function show_login(url) {
$("#gLoginLink").hide();
$("#gLoginClose").show();
$.get(url, function(data) {
$("#gLoginFormContainer").html(data);
ajaxify_login_form();
});
}
function ajaxify_login_form() {
$("#gLoginMenu form ul").addClass("gInline");
$("form#gLoginForm").ajaxForm({
target: "#gLoginFormContainer",
success: function(responseText, statusText) {
if (!responseText) {
window.location.reload();
} else {
ajaxify_login_form();
}
},
});
}
function close_login() {
$("#gLoginForm").remove();
$("#gLoginClose").hide();
$("#gLoginLink").show();
$("input#gUsername").val("");
$("input#gPassword").val("");
}