blob: 946954bc0825d7204d81e422de9ae18969060167 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
var ChatView = View.extend({
template: $("#collaborator-template").html(),
events: {
"submit form": "send"
},
initialize: function(){
this.$msg = this.$("#message")
this.$messages = this.$("#messages")
},
add: function(msg){
var $el = $( this.template )
$el.find(".nick").html(msg.nick)
$el.find(".msg").html(msg.msg)
},
send: function(){
},
empty: function(){
this.$messages.empty()
}
})
|