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