cache on blank text / file

This commit is contained in:
James Campos 2011-08-09 05:07:05 -07:00
parent f5823f073c
commit 9c6b680d24
2 changed files with 12 additions and 10 deletions

View File

@ -1263,13 +1263,14 @@
return $('#recaptcha_challenge_field', qr.el).value = target.value; return $('#recaptcha_challenge_field', qr.el).value = target.value;
}, },
captchaKeydown: function(e) { captchaKeydown: function(e) {
if (e.keyCode === 13 && cooldown.duration) { if (e.keyCode !== 13 || (!cooldown.duration || ($('textarea', qr.el).value || $('#qr_form input[type=file]', qr.el).length))) {
$('#auto', qr.el).checked = true; return;
if (conf['Auto Hide QR']) {
$('#autohide', qr.el).checked = true;
}
return qr.captchaPush.call(this);
} }
$('#auto', qr.el).checked = true;
if (conf['Auto Hide QR']) {
$('#autohide', qr.el).checked = true;
}
return qr.captchaPush.call(this);
}, },
captchaPush: function() { captchaPush: function() {
var l; var l;

View File

@ -997,10 +997,11 @@ qr =
$('#recaptcha_challenge_field', qr.el).value = target.value $('#recaptcha_challenge_field', qr.el).value = target.value
captchaKeydown: (e) -> captchaKeydown: (e) ->
if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running return if e.keyCode isnt 13 or (!cooldown.duration or
$('#auto', qr.el).checked = true ($('textarea', qr.el).value or $('#qr_form input[type=file]', qr.el).length))
$('#autohide', qr.el).checked = true if conf['Auto Hide QR'] $('#auto', qr.el).checked = true
qr.captchaPush.call this $('#autohide', qr.el).checked = true if conf['Auto Hide QR']
qr.captchaPush.call this
captchaPush: -> captchaPush: ->
l = qr.captcha.push l = qr.captcha.push