Fix some post tiny building bugs.

This commit is contained in:
Nicolas Stepien 2013-02-28 05:01:17 +01:00
parent cbd28083d5
commit bb3c25b415
2 changed files with 6 additions and 8 deletions

View File

@ -1300,7 +1300,6 @@
thread = _ref2[ID];
for (ID in thread) {
post = thread[ID];
$.log(post);
hiddenNum++;
}
}
@ -3265,7 +3264,7 @@
capcodeStart = '';
capcode = '';
}
flag = flagCode ? (" <img src='" + staticPath + "/image/country/" + (board === 'pol' ? 'troll/' : '')) + flagCode.toLowerCase() + (".gif' alt=" + flagCode + " title='" + flagName + "' class=countryFlag>") : '';
flag = flagCode ? (" <img src='" + staticPath + "/image/country/" + (board.ID === 'pol' ? 'troll/' : '')) + flagCode.toLowerCase() + (".gif' alt=" + flagCode + " title='" + flagName + "' class=countryFlag>") : '';
if (file != null ? file.isDeleted : void 0) {
fileHTML = isOP ? ("<div id=f" + postID + " class=file><div class=fileInfo></div><span class=fileThumb>") + ("<img src='" + staticPath + "/image/filedeleted.gif' alt='File deleted.' class='fileDeleted retina'>") + "</span></div>" : ("<div id=f" + postID + " class=file><span class=fileThumb>") + ("<img src='" + staticPath + "/image/filedeleted-res.gif' alt='File deleted.' class='fileDeletedRes retina'>") + "</span></div>";
} else if (file) {
@ -3287,7 +3286,7 @@
file.twidth = file.theight = 100;
}
}
if (board !== 'f') {
if (board.ID !== 'f') {
imgSrc = ("<a class='fileThumb" + (file.isSpoiler ? ' imgspoiler' : '') + "' href='" + file.url + "' target=_blank>") + ("<img src='" + fileThumb + "' alt='" + fileSize + "' data-md5=" + file.MD5 + " style='height: " + file.theight + "px; width: " + file.twidth + "px;'></a>");
}
a = $.el('a', {
@ -5504,7 +5503,7 @@
continue;
}
count++;
node = Build.postFromObject(postObject, ThreadUpdater.thread.board.ID);
node = Build.postFromObject(postObject, ThreadUpdater.thread.board);
nodes.push(node);
posts.push(new Post(node, ThreadUpdater.thread, ThreadUpdater.thread.board));
}

View File

@ -254,7 +254,6 @@ Settings =
hiddenNum++
for ID, thread of ReplyHiding.getHiddenPosts().threads
for ID, post of thread
$.log post
hiddenNum++
div = $.el 'div',
innerHTML: "<button>Hidden: #{hiddenNum}</button><span class=description>: Clear manually hidden threads and posts on /#{g.BOARD}/."
@ -1906,7 +1905,7 @@ Build =
flag =
if flagCode
" <img src='#{staticPath}/image/country/#{if board is 'pol' then 'troll/' else ''}" +
" <img src='#{staticPath}/image/country/#{if board.ID is 'pol' then 'troll/' else ''}" +
flagCode.toLowerCase() + ".gif' alt=#{flagCode} title='#{flagName}' class=countryFlag>"
else
''
@ -1940,7 +1939,7 @@ Build =
fileThumb += '.png'
file.twidth = file.theight = 100
if board isnt 'f'
if board.ID isnt 'f'
imgSrc = "<a class='fileThumb#{if file.isSpoiler then ' imgspoiler' else ''}' href='#{file.url}' target=_blank>" +
"<img src='#{fileThumb}' alt='#{fileSize}' data-md5=#{file.MD5} style='height: #{file.theight}px; width: #{file.twidth}px;'></a>"
@ -3741,7 +3740,7 @@ ThreadUpdater =
continue if num <= ThreadUpdater.lastPost
# Insert new posts, not older ones.
count++
node = Build.postFromObject postObject, ThreadUpdater.thread.board.ID
node = Build.postFromObject postObject, ThreadUpdater.thread.board
nodes.push node
posts.push new Post node, ThreadUpdater.thread, ThreadUpdater.thread.board