Partial multifile support in post.kill.
This commit is contained in:
parent
194c2d3371
commit
879b982f01
@ -213,10 +213,10 @@ class Post
|
|||||||
textContent: '\u00A0(Dead)'
|
textContent: '\u00A0(Dead)'
|
||||||
className: 'qmark-dead'
|
className: 'qmark-dead'
|
||||||
|
|
||||||
kill: (file) ->
|
kill: (file, index=0) ->
|
||||||
if file
|
if file
|
||||||
return if @isDead or @file.isDead
|
return if @isDead or @files[index].isDead
|
||||||
@file.isDead = true
|
@files[index].isDead = true
|
||||||
$.addClass @nodes.root, 'deleted-file'
|
$.addClass @nodes.root, 'deleted-file'
|
||||||
else
|
else
|
||||||
return if @isDead
|
return if @isDead
|
||||||
@ -232,7 +232,7 @@ class Post
|
|||||||
|
|
||||||
return if @isClone
|
return if @isClone
|
||||||
for clone in @clones
|
for clone in @clones
|
||||||
clone.kill file
|
clone.kill file, index
|
||||||
|
|
||||||
return if file
|
return if file
|
||||||
# Get quotelinks/backlinks to this post
|
# Get quotelinks/backlinks to this post
|
||||||
@ -249,7 +249,7 @@ class Post
|
|||||||
$.rmClass @nodes.root, 'deleted-post'
|
$.rmClass @nodes.root, 'deleted-post'
|
||||||
strong = $ 'strong.warning', @nodes.info
|
strong = $ 'strong.warning', @nodes.info
|
||||||
# no false-positive files
|
# no false-positive files
|
||||||
if @file and @file.isDead
|
if @files.some((file) -> file.isDead)
|
||||||
strong.textContent = '[File deleted]'
|
strong.textContent = '[File deleted]'
|
||||||
else
|
else
|
||||||
$.rm strong
|
$.rm strong
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user