qr.autoPost

This commit is contained in:
James Campos 2011-08-23 20:57:18 -07:00
parent 3a577acf86
commit 17c594e19a
2 changed files with 11 additions and 5 deletions

View File

@ -1220,9 +1220,7 @@
submit.disabled = false;
submit.value = 'Submit';
}
if (qr.el && $('#auto', qr.el).checked && !qr.postInvalid()) {
return qr.submit.call($('form', qr.el));
}
return qr.autoPost();
}
}
};
@ -1258,6 +1256,11 @@
oldFile = $('#qr_form input[type=file]', qr.el);
return $.replace(oldFile, file);
},
autoPost: function() {
if (qr.el && $('#auto', qr.el).checked && !qr.postInvalid()) {
return qr.submit.call($('form', qr.el));
}
},
captchaNode: function(e) {
var target;
if (!qr.el) {

View File

@ -960,8 +960,7 @@ cooldown =
for submit in submits
submit.disabled = false
submit.value = 'Submit'
if qr.el and $('#auto', qr.el).checked and not qr.postInvalid()
qr.submit.call $ 'form', qr.el
qr.autoPost()
qr =
# TODO
@ -995,6 +994,10 @@ qr =
oldFile = $ '#qr_form input[type=file]', qr.el
$.replace oldFile, file
autoPost: ->
if qr.el and $('#auto', qr.el).checked and not qr.postInvalid()
qr.submit.call $ 'form', qr.el
captchaNode: (e) ->
return unless qr.el
{target} = e