blob: c8603a913f9752c6a77f1dbca7f4526972857a81 (
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
28
29
30
31
|
var LinksView = View.extend({
el: "#links",
events: {
"click a": function(){
},
},
template: $("#link_template").html(),
initialize: function(){
},
show: function(){
$.getJSON("/_irc/links", function(data){
data.forEach(this.append.bind(this))
}.bind(this))
},
append: function(links){
var tmpl = this.template.replace(/{{url}}/, sanitize(data.url))
.replace(/{{nick}}/, sanitize(data.nick))
this.$el.append(tmpl)
},
loadMembers: function(){
this.queue.forEach(this.appendMember.bind(this))
},
})
|