Remove dummy deleted file object.
This commit is contained in:
parent
ede23fc5e1
commit
38cbde7da2
@ -48,11 +48,10 @@ Build =
|
||||
isSticky: !!data.sticky
|
||||
isClosed: !!data.closed
|
||||
isArchived: !!data.archived
|
||||
# file
|
||||
if data.filedeleted
|
||||
o.file =
|
||||
isDeleted: true
|
||||
else if data.ext
|
||||
# file status
|
||||
fileDeleted: !!data.filedeleted
|
||||
# file
|
||||
if data.ext
|
||||
o.file =
|
||||
name: (Build.unescape data.filename) + data.ext
|
||||
timestamp: "#{data.tim}#{data.ext}"
|
||||
@ -68,7 +67,6 @@ Build =
|
||||
theight: data.tn_h
|
||||
twidth: data.tn_w
|
||||
isSpoiler: !!data.spoiler
|
||||
isDeleted: false
|
||||
tag: data.tag
|
||||
Build.post o, suppressThumb
|
||||
post: (o, suppressThumb) ->
|
||||
@ -80,7 +78,7 @@ Build =
|
||||
postID, threadID, boardID
|
||||
name, capcode, tripcode, uniqueID, email, subject, flagCode, flagName, date, dateUTC
|
||||
comment
|
||||
file
|
||||
file, fileDeleted
|
||||
} = o
|
||||
name or= ''
|
||||
subject or= ''
|
||||
@ -111,7 +109,7 @@ Build =
|
||||
|
||||
### File Info ###
|
||||
|
||||
if file and not file.isDeleted
|
||||
if file
|
||||
shortFilename = Build.shortFilename file.name
|
||||
fileSize = $.bytesToString file.size
|
||||
fileDims = if file.url[-4..] is '.pdf' then 'PDF' else "#{file.width}x#{file.height}"
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
?{file}{<div class="file" id="f${postID}">
|
||||
?{file.isDeleted}{
|
||||
<span class="fileThumb">
|
||||
<img src="${staticPath}filedeleted-res${gifIcon}" alt="File deleted." class="fileDeletedRes retina">
|
||||
</span>
|
||||
}{?{boardID === "f"}{
|
||||
?{file}{
|
||||
<div class="file" id="f${postID}">
|
||||
?{boardID === "f"}{
|
||||
<div class="fileInfo"><span class="fileText" id="fT${postID}">
|
||||
File:
|
||||
<a data-width="${file.width}" data-height="${file.height}" href="${file.url}" target="_blank">${file.name}</a>
|
||||
@ -25,5 +22,14 @@
|
||||
style="height: ${file.isSpoiler ? 100 : file.theight}px; width: ${file.isSpoiler ? 100 : file.twidth}px;"
|
||||
>
|
||||
</a>
|
||||
}}
|
||||
</div>}
|
||||
}
|
||||
</div>
|
||||
}{
|
||||
?{fileDeleted}{
|
||||
<div class="file" id="f${postID}">
|
||||
<span class="fileThumb">
|
||||
<img src="${staticPath}filedeleted-res${gifIcon}" alt="File deleted." class="fileDeletedRes retina">
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user