Add nodes.quote to Post object.

This commit is contained in:
ccd0 2014-12-14 20:28:33 -08:00
parent f388daee47
commit 512fd1f78d
4 changed files with 6 additions and 4 deletions

View File

@ -15,6 +15,7 @@ class Clone extends Post
root: root
post: post
info: info
quote: $ 'a[title="Reply to this post"]', info
comment: $ '.postMessage', post
quotelinks: []
backlinks: info.getElementsByClassName 'backlink'

View File

@ -37,6 +37,7 @@ class Post
post: post
info: info
nameBlock: $ '.nameBlock', info
quote: $ 'a[title="Reply to this post"]', info
comment: $ '.postMessage', post
links: []
quotelinks: []

View File

@ -21,10 +21,10 @@ class Thread
g.threads.push @fullID, board.threads.push @, @
setPage: (pageNum) ->
{info} = @OP.nodes
{info, quote} = @OP.nodes
unless icon = $ '.page-num', info
icon = $.el 'span', className: 'page-num'
$.after $('a[title="Reply to this post"]', info), [$.tn(' '), icon]
$.after quote, [$.tn(' '), icon]
icon.title = "This thread is on page #{pageNum} in the original index."
icon.textContent = "[#{pageNum}]"
@catalogView.nodes.pageCount.textContent = pageNum if @catalogView
@ -60,7 +60,7 @@ class Thread
root = if type isnt 'Sticky' and @isSticky
$ '.stickyIcon', @OP.nodes.info
else
$('.page-num', @OP.nodes.info) or $('[title="Reply to this post"]', @OP.nodes.info)
$('.page-num', @OP.nodes.info) or @OP.nodes.quote
$.after root, [$.tn(' '), icon]
return unless @catalogView

View File

@ -93,7 +93,7 @@ QR =
QR.status()
node: ->
$.on $('a[title="Reply to this post"]', @nodes.info), 'click', QR.quote
$.on @nodes.quote, 'click', QR.quote
open: ->
if QR.nodes