mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-04-10 16:05:21 -04:00
24 lines
486 B
JavaScript
24 lines
486 B
JavaScript
/**
|
|
* Ajaxify user login form
|
|
*/
|
|
function ajaxify_login_form(event) {
|
|
event.preventDefault();
|
|
$("#gLoginForm").ajaxForm({
|
|
target: "#gDialog",
|
|
success: function(responseText, statusText) {
|
|
if (!responseText) {
|
|
window.location.reload();
|
|
} else {
|
|
ajaxify_login_form(event);
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
|
|
$("document").ready(function() {
|
|
$.listen("submit", "#gLoginForm", function(event) {
|
|
ajaxify_login_form(event);
|
|
});
|
|
});
|