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

View File

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