trying to post during cooldown will enable auto-post

This commit is contained in:
James Campos 2011-06-22 00:23:04 -07:00
parent 986329dab0
commit 9b826fb514
2 changed files with 9 additions and 2 deletions

View File

@ -2272,7 +2272,11 @@
},
listener: function(e) {
if (e.keyCode === 8 && this.value === '') {
return Recaptcha.reload();
Recaptcha.reload();
}
if (e.keyCode === 13 && cooldown.duration) {
$('#auto').checked = true;
return qr.autohide.set();
}
},
reload: function() {

View File

@ -1717,8 +1717,11 @@ Recaptcha =
if recaptcha = $ '#recaptcha_response_field' #NoScript
$.bind recaptcha, 'keydown', Recaptcha.listener
listener: (e) ->
if e.keyCode is 8 and @value is ''
if e.keyCode is 8 and @value is '' # backspace to reload
Recaptcha.reload()
if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running
$('#auto').checked = true
qr.autohide.set()
reload: ->
window.location = 'javascript:Recaptcha.reload()'