Change postID to ID in Build.parseJSON output.
This commit is contained in:
parent
445b6fdf6f
commit
49b946199c
@ -139,7 +139,7 @@ Filter =
|
||||
isHidden: (post) ->
|
||||
!!Filter.test(post).hide
|
||||
|
||||
postID: (post) -> "#{post.ID ? post.postID}"
|
||||
postID: (post) -> "#{post.ID}"
|
||||
name: (post) -> post.info.name
|
||||
uniqueID: (post) -> post.info.uniqueID
|
||||
tripcode: (post) -> post.info.tripcode
|
||||
|
||||
@ -34,7 +34,7 @@ Build =
|
||||
parseJSON: (data, boardID) ->
|
||||
o =
|
||||
# id
|
||||
postID: data.no
|
||||
ID: data.no
|
||||
threadID: data.resto or data.no
|
||||
boardID: boardID
|
||||
isReply: !!data.resto
|
||||
@ -100,7 +100,7 @@ Build =
|
||||
Build.post o, suppressThumb
|
||||
|
||||
post: (o, suppressThumb) ->
|
||||
{postID, threadID, boardID, file} = o
|
||||
{ID, threadID, boardID, file} = o
|
||||
{subject, email, name, tripcode, capcode, uniqueID, flagCode, flag, dateUTC, dateText, commentHTML} = o.info
|
||||
{staticPath, gifIcon} = Build
|
||||
|
||||
@ -116,11 +116,11 @@ Build =
|
||||
capcodePlural = "#{capcodeLong}s"
|
||||
capcodeDescription = "a 4chan #{capcodeLong}"
|
||||
|
||||
postLink = Build.postURL boardID, threadID, postID
|
||||
postLink = Build.postURL boardID, threadID, ID
|
||||
quoteLink = if Build.sameThread boardID, threadID
|
||||
"javascript:quote('#{+postID}');"
|
||||
"javascript:quote('#{+ID}');"
|
||||
else
|
||||
"/#{boardID}/thread/#{threadID}#q#{postID}"
|
||||
"/#{boardID}/thread/#{threadID}#q#{ID}"
|
||||
|
||||
postInfo = <%= readHTML('PostInfo.html') %>
|
||||
|
||||
@ -142,7 +142,7 @@ Build =
|
||||
|
||||
container = $.el 'div',
|
||||
className: "postContainer #{postClass}Container"
|
||||
id: "pc#{postID}"
|
||||
id: "pc#{ID}"
|
||||
$.extend container, wholePost
|
||||
|
||||
# Fix quotelinks
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
?{file}{
|
||||
<div class="file" id="f${postID}">
|
||||
<div class="file" id="f${ID}">
|
||||
?{boardID === "f"}{
|
||||
<div class="fileInfo"><span class="fileText" id="fT${postID}">
|
||||
<div class="fileInfo"><span class="fileText" id="fT${ID}">
|
||||
File:
|
||||
<a data-width="${file.width}" data-height="${file.height}" href="${fileURL}" target="_blank">${file.name}</a>
|
||||
-(${file.size}, ${file.dimensions}?{file.tag}{, ${file.tag}})
|
||||
</span></div>
|
||||
}{
|
||||
<div class="fileText" id="fT${postID}"?{file.isSpoiler}{ title="${file.name}"}>
|
||||
<div class="fileText" id="fT${ID}"?{file.isSpoiler}{ title="${file.name}"}>
|
||||
File:
|
||||
<a?{file.name === shortFilename || file.isSpoiler}{}{ title="${file.name}"} href="${fileURL}" target="_blank">
|
||||
?{file.isSpoiler}{Spoiler Image}{${shortFilename}}
|
||||
@ -26,7 +26,7 @@
|
||||
</div>
|
||||
}{
|
||||
?{o.fileDeleted}{
|
||||
<div class="file" id="f${postID}">
|
||||
<div class="file" id="f${ID}">
|
||||
<span class="fileThumb">
|
||||
<img src="${staticPath}filedeleted-res${gifIcon}" alt="File deleted." class="fileDeletedRes retina">
|
||||
</span>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
?{o.isReply}{<div class="sideArrows" id="sa${postID}">>></div>}
|
||||
<div id="p${postID}" class="post ${postClass}?{o.capcodeHighlight}{ highlightPost}">
|
||||
?{o.isReply}{<div class="sideArrows" id="sa${ID}">>></div>}
|
||||
<div id="p${ID}" class="post ${postClass}?{o.capcodeHighlight}{ highlightPost}">
|
||||
?{o.isReply}{&{postInfo}&{fileBlock}}{&{fileBlock}&{postInfo}}
|
||||
<blockquote class="postMessage" id="m${postID}">&{commentHTML}</blockquote>
|
||||
<blockquote class="postMessage" id="m${ID}">&{commentHTML}</blockquote>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<div class="postInfo desktop" id="pi${postID}">
|
||||
<input type="checkbox" name="${postID}" value="delete">
|
||||
<div class="postInfo desktop" id="pi${ID}">
|
||||
<input type="checkbox" name="${ID}" value="delete">
|
||||
?{!o.isReply || boardID === "f" || subject}{<span class="subject">${subject || ""}</span> }
|
||||
<span class="nameBlock?{capcode}{ capcode${capcode}}">
|
||||
?{email}{<a href="mailto:${encodeURIComponent(email).replace(/%40/g, "@")}" class="useremail">}
|
||||
@ -15,7 +15,7 @@
|
||||
<span class="dateTime" data-utc="${dateUTC}">${dateText}</span>
|
||||
<span class="postNum?{!(boardID === "f" && !o.isReply)}{ desktop}">
|
||||
<a href="${postLink}" title="Link to this post">No.</a>
|
||||
<a href="${quoteLink}" title="Reply to this post">${postID}</a>
|
||||
<a href="${quoteLink}" title="Reply to this post">${ID}</a>
|
||||
?{o.isSticky}{ <img src="${staticPath}sticky${gifIcon}" alt="Sticky" title="Sticky" class="stickyIcon retina">}
|
||||
?{o.isClosed && !o.isArchived}{ <img src="${staticPath}closed${gifIcon}" alt="Closed" title="Closed" class="closedIcon retina">}
|
||||
?{o.isArchived}{ <img src="${staticPath}archived${gifIcon}" alt="Archived" title="Archived" class="archivedIcon retina">}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user