forked from GNUsocial/gnu-social
Bind submit to a form by SN.U.FormXHR() only once.
This commit is contained in:
parent
42da45d3bc
commit
7164a53f85
@ -131,6 +131,8 @@ var SN = { // StatusNet
|
|||||||
},
|
},
|
||||||
|
|
||||||
FormXHR: function(f) {
|
FormXHR: function(f) {
|
||||||
|
if (jQuery.data(f[0], "ElementData") === undefined) {
|
||||||
|
jQuery.data(f[0], "ElementData", {Bind:'submit'});
|
||||||
f.bind('submit', function(e) {
|
f.bind('submit', function(e) {
|
||||||
form_id = $(this)[0].id;
|
form_id = $(this)[0].id;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -159,6 +161,7 @@ var SN = { // StatusNet
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
FormNoticeXHR: function(form) {
|
FormNoticeXHR: function(form) {
|
||||||
|
Loading…
Reference in New Issue
Block a user