Ext.define('Rambox.view.main.Main', {
extend: 'Ext.tab.Panel'
,requires: [
'Rambox.view.main.MainController'
,'Rambox.view.main.MainModel'
,'Rambox.ux.WebView'
,'Rambox.ux.mixin.Badge'
,'Ext.ux.TabReorderer'
]
,xtype: 'app-main'
,controller: 'main'
,viewModel: {
type: 'main'
}
,plugins: [
{
ptype: 'tabreorderer'
}
]
,tabBar: {
cls: 'allow-overflow'
}
,hideMode: 'visibility'
,autoRender: true
,autoShow: true
,deferredRender: false
,items: [
{
icon: 'resources/logo_32.png'
,closable: false
,layout: 'center'
,autoScroll: true
,items: [
{
xtype: 'container'
,items: [
{
xtype: 'grid'
,title: 'Enabled Services'
,store: 'Services'
,margin: '50 0 0 0'
,hideHeaders: true
,width: 500
,columns: [
{
xtype: 'templatecolumn'
,width: 50
,variableRowHeight: true
,tpl: '
'
}
,{ text: 'Name', dataIndex: 'name', variableRowHeight: true, flex: 1 }
,{
xtype: 'actioncolumn'
,width: 60
,align: 'center'
,items: [
{
glyph: 0xf1f8
,tooltip: 'Remove'
,handler: 'removeService'
,getClass: function(){ return 'x-hidden-display'; }
}
,{
glyph: 0xf013
,tooltip: 'Configure'
,handler: 'configureService'
,getClass: function(){ return 'x-hidden-display'; }
}
]
}
]
,viewConfig: {
emptyText: 'No services added...'
,forceFit: true
}
}
,{
xtype: 'panel'
,title: 'Add a new Service'
,width: 500
,margin: '50 0 0 0'
,tools: [
{
type: 'plus'
,tooltip: 'Add a custom service (soon...)'
}
]
,items: [
{
xtype: 'dataview'
,store: 'ServicesList'
,itemSelector: 'div.service'
,tpl: [
''
,''
,'

'
,'
{name}'
,'
'
,''
]
,listeners: {
itemclick: 'onNewServiceSelect'
}
}
]
}
,{
xtype: 'toolbar'
,margin: '50 0 0 0'
,items: [
{
xtype: 'label'
,html: ' with from Argentina as an Open Source project.'
}
,{
text: 'www.rambox.io'
,href: 'http://www.rambox.io'
}
]
}
]
}
]
}
]
});