Align star to the top of the line in topic list for topics showing excerpts

This commit is contained in:
Neil Lalonde 2013-04-30 12:35:41 -04:00
parent ea5d86a533
commit 6f0d68fe5f
3 changed files with 9 additions and 1 deletions

View file

@ -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) === '…' );

View file

@ -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() {

View file

@ -50,6 +50,10 @@
&.archived a {
opacity: 0.6;
}
&.has-excerpt .star {
vertical-align: top;
margin-top: 2px;
}
}
th,
td {