Форк Rambox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
867 B

Ext.define('Rambox.model.Service', {
extend: 'Ext.data.Model'
,identifier: 'sequential'
,proxy: {
type: 'localstorage'
,id: 'services'
}
,fields: [{
name: 'id'
,type: 'int'
},{
name: 'position'
,type: 'int'
,convert: function( value, record ) {
return value ? value : Ext.getStore('Services').getCount() + 1;
}
},{
name: 'type'
,type: 'string'
},{
name: 'logo'
,type: 'string'
,convert: function( value, record ) {
return value ? value : record.get('type') + '.png';
}
},{
name: 'name'
,type: 'string'
},{
name: 'url'
,type: 'string'
},{
name: 'align'
,type: 'string'
,defaultValue: 'left'
},{
name: 'notifications'
,type: 'boolean'
,defaultValue: true
},{
name: 'muted'
,type: 'boolean'
,defaultValue: false
},{
name: 'js_unread'
,type: 'string'
,defaultValue: ''
}]
});