var tab_win;
var grid;
var xpanel
var mpanel = Ext.ux.ManagedIframePanel;
var CONTAINER;
Ext.onReady(function() {
Ext.QuickTips.init();
var grid_width;
var grid_height;
if (Ext.isIE6) {
grid_width = document.body.clientWidth – 2;
grid_height = document.body.clientHeight – 2;
} else if (Ext.isIE7) {
grid_width = document.documentElement.clientWidth – 2;
grid_height = document.documentElement.clientHeight – 2;
} else {
grid_width = self.innerWidth – 2;
grid_height = self.innerHeight – 2;
}
// toobar for grid
var toolbar = new Ext.Toolbar([`->`, {
`text` : `重新整理`,
iconCls : `fresh`,
handler : reload
}]);
xpanel = new mpanel ({
title : title,
tbar : toolbar,
closable : false,
frameBorder: 0,
height : grid_height,
width : grid_width,
loadMask : {
msg : `正在載入新增頁面…`,
disable : false
},
defaultSrc:url1
});
tab_win = new Ext.TabPanel({
renderTo : `x-like18-calendar-grid`,
activeTab : 0,
height : grid_height,
width : grid_width,
frame : true,
plain : false,
items : [xpanel]
});
CONTAINER = tab_win;
function reload(){
xpanel.setSrc(url1);
}
});
function reback(dat.){
if(dat. != “”) {
xpanel.setSrc(url2+dat.);
} else {
xpanel.setSrc(url1);
}
}
if (`undefined` === typeof CONTAINER) {
alert(`沒有定義CONTAINER變數,無法開啟會員資訊頁面!`);
return;
}
var xpanel = Ext.getCmp(id);
if (xpanel != null) {
CONTAINER.remove(xpanel);
xpanel.destroy();
}
xpanel = new Ext.ux.ManagedIframePanel(config);
CONTAINER.add(xpanel);
CONTAINER.setActiveTab(xpanel);
}
$(`#today`).datepicker({showOn: “both”, buttonImage: “../datepicker.gif”, buttonImageOnly: true,onSelect:function(){
var view_day = $(`#today`).val();
var args = $(`#args`).val();
$.blockUI(`<img src=“../loading.gif”/>`);
window.location = args + `&view_day=` + view_day;
}});
$(`a`).mousemove(function(){
window.status = `XXX後臺管理`;
});
});