Bind submit to a form by SN.U.FormXHR() only once.

This commit is contained in:
Sarven Capadisli 2009-11-28 14:27:04 +00:00 committed by Evan Prodromou
parent 42da45d3bc
commit 7164a53f85

View File

@ -131,6 +131,8 @@ var SN = { // StatusNet
},
FormXHR: function(f) {
if (jQuery.data(f[0], "ElementData") === undefined) {
jQuery.data(f[0], "ElementData", {Bind:'submit'});
f.bind('submit', function(e) {
form_id = $(this)[0].id;
$.ajax({
@ -159,6 +161,7 @@ var SN = { // StatusNet
});
return false;
});
}
},
FormNoticeXHR: function(form) {