fuck yeah html5

This commit is contained in:
James Campos 2011-05-04 21:45:36 -07:00
parent 33c12e20d5
commit fe06a6fcca
2 changed files with 10 additions and 27 deletions

View File

@ -1019,7 +1019,7 @@
return _results;
},
submit: function(e) {
var form, isQR, recaptcha;
var form, isQR;
form = e.target;
isQR = form.parentNode.id === 'qr';
if (isQR) {
@ -1035,19 +1035,9 @@
return;
}
}
recaptcha = $('input[name=recaptcha_response_field]', this);
if (recaptcha.value) {
qr.sage = $('input[name=email]', form).value === 'sage';
if (isQR) {
return qr.autohide.set();
}
} else {
e.preventDefault();
alert('You forgot to type in the verification.');
recaptcha.focus();
if (isQR) {
return $('#error').textContent = 'You forgot to type in the verification.';
}
qr.sage = $('input[name=email]', form).value === 'sage';
if (isQR) {
return qr.autohide.set();
}
},
quote: function(e) {
@ -1147,7 +1137,8 @@
$.append($('#qr_captcha', dialog), clone);
$.extend($('input[name=recaptcha_response_field]', clone), {
placeholder: 'Verification',
className: 'inputtext'
className: 'inputtext',
required: true
});
form = dialog.lastElementChild;
$.bind(form, 'submit', qr.cb.submit);

View File

@ -784,18 +784,9 @@ qr =
return
recaptcha = $('input[name=recaptcha_response_field]', this)
if recaptcha.value
qr.sage = $('input[name=email]', form).value == 'sage'
if isQR
qr.autohide.set()
else
e.preventDefault()
alert 'You forgot to type in the verification.'
recaptcha.focus()
if isQR
$('#error').textContent = 'You forgot to type in the verification.'
qr.sage = $('input[name=email]', form).value == 'sage'
if isQR
qr.autohide.set()
quote: (e) ->
e.preventDefault()
@ -897,6 +888,7 @@ qr =
$.extend $('input[name=recaptcha_response_field]', clone),
placeholder: 'Verification'
className: 'inputtext'
required: true
form = dialog.lastElementChild
$.bind form, 'submit', qr.cb.submit