Refactor away this poorly named and overloaded file
This commit is contained in:
parent
b9640a54bd
commit
ad7456b367
3 changed files with 19 additions and 25 deletions
|
@ -43,24 +43,4 @@ var Whisper = Whisper || {};
|
|||
}
|
||||
});
|
||||
|
||||
Whisper.Header = Backbone.View.extend({
|
||||
events: {
|
||||
'click #new-message': 'new_message',
|
||||
'click #new-group': 'new_group'
|
||||
},
|
||||
|
||||
new_message: function(e) {
|
||||
e.preventDefault();
|
||||
$('.conversation').hide().trigger('close'); // detach any existing conversation views
|
||||
this.view = new Whisper.NewConversationView();
|
||||
//todo: less new
|
||||
},
|
||||
|
||||
new_group: function(e) {
|
||||
e.preventDefault();
|
||||
$('.conversation').trigger('close'); // detach any existing conversation views
|
||||
new Whisper.NewGroupView({ el: $('.conversation') });
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue