Show name and timestamp in catalog thread on hover by moving post info from post.
This commit is contained in:
parent
ecec1211ab
commit
350230d52c
@ -216,7 +216,7 @@ Build =
|
||||
comment = innerHTML: data.com or ''
|
||||
|
||||
root = $.el 'div',
|
||||
className: 'catalog-thread'
|
||||
className: 'catalog-thread post' # post added to make 4chan postInfo CSS work
|
||||
|
||||
$.extend root, <%= readHTML('CatalogThread.html') %>
|
||||
|
||||
|
||||
@ -7,4 +7,3 @@
|
||||
</span>
|
||||
<span class="catalog-icons"></span>
|
||||
</div>
|
||||
?{thread.OP.info.subject}{<div class="subject">${thread.OP.info.subject}</div>}
|
||||
|
||||
@ -716,10 +716,10 @@ Index =
|
||||
isCatalog = (Conf['Index Mode'] is 'catalog')
|
||||
for thread in threads
|
||||
node = if isCatalog then thread.catalogView.nodes.root else thread.OP.nodes.post
|
||||
{comment} = thread.OP.nodes
|
||||
{info, comment} = thread.OP.nodes
|
||||
unless node.contains comment
|
||||
comment.className = if isCatalog then 'comment' else 'postMessage'
|
||||
$.add node, comment
|
||||
$.add node, [info, comment]
|
||||
return
|
||||
|
||||
buildStructure: (threads) ->
|
||||
|
||||
@ -14,7 +14,7 @@ Post.Clone = class extends Post
|
||||
root = cloneNode nodes.root
|
||||
# Handle case where comment has been moved into catalog thread
|
||||
if nodes.comment.parentNode isnt nodes.post
|
||||
$.add $('.post', root), cloneNode(nodes.comment)
|
||||
$.add $('.post', root), [cloneNode(nodes.info), cloneNode(nodes.comment)]
|
||||
Post.Clone.prefix or= 0
|
||||
for node in [root, $$('[id]', root)...]
|
||||
node.id = Post.Clone.prefix + node.id
|
||||
|
||||
@ -714,13 +714,15 @@ div[data-checked="false"] > .suboption-list {
|
||||
}
|
||||
.catalog-thread {
|
||||
display: inline-block;
|
||||
margin: 1px;
|
||||
border: 1px solid transparent;
|
||||
word-wrap: break-word;
|
||||
vertical-align: top;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
div.catalog-thread {
|
||||
margin: 1px;
|
||||
}
|
||||
.catalog-thread > * {
|
||||
margin: 0 -1px;
|
||||
border-left: 1px solid transparent;
|
||||
@ -786,9 +788,20 @@ div[data-checked="false"] > .suboption-list {
|
||||
.catalog-stats > [title] {
|
||||
cursor: help;
|
||||
}
|
||||
.catalog-thread > .subject {
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
#delform .catalog-thread > .postInfo {
|
||||
width: auto;
|
||||
}
|
||||
#delform .catalog-thread > .postInfo > * {
|
||||
display: none;
|
||||
}
|
||||
#delform .catalog-thread > .postInfo > .subject {
|
||||
display: block;
|
||||
}
|
||||
.catalog-thread .dateTime {
|
||||
font-style: italic;
|
||||
}
|
||||
.catalog-thread .posteruid {
|
||||
display: none;
|
||||
}
|
||||
.catalog-thread:hover {
|
||||
overflow: visible;
|
||||
@ -797,9 +810,9 @@ div[data-checked="false"] > .suboption-list {
|
||||
.catalog-thread:hover > * {
|
||||
margin: 0 -61px;
|
||||
}
|
||||
/* /tg/ dice rolls */
|
||||
.board_tg .catalog-thread > .comment > b {
|
||||
font-weight: normal;
|
||||
#delform .catalog-thread:hover > .postInfo > .nameBlock,
|
||||
#delform .catalog-thread:hover > .postInfo > .dateTime {
|
||||
display: inline-block;
|
||||
}
|
||||
.catalog-thread .prettyprinted {
|
||||
max-width: 100%;
|
||||
@ -1782,7 +1795,7 @@ a:only-of-type > .remove {
|
||||
margin: 2px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.post .menu-button,
|
||||
.postInfo > .menu-button,
|
||||
#thread-watcher .menu-button {
|
||||
width: 18px;
|
||||
height: 15px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user