Fix thread page numbers
This commit is contained in:
parent
91a63d1bc2
commit
5581b53414
@ -3736,7 +3736,7 @@
|
|||||||
sticky = isSticky ? " <img src=" + staticPath + "sticky" + gifIcon + " title=Sticky class=stickyIcon>" : '';
|
sticky = isSticky ? " <img src=" + staticPath + "sticky" + gifIcon + " title=Sticky class=stickyIcon>" : '';
|
||||||
closed = isClosed ? " <img src=" + staticPath + "closed" + gifIcon + " title=Closed class=closedIcon>" : '';
|
closed = isClosed ? " <img src=" + staticPath + "closed" + gifIcon + " title=Closed class=closedIcon>" : '';
|
||||||
if (isOP && g.VIEW === 'index') {
|
if (isOP && g.VIEW === 'index') {
|
||||||
pageNum = Math.floor(Index.liveThreadData.keys.indexOf(postID) / Index.threadsNumPerPage);
|
pageNum = Math.floor(Index.liveThreadData.keys.indexOf("" + postID) / Index.threadsNumPerPage);
|
||||||
pageIcon = " <span class=page-num title='This thread is on page " + pageNum + " in the original index.'>Page " + pageNum + "</span>";
|
pageIcon = " <span class=page-num title='This thread is on page " + pageNum + " in the original index.'>Page " + pageNum + "</span>";
|
||||||
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
||||||
} else {
|
} else {
|
||||||
@ -3805,7 +3805,7 @@
|
|||||||
data = Index.liveThreadData[thread.ID];
|
data = Index.liveThreadData[thread.ID];
|
||||||
postCount = data.replies + 1;
|
postCount = data.replies + 1;
|
||||||
fileCount = data.images + !!data.ext;
|
fileCount = data.images + !!data.ext;
|
||||||
pageCount = Math.floor(Index.liveThreadData.keys.indexOf(thread.ID) / Index.threadsNumPerPage);
|
pageCount = Math.floor(Index.liveThreadData.keys.indexOf("" + thread.ID) / Index.threadsNumPerPage);
|
||||||
subject = thread.OP.info.subject ? "<div class='subject'>" + thread.OP.info.subject + "</div>" : '';
|
subject = thread.OP.info.subject ? "<div class='subject'>" + thread.OP.info.subject + "</div>" : '';
|
||||||
comment = thread.OP.nodes.comment.innerHTML.replace(/(<br>\s*){2,}/g, '<br>');
|
comment = thread.OP.nodes.comment.innerHTML.replace(/(<br>\s*){2,}/g, '<br>');
|
||||||
root = $.el('div', {
|
root = $.el('div', {
|
||||||
|
|||||||
@ -3795,7 +3795,7 @@
|
|||||||
sticky = isSticky ? " <img src=" + staticPath + "sticky" + gifIcon + " title=Sticky class=stickyIcon>" : '';
|
sticky = isSticky ? " <img src=" + staticPath + "sticky" + gifIcon + " title=Sticky class=stickyIcon>" : '';
|
||||||
closed = isClosed ? " <img src=" + staticPath + "closed" + gifIcon + " title=Closed class=closedIcon>" : '';
|
closed = isClosed ? " <img src=" + staticPath + "closed" + gifIcon + " title=Closed class=closedIcon>" : '';
|
||||||
if (isOP && g.VIEW === 'index') {
|
if (isOP && g.VIEW === 'index') {
|
||||||
pageNum = Math.floor(Index.liveThreadData.keys.indexOf(postID) / Index.threadsNumPerPage);
|
pageNum = Math.floor(Index.liveThreadData.keys.indexOf("" + postID) / Index.threadsNumPerPage);
|
||||||
pageIcon = " <span class=page-num title='This thread is on page " + pageNum + " in the original index.'>Page " + pageNum + "</span>";
|
pageIcon = " <span class=page-num title='This thread is on page " + pageNum + " in the original index.'>Page " + pageNum + "</span>";
|
||||||
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
replyLink = " <span>[<a href='/" + boardID + "/res/" + threadID + "' class=replylink>Reply</a>]</span>";
|
||||||
} else {
|
} else {
|
||||||
@ -3864,7 +3864,7 @@
|
|||||||
data = Index.liveThreadData[thread.ID];
|
data = Index.liveThreadData[thread.ID];
|
||||||
postCount = data.replies + 1;
|
postCount = data.replies + 1;
|
||||||
fileCount = data.images + !!data.ext;
|
fileCount = data.images + !!data.ext;
|
||||||
pageCount = Math.floor(Index.liveThreadData.keys.indexOf(thread.ID) / Index.threadsNumPerPage);
|
pageCount = Math.floor(Index.liveThreadData.keys.indexOf("" + thread.ID) / Index.threadsNumPerPage);
|
||||||
subject = thread.OP.info.subject ? "<div class='subject'>" + thread.OP.info.subject + "</div>" : '';
|
subject = thread.OP.info.subject ? "<div class='subject'>" + thread.OP.info.subject + "</div>" : '';
|
||||||
comment = thread.OP.nodes.comment.innerHTML.replace(/(<br>\s*){2,}/g, '<br>');
|
comment = thread.OP.nodes.comment.innerHTML.replace(/(<br>\s*){2,}/g, '<br>');
|
||||||
root = $.el('div', {
|
root = $.el('div', {
|
||||||
|
|||||||
@ -181,7 +181,7 @@ Build =
|
|||||||
''
|
''
|
||||||
|
|
||||||
if isOP and g.VIEW is 'index'
|
if isOP and g.VIEW is 'index'
|
||||||
pageNum = Index.liveThreadData.keys.indexOf(postID) // Index.threadsNumPerPage
|
pageNum = Index.liveThreadData.keys.indexOf("#{postID}") // Index.threadsNumPerPage
|
||||||
pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>Page #{pageNum}</span>"
|
pageIcon = " <span class=page-num title='This thread is on page #{pageNum} in the original index.'>Page #{pageNum}</span>"
|
||||||
replyLink = " <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
|
replyLink = " <span>[<a href='/#{boardID}/res/#{threadID}' class=replylink>Reply</a>]</span>"
|
||||||
else
|
else
|
||||||
@ -241,7 +241,7 @@ Build =
|
|||||||
|
|
||||||
postCount = data.replies + 1
|
postCount = data.replies + 1
|
||||||
fileCount = data.images + !!data.ext
|
fileCount = data.images + !!data.ext
|
||||||
pageCount = Index.liveThreadData.keys.indexOf(thread.ID) // Index.threadsNumPerPage
|
pageCount = Index.liveThreadData.keys.indexOf("#{thread.ID}") // Index.threadsNumPerPage
|
||||||
|
|
||||||
subject = if thread.OP.info.subject
|
subject = if thread.OP.info.subject
|
||||||
"<div class='subject'>#{thread.OP.info.subject}</div>"
|
"<div class='subject'>#{thread.OP.info.subject}</div>"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user