Fix double selected states
Previously, when changing selection from an unread to a read conversation, the unread conversation would not be deselected. // FREEBIE
This commit is contained in:
parent
50add90fd9
commit
b81d93177a
2 changed files with 1 additions and 9 deletions
|
@ -24,7 +24,7 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
select: function(e) {
|
select: function(e) {
|
||||||
this.$el.addClass('selected');
|
this.$el.addClass('selected').siblings('.selected').removeClass('selected');
|
||||||
this.$el.trigger('select', {conversation: this.model});
|
this.$el.trigger('select', {conversation: this.model});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -8,14 +8,6 @@
|
||||||
Whisper.ConversationListView = Whisper.ListView.extend({
|
Whisper.ConversationListView = Whisper.ListView.extend({
|
||||||
tagName: 'div',
|
tagName: 'div',
|
||||||
itemView: Whisper.ConversationListItemView,
|
itemView: Whisper.ConversationListItemView,
|
||||||
events: {
|
|
||||||
'click .contact': 'select',
|
|
||||||
},
|
|
||||||
select: function(e) {
|
|
||||||
var target = $(e.target).closest('.contact');
|
|
||||||
target.siblings().removeClass('selected');
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
moveToTop: function(conversation) {
|
moveToTop: function(conversation) {
|
||||||
var $el = this.$('.' + conversation.cid);
|
var $el = this.$('.' + conversation.cid);
|
||||||
if ($el && $el.length > 0) {
|
if ($el && $el.length > 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue