EXT富客戶端后臺管理系統(tǒng) 初步代碼
更新時間:2008年09月27日 18:01:45 作者:
EXT富客戶端后臺管理系統(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
};
//項目中集成的模塊
BJExtreme.prototype.ui.menuBar.ModuleInProject = {
text: '項目中集成的模塊' ,
leaf: false ,
children: null
};
BJExtreme.prototype.ui.menuBar.ModuleInProject.children = [
{
text: '互動提示條',leaf: true,ctl: 'ExtjsStudy',act: 'linkTips',
//這個運行的優(yōu)先級高于下面的那個通用的監(jiān)聽控制器
listeners:{click: function (n){window.open(BJExtreme.prototype.buildLinkStr(n.attributes.ctl,n.attributes.act));return false ;}}
}
];
//初始化 菜單項元素 信息 -- 這個必須在 -- 當(dāng)前菜單是使用異步樹組件生成的 , 以后可以添加其他不同的實現(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
]
});
//定義一個簡單的響應(yīng)事件
BJExtreme.prototype.ui.menuBar.listeners = {
click: function (n) //n.attributes 可以獲得AsyncTreeNode的children中的對象
{
if (n.attributes.leaf == true) //葉選項
{
//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
}
}
};
//菜單選項結(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 用來將對象渲染到頁面中的body塊中,會自動改變,每個頁面僅限一個
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>
<!-- //頁面中子導(dǎo)航菜單 -->
</body>
</html>
相關(guān)文章
javascript 放大鏡 v1.0 基于Yui2 實現(xiàn)的放大鏡效果
javascript 放大鏡 v1.0 基于Yui2 實現(xiàn)的放大鏡效果代碼。2010-03-03可縮放Reloaded-一個針對可縮放元素的復(fù)用組件
可縮放Reloaded-一個針對可縮放元素的復(fù)用組件...2007-03-03為Yahoo! UI Extensions Grid增加內(nèi)置的可編輯器
為Yahoo! UI Extensions Grid增加內(nèi)置的可編輯器...2007-03-03學(xué)習(xí)YUI.Ext 第七天--關(guān)于View&JSONView
學(xué)習(xí)YUI.Ext 第七天--關(guān)于View&JSONView...2007-03-03javascript YUI 讀碼日記之 YAHOO.util.Dom - Part.4
YAHOO.util.Dom 中的 getXY 函數(shù)讓開發(fā)者充分體驗到不同瀏覽器的 Hack 的樂趣。IE8 即將破殼而出,但愿下面的函數(shù)不會又多個 if 判斷。getXY 函數(shù)使用 匿名函數(shù)執(zhí)行返回 函數(shù)(聽起來有點拗口,可以參考 圓心 Blog 上的一篇文章)。2008-03-03