rm qr.autohide

This commit is contained in:
James Campos 2011-08-06 13:56:11 -07:00
parent d8d1be587d
commit c6e021c309
2 changed files with 10 additions and 24 deletions

View File

@ -1261,14 +1261,6 @@
} }
return qr.submit.call($('form', qr.el)); return qr.submit.call($('form', qr.el));
}, },
autohide: {
set: function() {
return $('#autohide', qr.el).checked = true;
},
unset: function() {
return $('#autohide', qr.el).checked = false;
}
},
captchaNode: function(e) { captchaNode: function(e) {
var target; var target;
if (!qr.el) { if (!qr.el) {
@ -1282,7 +1274,7 @@
if (e.keyCode === 13 && cooldown.duration) { if (e.keyCode === 13 && cooldown.duration) {
$('#auto', qr.el).checked = true; $('#auto', qr.el).checked = true;
if (conf['Auto Hide QR']) { if (conf['Auto Hide QR']) {
qr.autohide.set(); $('#autohide', qr.el).checked = true;
} }
return qr.push.call(this); return qr.push.call(this);
} }
@ -1331,7 +1323,7 @@
data = JSON.parse(data); data = JSON.parse(data);
$.extend($('#error', qr.el), data); $.extend($('#error', qr.el), data);
$('#recaptcha_response_field', qr.el).value = ''; $('#recaptcha_response_field', qr.el).value = '';
qr.autohide.unset(); $('#autohide', qr.el).checked = false;
if (data.textContent === 'You seem to have mistyped the verification.') { if (data.textContent === 'You seem to have mistyped the verification.') {
qr.auto(); qr.auto();
} }
@ -1363,7 +1355,7 @@
persist: function() { persist: function() {
qr.dialog(); qr.dialog();
if (conf['Auto Hide QR']) { if (conf['Auto Hide QR']) {
return qr.autohide.set(); return $('#autohide', qr.el).checked = true;
} }
}, },
push: function() { push: function() {
@ -1377,7 +1369,7 @@
quote: function(link) { quote: function(link) {
var id, s, selection, selectionID, ta, text, _ref; var id, s, selection, selectionID, ta, text, _ref;
if (qr.el) { if (qr.el) {
qr.autohide.unset(); $('#autohide', qr.el).checked = false;
} else { } else {
qr.dialog(link); qr.dialog(link);
} }
@ -1435,7 +1427,7 @@
} }
$('#error', qr.el).textContent = ''; $('#error', qr.el).textContent = '';
if (conf['Auto Hide QR']) { if (conf['Auto Hide QR']) {
qr.autohide.set(); $('#autohide', qr.el).checked = true;
} }
return qr.sage = /sage/i.test($('input[name=email]', this).value); return qr.sage = /sage/i.test($('input[name=email]', this).value);
} }

View File

@ -998,12 +998,6 @@ qr =
responseField.nextSibling.textContent = qr.captcha.length responseField.nextSibling.textContent = qr.captcha.length
qr.submit.call $ 'form', qr.el qr.submit.call $ 'form', qr.el
autohide:
set: ->
$('#autohide', qr.el).checked = true
unset: ->
$('#autohide', qr.el).checked = false
captchaNode: (e) -> captchaNode: (e) ->
return unless qr.el return unless qr.el
{target} = e {target} = e
@ -1013,7 +1007,7 @@ qr =
captchaKeydown: (e) -> captchaKeydown: (e) ->
if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running if e.keyCode is 13 and cooldown.duration # press enter to enable auto-post if cooldown is still running
$('#auto', qr.el).checked = true $('#auto', qr.el).checked = true
qr.autohide.set() if conf['Auto Hide QR'] $('#autohide', qr.el).checked = true if conf['Auto Hide QR']
qr.push.call this qr.push.call this
cb: cb:
@ -1077,7 +1071,7 @@ qr =
data = JSON.parse data data = JSON.parse data
$.extend $('#error', qr.el), data $.extend $('#error', qr.el), data
$('#recaptcha_response_field', qr.el).value = '' $('#recaptcha_response_field', qr.el).value = ''
qr.autohide.unset() $('#autohide', qr.el).checked = false
if data.textContent is 'You seem to have mistyped the verification.' if data.textContent is 'You seem to have mistyped the verification.'
qr.auto() qr.auto()
return return
@ -1102,7 +1096,7 @@ qr =
persist: -> persist: ->
qr.dialog() qr.dialog()
qr.autohide.set() if conf['Auto Hide QR'] $('#autohide', qr.el).checked = true if conf['Auto Hide QR']
push: -> push: ->
@nextSibling.textContent = qr.captcha.push @nextSibling.textContent = qr.captcha.push
@ -1113,7 +1107,7 @@ qr =
quote: (link) -> quote: (link) ->
if qr.el if qr.el
qr.autohide.unset() $('#autohide', qr.el).checked = false
else else
qr.dialog link qr.dialog link
@ -1163,7 +1157,7 @@ qr =
else if isQR else if isQR
if !e then @submit() if !e then @submit()
$('#error', qr.el).textContent = '' $('#error', qr.el).textContent = ''
qr.autohide.set() if conf['Auto Hide QR'] $('#autohide', qr.el).checked = true if conf['Auto Hide QR']
qr.sage = /sage/i.test $('input[name=email]', @).value qr.sage = /sage/i.test $('input[name=email]', @).value
sys: -> sys: ->