schoppet
9 Mar 2007, 12:55 AM
Hi,
I've created a BorderLayout similar to the ComplexLayout example:
CAI = function(){
var layout;
return {
init : function(){
layout = new Ext.BorderLayout('jrenmc6k', {
hideOnLayout: true,
north: {
split:false,
initialSize: 35,
titlebar: false
},
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},
east: {
split:true,
initialSize: 202,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},
south: {
split:true,
initialSize: 100,
minSize: 100,
maxSize: 200,
titlebar: true,
collapsible: true,
animate: true
},
center: {
titlebar: true,
autoScroll:true,
closeOnTab: true
}
});
layout.beginUpdate();
layout.add(
'north',
new Ext.ContentPanel(
'toolbar',
{
title:'Toolbar',
}
)
);
layout.add(
'south',
new Ext.ContentPanel(
'statusbar',
{
title: 'Statusbar',
closable: false
}
)
);
layout.add(
'west',
new Ext.ContentPanel(
'navigationbar',
{
title: 'Navigationbar',
closable: false
}
)
);
layout.add(
'east',
new Ext.ContentPanel(
'informationbar',
{
title: 'Informationbar',
closable: false
}
)
);
layout.add(
'center',
new Ext.ContentPanel(
'editbar',
{
title: 'Editbar',
closable: false
}
)
);
layout.getRegion('west').hide();
layout.getRegion('east').hide();
layout.getRegion('south').hide();
layout.endUpdate();
},
toogleWest : function(){
var west = layout.getRegion('west');
if(west.isVisible()) {
west.hide();
} else {
est.show();
}
}
};
}();
Ext.EventManager.onDocumentReady(CAI.init, CAI, true);
This works.
But now I want to call the function "CAI.toggleWest();" from external, e.g. the FF-Firebug extension. But this doesn't work! e.g. I type in the console of Firebug "alert(CAI.layout);" and the popup only displays "[undefined]".
Is there any trick to get this to work?
Regards
Joerg
I've created a BorderLayout similar to the ComplexLayout example:
CAI = function(){
var layout;
return {
init : function(){
layout = new Ext.BorderLayout('jrenmc6k', {
hideOnLayout: true,
north: {
split:false,
initialSize: 35,
titlebar: false
},
west: {
split:true,
initialSize: 200,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},
east: {
split:true,
initialSize: 202,
minSize: 175,
maxSize: 400,
titlebar: true,
collapsible: true,
animate: true
},
south: {
split:true,
initialSize: 100,
minSize: 100,
maxSize: 200,
titlebar: true,
collapsible: true,
animate: true
},
center: {
titlebar: true,
autoScroll:true,
closeOnTab: true
}
});
layout.beginUpdate();
layout.add(
'north',
new Ext.ContentPanel(
'toolbar',
{
title:'Toolbar',
}
)
);
layout.add(
'south',
new Ext.ContentPanel(
'statusbar',
{
title: 'Statusbar',
closable: false
}
)
);
layout.add(
'west',
new Ext.ContentPanel(
'navigationbar',
{
title: 'Navigationbar',
closable: false
}
)
);
layout.add(
'east',
new Ext.ContentPanel(
'informationbar',
{
title: 'Informationbar',
closable: false
}
)
);
layout.add(
'center',
new Ext.ContentPanel(
'editbar',
{
title: 'Editbar',
closable: false
}
)
);
layout.getRegion('west').hide();
layout.getRegion('east').hide();
layout.getRegion('south').hide();
layout.endUpdate();
},
toogleWest : function(){
var west = layout.getRegion('west');
if(west.isVisible()) {
west.hide();
} else {
est.show();
}
}
};
}();
Ext.EventManager.onDocumentReady(CAI.init, CAI, true);
This works.
But now I want to call the function "CAI.toggleWest();" from external, e.g. the FF-Firebug extension. But this doesn't work! e.g. I type in the console of Firebug "alert(CAI.layout);" and the popup only displays "[undefined]".
Is there any trick to get this to work?
Regards
Joerg