Revert "try to fix qr image posting"

This reverts commit 3ef9107232c995245819840672b55f59bee16761.

Can't push untested shit to master, fix added to qr topic branch.
This commit is contained in:
James Campos 2011-04-03 18:40:08 -07:00
parent 3ef9107232
commit 527182f724
2 changed files with 18 additions and 18 deletions

View File

@ -971,8 +971,8 @@
}
},
messageIframe: function(e) {
var message, _ref;
message = ((_ref = $('table font b')) != null ? _ref.firstChild.textContent : void 0) || '';
var message;
message = $('table b').firstChild.textContent;
e.source.postMessage(message, '*');
return window.location = 'about:blank';
},
@ -980,14 +980,7 @@
var data, dialog, error;
data = e.data;
dialog = $('#qr');
if (data) {
error = $.el('span', {
className: 'error',
textContent: data
});
$.append(dialog, error);
qr.autohide.unset();
} else {
if (data === 'Post successful!') {
if (dialog) {
if ($.config('Persistent QR')) {
qr.refresh(dialog);
@ -995,6 +988,13 @@
$.remove(dialog);
}
}
} else {
error = $.el('span', {
className: 'error',
textContent: data
});
$.append(dialog, error);
qr.autohide.unset();
}
return recaptchaReload();
},

View File

@ -717,25 +717,25 @@ qr =
recaptchaReload()
messageIframe: (e) ->
message = $('table font b')?.firstChild.textContent or ''
message = $('table b').firstChild.textContent
e.source.postMessage message, '*'
window.location = 'about:blank'
messageTop: (e) ->
{data} = e
dialog = $ '#qr'
if data # error message
error = $.el 'span',
className: 'error'
textContent: data
$.append dialog, error
qr.autohide.unset()
else
if data is 'Post successful!'
if dialog
if $.config 'Persistent QR'
qr.refresh dialog
else
$.remove dialog
else
error = $.el 'span',
className: 'error'
textContent: data
$.append dialog, error
qr.autohide.unset()
recaptchaReload()