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
parent 4e55251c57
commit d5a9276791
1 changed files with 29 additions and 26 deletions

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) {