Some more accuracies.

This commit is contained in:
Nicolas Stepien 2012-09-15 04:57:07 +02:00
parent 7ea4a52433
commit 0ae9bf2813
2 changed files with 10 additions and 6 deletions

View File

@ -749,15 +749,15 @@
} }
} }
this.isReply = $.hasClass(post, 'reply'); this.isReply = $.hasClass(post, 'reply');
this.clones = [];
g.posts["" + board + "." + this] = thread.posts[this] = board.posts[this] = this;
if (that.isArchived) { if (that.isArchived) {
this.kill(); this.kill();
} }
this.clones = [];
g.posts["" + board + "." + this] = thread.posts[this] = board.posts[this] = this;
} }
Post.prototype.kill = function(img) { Post.prototype.kill = function(img) {
var ID, num, post, quote, quotelink, quotelinks, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3; var ID, board, num, post, postID, quote, quotelink, quotelinks, _i, _j, _k, _l, _len, _len1, _len2, _len3, _ref, _ref1, _ref2, _ref3, _ref4;
if (this.file && !this.file.isDead) { if (this.file && !this.file.isDead) {
this.file.isDead = true; this.file.isDead = true;
} }
@ -796,8 +796,10 @@
if ($.hasClass(quotelink, 'deadlink')) { if ($.hasClass(quotelink, 'deadlink')) {
continue; continue;
} }
if (Get.postDataFromLink(quotelink).postID === this.ID) { _ref4 = Get.postDataFromLink(quotelink), board = _ref4.board, postID = _ref4.postID;
if (board === this.board.ID(postID === this.ID)) {
$.add(quotelink, $.tn('\u00A0(Dead)')); $.add(quotelink, $.tn('\u00A0(Dead)'));
$.addClass(quotelinks, 'deadlink');
} }
} }
}; };

View File

@ -598,9 +598,9 @@ class Post
@file.dimensions = @file.text.textContent.match(/\d+x\d+/)[0] @file.dimensions = @file.text.textContent.match(/\d+x\d+/)[0]
@isReply = $.hasClass post, 'reply' @isReply = $.hasClass post, 'reply'
@kill() if that.isArchived
@clones = [] @clones = []
g.posts["#{board}.#{@}"] = thread.posts[@] = board.posts[@] = @ g.posts["#{board}.#{@}"] = thread.posts[@] = board.posts[@] = @
@kill() if that.isArchived
kill: (img) -> kill: (img) ->
if @file and !@file.isDead if @file and !@file.isDead
@ -637,8 +637,10 @@ class Post
quotelinks.push.apply quotelinks, Array::slice.call post.nodes.backlinks quotelinks.push.apply quotelinks, Array::slice.call post.nodes.backlinks
for quotelink in quotelinks for quotelink in quotelinks
continue if $.hasClass quotelink, 'deadlink' continue if $.hasClass quotelink, 'deadlink'
if Get.postDataFromLink(quotelink).postID is @ID {board, postID} = Get.postDataFromLink quotelink
if board is @board.ID postID is @ID
$.add quotelink, $.tn '\u00A0(Dead)' $.add quotelink, $.tn '\u00A0(Dead)'
$.addClass quotelinks, 'deadlink'
return return
addClone: (context) -> addClone: (context) ->
new Clone @, context new Clone @, context