Oops, make highlight in topic list style-able too

This commit is contained in:
Neil Lalonde 2013-08-16 14:24:36 -04:00
parent be6ca8d118
commit 7dd470ccc0
2 changed files with 9 additions and 5 deletions

View File

@ -17,11 +17,12 @@ Discourse.TopicListItemView = Discourse.GroupedView.extend({
highlight: function() { highlight: function() {
var $topic = this.$(); var $topic = this.$();
var originalCol = $topic.css('backgroundColor'); var originalCol = $topic.css('backgroundColor');
$topic.css({ $topic
backgroundColor: "#ffffcc" .addClass('highlighted')
}).animate({ .stop()
backgroundColor: originalCol .animate({ backgroundColor: originalCol }, 2500, 'swing', function(){
}, 2500); $topic.removeClass('highlighted');
});
}, },
didInsertElement: function() { didInsertElement: function() {

View File

@ -59,6 +59,9 @@
color: $nav-pills-border-color-active; color: $nav-pills-border-color-active;
} }
} }
&.highlighted {
background-color: $highlight;
}
} }
th, th,
td { td {