Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- models.User = Backbone.Model.extend({
- defaults: {
- 'name': '',
- 'since': '',
- 'statusMessage': '',
- 'statusState': STATUS_STATE_PRESENT,
- 'isModerator': false,
- 'isStaff': false,
- 'isCanGiveChatMode': false,
- 'avatarSrc': "http://placekitten.com/50/50",
- 'editCount': '?',
- 'isPrivate': false,
- 'active': false,
- 'privateRoomId': false
- },
- initialize: function(options){
- attrs = this.attributes;
- console.log(options, attrs, attrs.statusMessage);
- if (attrs.statusMessage.length && attrs.statusMessage.split(' ')[0] == wgUserName.replace(' ','_') && attrs.name != wgUserName) {
- console.log('running statusMessage functions:');
- for (var i in onStatusMessage) {
- onStatusMessage[i](options);
- }
- }
- },
- isAway: function(){
- return (this.get('statusState') == STATUS_STATE_AWAY);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement