Fix inlining posts keeping its quotes inlined.

This commit is contained in:
Nicolas Stepien 2012-06-24 00:31:36 +02:00
parent 2f6e5f2443
commit 6db82634e5
2 changed files with 20 additions and 4 deletions

View File

@ -3318,7 +3318,7 @@
}
},
cleanPost: function(root) {
var child, el, now, post, _i, _j, _len, _len1, _ref, _ref1;
var child, el, inline, inlined, now, post, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3;
post = $('.post', root);
_ref = Array.prototype.slice.call(root.childNodes);
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@ -3327,10 +3327,20 @@
$.rm(child);
}
}
now = Date.now();
_ref1 = $$('[id]', root);
_ref1 = $$('.inline', post);
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
el = _ref1[_j];
inline = _ref1[_j];
$.rm(inline);
}
_ref2 = $$('.inlined', post);
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
inlined = _ref2[_k];
$.rmClass(inlined, 'inlined');
}
now = Date.now();
_ref3 = $$('[id]', root);
for (_l = 0, _len3 = _ref3.length; _l < _len3; _l++) {
el = _ref3[_l];
el.id = "" + now + "_" + el.id;
}
$.rmClass(root, 'forwarded');

View File

@ -2606,6 +2606,12 @@ Get =
for child in Array::slice.call root.childNodes
$.rm child unless child is post
# Remove inlined posts inside of this post.
for inline in $$ '.inline', post
$.rm inline
for inlined in $$ '.inlined', post
$.rmClass inlined, 'inlined'
# Don't mess with other features
now = Date.now()
for el in $$ '[id]', root