Refactor away this poorly named and overloaded file

This commit is contained in:
lilia 2014-08-31 18:17:54 -07:00
parent b9640a54bd
commit ad7456b367
3 changed files with 19 additions and 25 deletions

View file

@ -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') });
}
});
})();