?? commonusermainwindow.js
字號:
function newMainWin() {
var tbar = [{
text : '已登記場所',
handler :function(){
// Ext.Msg.alert("",1);
Ext.getCmp("resultPanel").getLayout().setActiveItem(0);
Ext.getCmp("searchPanel").getLayout().setActiveItem(0);
},
id:'locationReg',
iconCls : 'locationReg'// 設置按鈕圖標,與common.css配合
}, '-', {
text : '未登記場所',
iconCls : 'locationNoneReg',
handler:function(){
Ext.getCmp("resultPanel").getLayout().setActiveItem(1);
Ext.getCmp("searchPanel").getLayout().setActiveItem(1);
}
}, '-', {
text : '專職人員',
handler : function(){
Ext.getCmp("resultPanel").getLayout().setActiveItem(2);
Ext.getCmp("searchPanel").getLayout().setActiveItem(2);
},
iconCls : 'professor'
}, '-', {
text : '兼職人員',
handler : function(){
Ext.getCmp("resultPanel").getLayout().setActiveItem(3);
Ext.getCmp("searchPanel").getLayout().setActiveItem(3);
},
iconCls : 'noneProfessor'
}];
var comUserMainWin = new Ext.Window({
title : "武漢基督教信息系統",
//renderTo:document.body,
minWidth : 400,
minHeight : 300,
id : 'comUserMainWin',
width : 400,
height : 300,
layout : 'border',
autoScroll : true,
maximizable : true,// 顯示最大化按鈕
minimizable : true,
constrain : true,
header : true,
tbar : tbar,
items:[{
region:'west',
id:'west-panel',
title:'功能模塊',
split:true,
width: 300,
//autoHeight:true,
minSize: 175,
maxSize: 400,
collapsible: true,
margins:'0 0 0 5',
layout:"accordion",
animate:true,
items:[new newSearchPanel()]
},{
region:'center',
id:'center-panel',
title:'數據模塊',
split:true,
width: 500,
minSize: 175,
maxSize: 400,
//collapsible: true,
margins:'0 0 0 5',
layout:"fit",
animate:true,
items:[new newResultPanel()]
}]
});
comUserMainWin.show();
comUserMainWin.maximize();
Ext.Ajax.request({
url:"/servlet/getMaxId.do",
method:"POST",
params:{locationreg:"locationreg",
unlocationreg:"unlocationreg",
professor:"professor",
noneprofessor:"noneprofessor"
},
success: function(response,options){
var responseArray=Ext.util.JSON.decode(response.responseText);
if(responseArray.success==true){
LoRgtableCount=responseArray.locationreg;//即是數據庫的maxId,用來添加記錄時自動添加id,而不重復
unLoRgtableCount=responseArray.unlocationreg;
professortableCount=responseArray.professor;
noneProfessortableCount=responseArray.noneprofessor;
}
else Ext.Msg.alert("抱歉",responseArray.errors);
},
failure: function(response,options){
Ext.Msg.alert("",response.responseText);
}
});
}
Ext.onReady(function() {
new newMainWin();
Ext.QuickTips.init();
});
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -