mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 23:42:59 +08: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
|
@ -370,6 +370,10 @@ Discourse.Topic = Discourse.Model.extend({
|
||||||
return (postBelow ? postBelow.get('reply_to_post_number') : void 0) === post.get('post_number');
|
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() {
|
excerptTruncated: function() {
|
||||||
var e = this.get('excerpt');
|
var e = this.get('excerpt');
|
||||||
return( e && e.substr(e.length - 8,8) === '…' );
|
return( e && e.substr(e.length - 8,8) === '…' );
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
Discourse.TopicListItemView = Discourse.View.extend({
|
Discourse.TopicListItemView = Discourse.View.extend({
|
||||||
tagName: 'tr',
|
tagName: 'tr',
|
||||||
templateName: 'list/topic_list_item',
|
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'],
|
attributeBindings: ['data-topic-id'],
|
||||||
|
|
||||||
'data-topic-id': (function() {
|
'data-topic-id': (function() {
|
||||||
|
|
|
@ -50,6 +50,10 @@
|
||||||
&.archived a {
|
&.archived a {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
&.has-excerpt .star {
|
||||||
|
vertical-align: top;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
th,
|
th,
|
||||||
td {
|
td {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user