move qr.persist into main

This commit is contained in:
James Campos 2011-08-06 14:04:23 -07:00
parent c6e021c309
commit 4ef9561520
2 changed files with 8 additions and 12 deletions

View File

@ -1352,12 +1352,6 @@
quote = $('a.quotejs:not(:first-child)', root);
return $.bind(quote, 'click', qr.cb.quote);
},
persist: function() {
qr.dialog();
if (conf['Auto Hide QR']) {
return $('#autohide', qr.el).checked = true;
}
},
push: function() {
this.nextSibling.textContent = qr.captcha.push({
challenge: $('#recaptcha_challenge_field', qr.el).value,
@ -2808,7 +2802,10 @@
imgPreloading.init();
}
if (conf['Quick Reply'] && conf['Persistent QR'] && canPost) {
qr.persist();
qr.dialog();
if (conf['Auto Hide QR']) {
$('#autohide', qr.el).checked = true;
}
}
if (conf['Post in Title']) {
titlePost.init();

View File

@ -970,6 +970,7 @@ qr =
# error handling
# persistent captcha
# code review
# rm Recaptcha
init: ->
g.callbacks.push qr.node
$.bind window, 'message', qr.message
@ -1094,10 +1095,6 @@ qr =
quote = $ 'a.quotejs:not(:first-child)', root
$.bind quote, 'click', qr.cb.quote
persist: ->
qr.dialog()
$('#autohide', qr.el).checked = true if conf['Auto Hide QR']
push: ->
@nextSibling.textContent = qr.captcha.push
challenge: $('#recaptcha_challenge_field', qr.el).value
@ -2215,7 +2212,9 @@ main =
imgPreloading.init()
if conf['Quick Reply'] and conf['Persistent QR'] and canPost
qr.persist()
qr.dialog()
if conf['Auto Hide QR']
$('#autohide', qr.el).checked = true
if conf['Post in Title']
titlePost.init()