return sooner

This commit is contained in:
James Campos 2011-05-14 10:52:04 -07:00
parent 71beb609d3
commit 4767e98271
2 changed files with 8 additions and 10 deletions

View File

@ -1746,16 +1746,15 @@
},
parse: function(req, id, threadID, oldInline) {
var body, html, inline, op, reply, td, _i, _len, _ref;
if (req.status !== 200) {
oldInline.innerHTML = "" + req.status + " " + req.statusText;
return;
}
inline = $.el('table', {
className: 'inline',
innerHTML: '<tbody><tr><td class=reply></td></tr></tbody>'
});
td = $('td', inline);
if (req.status !== 200) {
td.innerHTML = "" + req.status + " " + req.statusText;
$.replace(oldInline, inline);
return;
}
body = $.el('body', {
innerHTML: req.responseText
});

View File

@ -1387,17 +1387,16 @@ quoteInline =
g.requests[threadID] = $.get @href, (-> quoteInline.parse this, id, threadID, inline)
$.after @parentNode, inline
parse: (req, id, threadID, oldInline) ->
if req.status isnt 200
oldInline.innerHTML = "#{req.status} #{req.statusText}"
return
#this is fucking stupid
inline = $.el 'table',
className: 'inline'
innerHTML: '<tbody><tr><td class=reply></td></tr></tbody>'
td = $ 'td', inline
if req.status isnt 200
td.innerHTML = "#{req.status} #{req.statusText}"
$.replace oldInline, inline
return
body = $.el 'body',
innerHTML: req.responseText
if id == threadID #OP