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