This commit is contained in:
James Campos 2011-09-05 16:28:52 -07:00
parent ce9d6efcd8
commit 97c9608619
2 changed files with 3 additions and 3 deletions

View File

@ -1524,8 +1524,8 @@
return $('textarea', QR.qr).value = '';
},
submit: function(e) {
var captcha, challenge, el, id, input, op, qr, response;
if (!($('textarea', QR.qr).value || $('[type=file]', QR.qr).files.length)) {
var captcha, challenge, el, id, input, op, qr, response, _ref;
if (!($('textarea', QR.qr).value || ((_ref = $('[type=file]', QR.qr)) != null ? _ref.files.length : void 0))) {
if (e) {
alert('Error: No text entered.');
e.preventDefault();

View File

@ -1177,7 +1177,7 @@ QR =
$('textarea', QR.qr).value = ''
submit: (e) ->
#XXX e is undefined if method is called explicitly, eg, from auto posting
unless $('textarea', QR.qr).value or $('[type=file]', QR.qr).files.length
unless $('textarea', QR.qr).value or $('[type=file]', QR.qr)?.files.length
if e
alert 'Error: No text entered.'
e.preventDefault()