1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
| CcMainViewport = Ext.extend(Ext.Viewport, {
constructor: function(config){
config = Ext.apply({
layout: 'border',
}, config);
CcMainViewport.superclass.constructor.call(this, config);
this.tabPanel = new Ext.TabPanel({
region:'center',
activeTab: 'bienvenue-tab',
border: false,
items: [{
xtype:'panel',
title:'Bienvenue',
activeTab:0,
id:'bienvenue-tab',
closable: true
}]
});
this.add(this.tabPanel);
this.menu = new Ext.Panel({
region: 'west',
title: 'Menu',
border: false,
collapsible: true,
margins:'0 0 0 0',
layout:'accordion',
width: 200,
minSize: 175,
maxSize: 400,
});
this.menu.add(CcOutilsTreePanel);
this.menu.add(CcPreferencesTreePanel);
this.menu.add(CcAdminTreePanel);
this.menu.add(CcAgentsTreePanel);
this.add(this.menu);
this.header = new Ext.Toolbar({
region:'north',
autoHeight: true,
border: false,
margins: '0 0 0 0',
});
this.header.add('<img title="CCAbsence" alt="CCAbsence" src="../images/logo.png" />');
this.header.add('->');
this.header.addButton({
iconCls: 'item-logout',
text: 'Se déconnecter',
});
this.header.addButton({
iconCls: 'item-help',
text: 'Aide',
});
this.add(this.header);
}
});
Ext.onReady(function(){
new CcMainViewport();
}); |
Partager