ff94bdbf | class Xmpp.Models.Contact extends Xmpp.Models.Model namespace: 'app.roster' defaults: |
b27f285a | status: '' state: 'online' |
ff94bdbf | initialize: -> |
b27f285a | _.bindAll(this) |
ff94bdbf | class Xmpp.Collections.ContactsCollection extends Backbone.Collection model: Xmpp.Models.Contact |
b27f285a | initialize: -> _.bindAll(this) @counter = 0 @friendsList = new Xmpp.Views.Contacts.ListView(collection: this, attributes: {title: 'chat.roster.friends', id: 'js-inactive-friends'}) # @activeList = new Xmpp.Views.Contacts.ListView(collection: this, attributes: {title: 'chat.roster.chat-group', id: 'js-active-friends'}) @on("add", @appendContact) appendContact: (contact) -> @counter++ @friendsList.appendContact(contact) |