captcha-section -> captcha-root

This commit is contained in:
ccd0 2014-12-08 19:13:50 -08:00
parent fcc1a60d51
commit 0baec018e9
2 changed files with 6 additions and 6 deletions

View File

@ -1058,7 +1058,7 @@ input.field.tripped:not(:hover):not(:focus) {
#qr textarea {
resize: both;
}
#qr .captcha-section {
#qr .captcha-root {
position: relative;
}
#qr .captcha-container > div > div {

View File

@ -8,17 +8,17 @@ QR.captcha =
QR.captcha.sync captchas
$.sync 'captchas', @sync.bind @
section = $.el 'div', className: 'captcha-section'
$.extend section, <%= html(
root = $.el 'div', className: 'captcha-root'
$.extend root, <%= html(
'<div class="captcha-container"></div>' +
'<div class="captcha-counter"><a href="javascript:;"></a></div>'
) %>
container = $ '.captcha-container', section
counter = $ '.captcha-counter > a', section
container = $ '.captcha-container', root
counter = $ '.captcha-counter > a', root
@nodes = {container, counter}
@count()
$.addClass QR.nodes.el, 'has-captcha'
$.after QR.nodes.com.parentNode, section
$.after QR.nodes.com.parentNode, root
new MutationObserver(@afterSetup.bind @).observe container,
childList: true