Remove dummy deleted file object.

This commit is contained in:
ccd0 2015-04-12 15:49:07 -07:00
parent ede23fc5e1
commit 38cbde7da2
2 changed files with 20 additions and 16 deletions

View File

@ -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}"

View File

@ -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>
}
}