PDA

View Full Version : tree not expand in viewport ( view in FF, but works in IE, opera, safari )



igi
26 Jun 2009, 3:37 AM
im new in extjs.i'm making internal website for government using extjs.i create layout with viewport, with west region is colapsible panel, in colapsible, i put treepanel which access to database via json.but why treepanel not expand in FF ? but in IE, opera, safari work,i've tested in google chrome, node expand, but icon not appear.here i upload screenshot, please look at this

this is image that tree not expand in firefox :
http://realeduasia.com/sample1.jpg

this is image that tree work well in other browser :
http://realeduasia.com/sample2.jpg

this script for index.php
Ext.onReady(function(){
Ext.QuickTips.init();
Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
var detailEl;
var start = {
id : 'start_panel',
title : 'Hai, <?=$_SESSION[ses_user]?> ( <a href=logout.php>Logout</a> )',
layout : 'fit',
bodyStyle : 'padding:25px;',
contentEl : 'start-div'
};

<?=getComp()?>

var paneladmin = {
id : 'panel_admin',
region : 'center',
layout : 'card',
margin : '2 5 5 0',
activeItem : 0,
border :false,
items : [ start <?=setCompToItem()?> ]
};

<?=setTreeVar()?>

new Ext.Viewport({
layout: 'border',
title: 'Ext Layout Browser',
items: [{
xtype: 'box',
region: 'north',
applyTo: 'header',
height: 30
},{
region:'west',
id:'west-panel',
title:'Main Menu',
split:true,
width: 200,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'0 0 0 5',
layout:'accordion',
layoutConfig:{
animate:true
},
items: [<?=getacc()?>]
},
paneladmin
],
renderTo: Ext.getBody()
});

});

this script to generate treepanel

var tree_admin_$obj->module_id = new Ext.tree.TreePanel({
id : 'tree_panel_module_$obj->module_id',
region:'north',
split: true,
height: 300,
minSize: 150,
autoScroll: true,
rootVisible: false,
lines: false,
singleExpand: true,
useArrows: true,
bodyBorder : false,
loader : new Ext.tree.TreeLoader({
dataUrl : 'getTreeNode.php',
baseParams : { module_id : '$obj->module_id' }
}),
root : new Ext.tree.AsyncTreeNode()
});

please help me,,sorry my english is bad