remove auto (did anyone use it?)

This commit is contained in:
James Campos 2011-03-30 15:44:46 -07:00
parent bc172fdbc8
commit 540f6326db
2 changed files with 5 additions and 39 deletions

View File

@ -1052,7 +1052,7 @@
return ta.value += text; return ta.value += text;
}, },
refresh: function(dialog) { refresh: function(dialog) {
var auto, f, submit, _ref; var f, submit;
$('textarea', dialog).value = ''; $('textarea', dialog).value = '';
$('input[name=recaptcha_response_field]', dialog).value = ''; $('input[name=recaptcha_response_field]', dialog).value = '';
f = $('input[type=file]', dialog).parentNode; f = $('input[type=file]', dialog).parentNode;
@ -1060,31 +1060,23 @@
submit = $('input[type=submit]', qr); submit = $('input[type=submit]', qr);
submit.value = g.sage ? 60 : 30; submit.value = g.sage ? 60 : 30;
submit.disabled = true; submit.disabled = true;
window.setTimeout(qr.cooldown, 1000); return 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() { cooldown: function() {
var auto, seconds, submit; var seconds, submit;
submit = $('#qr input[type=submit]'); submit = $('#qr input[type=submit]');
seconds = parseInt(submit.value); seconds = parseInt(submit.value);
if (seconds === 0) { if (seconds === 0) {
submit.disabled = false; submit.disabled = false;
submit.value = 'Submit'; return submit.value = 'Submit';
auto = submit.previousSibling.lastChild;
if (auto.checked) {
return $('#qr form').submit();
}
} else { } else {
submit.value = seconds - 1; submit.value = seconds - 1;
return window.setTimeout(qr.cooldown, 1000); return window.setTimeout(qr.cooldown, 1000);
} }
}, },
dialog: function(link) { dialog: function(link) {
var auto, autobox, clone, dialog, el, html, input, script, submit, xpath, _i, _len, _ref; var clone, dialog, el, html, input, script, xpath, _i, _len, _ref;
html = "<div class=move>Quick Reply <input type=checkbox title=autohide> <a name=close title=close>X</a></div>"; html = "<div class=move>Quick Reply <input type=checkbox title=autohide> <a name=close title=close>X</a></div>";
dialog = ui.dialog('qr', { dialog = ui.dialog('qr', {
top: '0px', top: '0px',
@ -1109,16 +1101,6 @@
value: $.x(xpath, link).name value: $.x(xpath, link).name
}); });
$.append(clone, input); $.append(clone, input);
} else if ($.config('Persistent QR')) {
submit = $('input[type=submit]', clone);
auto = $.el('label', {
textContent: 'Auto'
});
autobox = $.el('input', {
type: 'checkbox'
});
$.append(auto, autobox);
$.before(submit, auto);
} }
$.append(dialog, clone); $.append(dialog, clone);
$.append(d.body, dialog); $.append(d.body, dialog);

View File

@ -790,10 +790,6 @@ qr =
submit.value = if g.sage then 60 else 30 submit.value = if g.sage then 60 else 30
submit.disabled = true submit.disabled = true
window.setTimeout qr.cooldown, 1000 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: -> cooldown: ->
submit = $ '#qr input[type=submit]' submit = $ '#qr input[type=submit]'
@ -801,10 +797,6 @@ qr =
if seconds == 0 if seconds == 0
submit.disabled = false submit.disabled = false
submit.value = 'Submit' submit.value = 'Submit'
auto = submit.previousSibling.lastChild
if auto.checked
$('#qr form').submit()
#submit.click() doesn't work
else else
submit.value = seconds - 1 submit.value = seconds - 1
window.setTimeout qr.cooldown, 1000 window.setTimeout qr.cooldown, 1000
@ -830,14 +822,6 @@ qr =
name: 'resto' name: 'resto'
value: $.x(xpath, link).name value: $.x(xpath, link).name
$.append clone, input $.append clone, input
else if $.config 'Persistent QR'
submit = $ 'input[type=submit]', clone
auto = $.el 'label',
textContent: 'Auto'
autobox = $.el 'input',
type: 'checkbox'
$.append auto, autobox
$.before submit, auto
$.append dialog, clone $.append dialog, clone
$.append d.body, dialog $.append d.body, dialog