qr.push -> qr.captchaPush

This commit is contained in:
James Campos 2011-08-06 20:06:36 -07:00
parent b6866992fb
commit 0ea0b43f38
2 changed files with 20 additions and 21 deletions

View File

@ -1278,9 +1278,19 @@
if (conf['Auto Hide QR']) {
$('#autohide', qr.el).checked = true;
}
return qr.push.call(this);
return qr.captchaPush.call(this);
}
},
captchaPush: function() {
var l;
l = qr.captcha.push({
challenge: $('#recaptcha_challenge_field', qr.el).value,
response: this.value
});
this.nextSibling.textContent = l + ' captcha cached';
Recaptcha.reload();
return this.value = '';
},
close: function() {
$.rm(qr.el);
return qr.el = null;
@ -1350,16 +1360,6 @@
quote = $('a.quotejs:not(:first-child)', root);
return $.bind(quote, 'click', qr.quote);
},
push: function() {
var l;
l = qr.captcha.push({
challenge: $('#recaptcha_challenge_field', qr.el).value,
response: this.value
});
this.nextSibling.textContent = l + ' captcha cached';
Recaptcha.reload();
return this.value = '';
},
quote: function(e) {
var id, s, selection, selectionID, ta, text, _ref;
if (e) {

View File

@ -971,7 +971,6 @@ qr =
# rm Recaptcha
# group captcha
# error too large error should happen on attach
# attaching = persistent qr
init: ->
g.callbacks.push qr.node
$.bind window, 'message', qr.message
@ -1011,7 +1010,15 @@ qr =
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.push.call this
qr.captchaPush.call this
captchaPush: ->
l = qr.captcha.push
challenge: $('#recaptcha_challenge_field', qr.el).value
response: @value
@nextSibling.textContent = l + ' captcha cached'
Recaptcha.reload()
@value = ''
close: ->
$.rm qr.el
@ -1094,14 +1101,6 @@ qr =
quote = $ 'a.quotejs:not(:first-child)', root
$.bind quote, 'click', qr.quote
push: ->
l = qr.captcha.push
challenge: $('#recaptcha_challenge_field', qr.el).value
response: @value
@nextSibling.textContent = l + ' captcha cached'
Recaptcha.reload()
@value = ''
quote: (e) ->
e.preventDefault() if e