第一个ExtJS,在FireFox下显示不了,请各位指教

[SourceCode]
Ext.onReady(function() {
var northPanel = new Ext.Panel({
region: 'north',
autoLoad: {url: 'top.jsp'},
split: false,
height: 31,
minSize: 31,
maxSize: 31
});
var treePanel = new Ext.Panel({
title: 'Menus',
region: 'west',
contentEl: 'layout_menu',
split: true,
border: true,
collapsible: false,
margins:'2 0 5 0',
cmargins:'0 0 0 0',
lines:false,
autoScroll:true,
autoHeight:false,
width: 220,
minSize: 220,
maxSize: 220

});
mainPanel = new Ext.TabPanel({
region:'center',
resizeTabs:true,
minTabWidth: 135,
tabWidth: 135,
margins:'2 0 5 0',
cmargins:'0 0 0 0',
activeTab: 0,
items: {
id:'welcome-panel',
title: 'Index',
autoLoad: {url: 'welcome.html',scripts:true}
}
});
//mainPanel.activate('welcome-panel');
var viewport = new Ext.Viewport({
layout:'border',
items:[northPanel, treePanel, mainPanel]
});
var menudata = {
"id":"rootmenu",
"text":"System Maintaince",
"singleClickExpand":true,
"iconCls":"icon-pkg",
"isClass":true,
"children":[{
"href":"maintaince/menus/list.jsp",
"text":"Menus",
"id":"test1",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/menubuttons/list.jsp",
"text":"MenuButtons",
"id":"test2",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functioncode/list.jsp",
"text":"FunctionUNITS",
"id":"test3",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionurl/list.jsp",
"text":"FunctionURL",
"id":"test4",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functioncolumn/list.jsp",
"text":"FunctionDLL",
"id":"test5",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionlist/list.jsp",
"text":"FunctionLIST",
"id":"test6",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionprint/list.jsp",
"text":"FunctionPRINT",
"id":"test7",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionquery/list.jsp",
"text":"FunctionQUERY",
"id":"test8",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
}
]
};

var menudata2 = {
"id":"rootmenu2",
"text":"Database Maintaince",
"singleClickExpand":true,
"iconCls":"icon-pkg",
"isClass":true,
"children":[{
"href":"maintaince/menus/list.jsp",
"text":"Menus",
"id":"test21",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/menubuttons/list.jsp",
"text":"MenuButtons",
"id":"test22",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functioncode/list.jsp",
"text":"FunctionUNITS",
"id":"test23",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionlist/list.jsp",
"text":"FunctionLIST",
"id":"test24",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/menubuttons/list.jsp",
"text":"MenuButtons",
"id":"test25",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functioncode/list.jsp",
"text":"FunctionUNITS",
"id":"test263",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
},{
"href":"maintaince/functionlist/list.jsp",
"text":"FunctionLIST",
"id":"test27",
"edit":false,
"leaf":true,
"iconCls":"icon-cls"
}
]
};


var Tree = Ext.tree;
var treePanel = new Tree.TreePanel({
el:'layout_menu',
border : false,
rootVisible:true,
animate:true,
enableDD:false,
lines:false,
containerScroll: true,
loader: new Ext.tree.TreeLoader({
preloadChildren: true,
clearOnLoad: true
}),
root: new Ext.tree.AsyncTreeNode({
text:'CareSoft',
id:'root',
iconCls:"icon-pkg",
expanded:true,
children:[menudata,menudata2]
}),
collapseFirst:false
});
treePanel.render();
treePanel.expandAll();
new Tree.TreeSorter(treePanel,{folderSort:true});
treePanel.on("click", function(node, e){
e.stopEvent();
var _attr = node.attributes;
var _href = _attr.href;

if(node.isLeaf() && _href){
var _id = node.id;
var _tab = mainPanel.findById(_id);
if(_tab) {
mainPanel.activate(_id);
return;
}

mainPanel.add({
id: _id,
title: node.text,
autoHeight: true,
margins:'5 5 5 5',
autoLoad: {url: _href, scripts:true, params: 'id='+ _id +'&title=' + node.text },
closable:true
}).show();

}
});
});
在IE中运行正常,但在 FireFox中菜单那部份是空白的,用FireBug可以看到有元素存在,但就是没有显示出来,错误信息没有,只有一些CSS方面的警告,请各位指教。
另外,个人感觉到看sample挺漂亮的,但自己做到应用程序中后,发现并不怎么样,感觉不是很清爽,还不如1.1中那个纯蓝色的感觉好,你们认为呢?
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值