diff --git a/js/views/conversation_list_item_view.js b/js/views/conversation_list_item_view.js index 3aa27882..f4aa0fb1 100644 --- a/js/views/conversation_list_item_view.js +++ b/js/views/conversation_list_item_view.js @@ -27,6 +27,7 @@ var Whisper = Whisper || {}; this.view.delegateEvents(); } this.view.render(); + this.$el.addClass('selected'); }, render: function() { diff --git a/js/views/conversation_list_view.js b/js/views/conversation_list_view.js index 7211368d..dcc912ae 100644 --- a/js/views/conversation_list_view.js +++ b/js/views/conversation_list_view.js @@ -10,15 +10,12 @@ var Whisper = Whisper || {}; collection: Whisper.Threads, events: { - 'click .conversation': 'select', + 'click .contact': 'select', }, select: function(e) { - var target = $(e.target).closest('.conversation'); - if (!target.is('.selected')) { - target.siblings().removeClass('slected'); - target.addClass('selected'); - } + var target = $(e.target).closest('.contact'); + target.siblings().removeClass('selected'); return false; }, }); diff --git a/stylesheets/index.css b/stylesheets/index.css index c462deec..08862060 100644 --- a/stylesheets/index.css +++ b/stylesheets/index.css @@ -22,6 +22,10 @@ body { display: none; } +.contact.selected { + background-color: aliceblue; +} + .conversation { margin: 0; padding: 0;