PDA

View Full Version : Desktop menue Modification!!



libertux
26 Oct 2007, 11:04 PM
Hi
I'm new with ExtJs (it's so great and helpful) =D> .
I try to give some change to the Desktop Menu ( add new menue , sub menue...), I'm using the Desktop exemple.
then can some one give me some advice (to undrestund the ExtJs Desktop ) tutorial ...

THKS

libertux
27 Oct 2007, 12:08 AM
hi ;)
this is my pb:
in the Desctop sempel there are a "semple.js" file in witch we chould normaly populate the start menue like this ("tab exemple" menue item):



MyDesktop.TabWindow = Ext.extend(Ext.app.Module, {
id:'tab-win',
init : function(){
this.launcher = {
text: 'tab exemple',
iconCls:'accordion',
handler : this.createWindow,
scope: this
}
},

createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('tab-win');
if(!win){
win = desktop.createWindow({
id: 'tab-win',
title:'Tab Window',
width:740,
height:480,
iconCls: 'tabs',
shim:false,
animCollapse:false,
border:false,
constrainHeader:true,

layout: 'fit',
items:
new Ext.TabPanel({
activeTab:0,

items: [{
title: 'Tab Text 1',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
},{
title: 'Tab Text 2',
header:false,
html : '<iframe id="sampleframe" name="sampleframe" width="90%" height="400px" frameborder="2" src="../package/canvas/canvas.html" style="border: 0px solid #cecece;"></iframe>',
border:false
},{
title: 'Tab Text 3',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
},{
title: 'Tab Text 4',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
}]
})
});
}
win.show();
}
});



when i duplicate this code normaly i should have another "tab exemple" menue item, but it's not work please help
THKS

libertux
27 Oct 2007, 1:47 AM
OK RESOLVED :)

we should add a new declaration for the new item ("TabWindows()") like that :




getModules : function(){
return [
new MyDesktop.GridWindow(),
new MyDesktop.TabWindow(),
new MyDesktop.TabWindows(),
new MyDesktop.AccordionWindow(),
new MyDesktop.BogusMenuModule(),
new MyDesktop.BogusModule()
];
},