less stupidity

This commit is contained in:
James Campos 2011-05-15 10:23:51 -07:00
parent 5742127760
commit b00bc31097
2 changed files with 11 additions and 20 deletions

View File

@ -1760,17 +1760,13 @@
return $.after(this.parentNode, inline);
}
},
parse: function(req, id, threadID, oldInline) {
var body, html, inline, op, reply, td, _i, _len, _ref;
parse: function(req, id, threadID, inline) {
var body, clone, html, op, reply, _i, _len, _ref;
if (req.status !== 200) {
oldInline.innerHTML = "" + req.status + " " + req.statusText;
inline.innerHTML = "" + req.status + " " + req.statusText;
return;
}
inline = $.el('table', {
className: 'inline',
innerHTML: '<tbody><tr><td class=reply></td></tr></tbody>'
});
td = $('td', inline);
clone = inline.cloneNode(true);
body = $.el('body', {
innerHTML: req.responseText
});
@ -1787,8 +1783,8 @@
}
}
}
td.innerHTML = html;
return $.replace(oldInline, inline);
$('td', clone).innerHTML = html;
return $.replace(inline, clone);
}
};
quotePreview = {

View File

@ -1396,17 +1396,12 @@ quoteInline =
$.hide $.x 'ancestor::table[1]', el
else
$.after @parentNode, inline
parse: (req, id, threadID, oldInline) ->
parse: (req, id, threadID, inline) ->
if req.status isnt 200
oldInline.innerHTML = "#{req.status} #{req.statusText}"
inline.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
clone = inline.cloneNode true
body = $.el 'body',
innerHTML: req.responseText
if id == threadID #OP
@ -1417,8 +1412,8 @@ quoteInline =
if reply.id == id
html = reply.innerHTML
break
td.innerHTML = html
$.replace oldInline, inline
$('td', clone).innerHTML = html
$.replace inline, clone
quotePreview =
init: ->