Commit | Line | Data |
---|---|---|
1 | _kiwi.view.Member = Backbone.View.extend({ | |
2 | tagName: "li", | |
3 | initialize: function (options) { | |
4 | this.model.bind('change', this.render, this); | |
5 | this.render(); | |
6 | }, | |
7 | render: function () { | |
8 | var $this = this.$el, | |
9 | prefix_css_class = (this.model.get('modes') || []).join(' '); | |
10 | ||
11 | $this.attr('class', 'mode ' + prefix_css_class); | |
12 | $this.html('<a class="nick"><span class="prefix">' + this.model.get("prefix") + '</span>' + this.model.get("nick") + '</a>'); | |
13 | ||
14 | return this; | |
15 | } | |
16 | }); |