EXT富客戶端后臺(tái)管理系統(tǒng) 初步代碼
更新時(shí)間:2008年09月27日 18:01:45 作者:
EXT富客戶端后臺(tái)管理系統(tǒng) 初步代碼提供給大家
//潛水
BJExtreme.prototype.ui.menuBar.Diving = {
text: '潛水' ,
leaf: false ,
children: null
};
//登山
BJExtreme.prototype.ui.menuBar.Mountain = {
text: '登山' ,
leaf: false ,
children: null
};
//攀巖
BJExtreme.prototype.ui.menuBar.Rockclimbe = {
text: '攀巖' ,
leaf: false ,
children: null
};
//徒步
BJExtreme.prototype.ui.menuBar.Onfoot = {
text: '徒步' ,
leaf: false ,
children: null
};
//摩托車
BJExtreme.prototype.ui.menuBar.Motorcycle = {
text: '摩托車' ,
leaf: false ,
children: null
};
//項(xiàng)目中集成的模塊
BJExtreme.prototype.ui.menuBar.ModuleInProject = {
text: '項(xiàng)目中集成的模塊' ,
leaf: false ,
children: null
};
BJExtreme.prototype.ui.menuBar.ModuleInProject.children = [
{
text: '互動(dòng)提示條',leaf: true,ctl: 'ExtjsStudy',act: 'linkTips',
//這個(gè)運(yùn)行的優(yōu)先級(jí)高于下面的那個(gè)通用的監(jiān)聽控制器
listeners:{click: function (n){window.open(BJExtreme.prototype.buildLinkStr(n.attributes.ctl,n.attributes.act));return false ;}}
}
];
//初始化 菜單項(xiàng)元素 信息 -- 這個(gè)必須在 -- 當(dāng)前菜單是使用異步樹組件生成的 , 以后可以添加其他不同的實(shí)現(xiàn)
BJExtreme.prototype.ui.menuBar.loader = new Ext.tree.TreeLoader();
BJExtreme.prototype.ui.menuBar.root = new Ext.tree.AsyncTreeNode({
expanded: true ,
children: [
BJExtreme.prototype.ui.menuBar.Traveling ,
BJExtreme.prototype.ui.menuBar.Mibetdoctor ,
BJExtreme.prototype.ui.menuBar.Diving ,
BJExtreme.prototype.ui.menuBar.Mountain ,
BJExtreme.prototype.ui.menuBar.Rockclimbe ,
BJExtreme.prototype.ui.menuBar.Onfoot ,
BJExtreme.prototype.ui.menuBar.Motorcycle ,
BJExtreme.prototype.ui.menuBar.ModuleInProject
]
});
//定義一個(gè)簡(jiǎn)單的響應(yīng)事件
BJExtreme.prototype.ui.menuBar.listeners = {
click: function (n) //n.attributes 可以獲得AsyncTreeNode的children中的對(duì)象
{
if (n.attributes.leaf == true) //葉選項(xiàng)
{
//n.attributes.text n.attributes.leaf
var ctlStr = BJExtreme.prototype.buildLinkStr(n.attributes.ctl,n.attributes.act);
myextreme.showWindow('當(dāng)前控制器',400,300,ctlStr) ;
}
else //包含子菜單
{
//not to do
}
}
};
//菜單選項(xiàng)結(jié)束
//主內(nèi)容面板
BJExtreme.prototype.ui.contentPane = {
id: "main_content", xtype: "tabpanel" , region: 'center' ,items: [{title: '主內(nèi)容面板'}]
};
//狀態(tài)條
BJExtreme.prototype.ui.statusBar = {
xtype: "tabpanel" , region: 'south' ,items: [{title: '狀態(tài)條'}]
};
BJExtreme.prototype.buildMainPane = function(BJExtremeObj){
//Ext.Viewport 用來將對(duì)象渲染到頁(yè)面中的body塊中,會(huì)自動(dòng)改變,每個(gè)頁(yè)面僅限一個(gè)
this.mainPane = new Ext.Viewport({
enableTabScroll: true ,
layout: 'border', //設(shè)為fit則不能顯示復(fù)合面板
items: [
BJExtremeObj.ui.mainTopic,
BJExtremeObj.ui.menuBar ,
BJExtremeObj.ui.contentPane ,
BJExtremeObj.ui.statusBar
]
}) ;
}
var myextreme = new BJExtreme() ;
Ext.onReady(
function(){
//Ext.MessageBox.alert('BJExtreme Version',myextreme.getVersion());
//Ext.MessageBox.alert('BJExtreme Version',myextreme.buildLinkStr('t','b'));
myextreme.buildMainPane(myextreme) ;
}
);
</script>
<%*執(zhí)行塊的JS區(qū)域 -- 結(jié)束*%>
</head>
<body>
<!-- //頁(yè)面中子導(dǎo)航菜單 -->
</body>
</html>
相關(guān)文章
YUI 讀碼日記之 YAHOO.util.Dom - Part.1
DOM 操作是學(xué)習(xí) Javascript 很重點(diǎn)的一塊。YUI 提供了豐富的 DOM 操作接口,它們定義在 %BUILD%/dom/dom.js 中(封裝成 YAHOO.util.Dom)。由于 DOM 操作比較重要,我計(jì)劃將其分成幾個(gè) Part 分析。2008-03-03
Javascript YUI 讀碼日記之 YAHOO.util.Dom - Part.2 0
繼續(xù)在 YAHOO.util.Dom 中徘徊。由于 YAHOO.util.Dom 多次調(diào)用 batch 方法,所以先看看這個(gè)函數(shù)是怎么寫的。有關(guān) batch 的用法,可以參見這里,相關(guān)的代碼如下2008-03-03
對(duì)YUI擴(kuò)展的Gird組件 Part-2
對(duì)YUI擴(kuò)展的Gird組件 Part-2...2007-03-03
yui3的AOP(面向切面編程)和OOP(面向?qū)ο缶幊?
這篇文章主要介紹了yui3的AOP(面向切面編程)和OOP(面向?qū)ο缶幊?,需要的朋友可以參考下2015-05-05

