pull refresh out of qr.cb

This commit is contained in:
James Campos 2011-04-08 01:53:55 -07:00
parent aa7adaf40a
commit bda70f0533
2 changed files with 29 additions and 29 deletions

View File

@ -1049,21 +1049,21 @@
ta = $('textarea', dialog);
ta.focus();
return ta.value += text;
},
refresh: function(dialog) {
var auto, f, submit, _ref;
$('textarea', dialog).value = '';
$('input[name=recaptcha_response_field]', dialog).value = '';
f = $('input[type=file]', dialog).parentNode;
f.innerHTML = f.innerHTML;
submit = $('input[type=submit]', qr);
submit.value = g.sage ? 60 : 30;
submit.disabled = true;
window.setTimeout(qr.cooldown, 1000);
auto = submit.previousSibling.lastChild;
if (auto.checked) {
return (_ref = $('input[title=autohide]:checked', qr)) != null ? _ref.click() : void 0;
}
}
},
refresh: function(dialog) {
var auto, f, submit, _ref;
$('textarea', dialog).value = '';
$('input[name=recaptcha_response_field]', dialog).value = '';
f = $('input[type=file]', dialog).parentNode;
f.innerHTML = f.innerHTML;
submit = $('input[type=submit]', qr);
submit.value = g.sage ? 60 : 30;
submit.disabled = true;
window.setTimeout(qr.cooldown, 1000);
auto = submit.previousSibling.lastChild;
if (auto.checked) {
return (_ref = $('input[title=autohide]:checked', qr)) != null ? _ref.click() : void 0;
}
},
cooldown: function() {

View File

@ -779,20 +779,20 @@ qr =
ta.focus()
ta.value += text
refresh: (dialog) ->
$('textarea', dialog).value = ''
$('input[name=recaptcha_response_field]', dialog).value = ''
# XXX file.value = '' doesn't work in opera
f = $('input[type=file]', dialog).parentNode
f.innerHTML = f.innerHTML
submit = $ 'input[type=submit]', qr
submit.value = if g.sage then 60 else 30
submit.disabled = true
window.setTimeout qr.cooldown, 1000
auto = submit.previousSibling.lastChild
if auto.checked
#unhide the qr so you know it's ready for the next item
$('input[title=autohide]:checked', qr)?.click()
refresh: (dialog) ->
$('textarea', dialog).value = ''
$('input[name=recaptcha_response_field]', dialog).value = ''
# XXX file.value = '' doesn't work in opera
f = $('input[type=file]', dialog).parentNode
f.innerHTML = f.innerHTML
submit = $ 'input[type=submit]', qr
submit.value = if g.sage then 60 else 30
submit.disabled = true
window.setTimeout qr.cooldown, 1000
auto = submit.previousSibling.lastChild
if auto.checked
#unhide the qr so you know it's ready for the next item
$('input[title=autohide]:checked', qr)?.click()
cooldown: ->
submit = $ '#qr input[type=submit]'