You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
513 B
JavaScript
24 lines
513 B
JavaScript
11 years ago
|
var Whisper = Whisper || {};
|
||
|
|
||
|
(function () {
|
||
|
'use strict';
|
||
|
|
||
|
Whisper.ConversationListView = Whisper.ListView.extend({
|
||
|
tagName: 'ul',
|
||
|
id: 'contacts',
|
||
|
itemView: Whisper.ConversationView,
|
||
|
collection: Whisper.Threads,
|
||
|
|
||
|
events: {
|
||
|
'select .conversation': 'select',
|
||
|
},
|
||
|
|
||
|
select: function(e) {
|
||
|
var target = $(e.target).closest('.conversation');
|
||
|
target.siblings().addClass('closed');
|
||
|
target.addClass('selected').trigger('open');
|
||
|
return false;
|
||
|
},
|
||
|
});
|
||
|
})();
|