mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
Align star to the top of the line in topic list for topics showing excerpts
This commit is contained in:
parent
ea5d86a533
commit
6f0d68fe5f
3 changed files with 9 additions and 1 deletions
|
@ -370,6 +370,10 @@ Discourse.Topic = Discourse.Model.extend({
|
|||
return (postBelow ? postBelow.get('reply_to_post_number') : void 0) === post.get('post_number');
|
||||
},
|
||||
|
||||
hasExcerpt: function() {
|
||||
return this.get('excerpt') && this.get('excerpt').length > 0;
|
||||
}.property('excerpt'),
|
||||
|
||||
excerptTruncated: function() {
|
||||
var e = this.get('excerpt');
|
||||
return( e && e.substr(e.length - 8,8) === '…' );
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
Discourse.TopicListItemView = Discourse.View.extend({
|
||||
tagName: 'tr',
|
||||
templateName: 'list/topic_list_item',
|
||||
classNameBindings: ['content.archived', ':topic-list-item'],
|
||||
classNameBindings: ['content.archived', ':topic-list-item', 'content.hasExcerpt:has-excerpt'],
|
||||
attributeBindings: ['data-topic-id'],
|
||||
|
||||
'data-topic-id': (function() {
|
||||
|
|
|
@ -50,6 +50,10 @@
|
|||
&.archived a {
|
||||
opacity: 0.6;
|
||||
}
|
||||
&.has-excerpt .star {
|
||||
vertical-align: top;
|
||||
margin-top: 2px;
|
||||
}
|
||||
}
|
||||
th,
|
||||
td {
|
||||
|
|
Loading…
Reference in a new issue