?? plugins.js
字號:
/*
* Use Plugin Namespace
*/
var Plugin = Plugin || {};
/*
* Setup desktop plugins
*/
Plugins = new Ext.app.App({
init :function(){
Ext.QuickTips.init();
},
getModules : function(){
return [
//new Plugin.LayoutWindow(),
new Plugin.GridWindow(),
new Plugin.TabWindow(),
new Plugin.AccordionWindow(),
new Plugin.oa_bbs_Window(),
new Plugin.sys_class_Window(),
new Plugin.sys_user_Window(),
new Plugin.oa_file_Window()
//new Plugin.BogusMenuModule(),
//new Plugin.BogusModule()
];
}
});
Plugin.sys_user_Window = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: '發布分類信息',
iconCls:'accordion',
handler:function(){ window.location = "/main.jsp?menu_id=newc8h4mB080X0G85Be2&menu_class=3&subsys_code=B2B"; },
//handler : this.createWindow,
scope: this
}
},
createWindow : function(src){}
});
Plugin.sys_class_Window = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: '網絡招聘人才',
iconCls:'accordion',
handler:function(){ window.location = "/main.jsp?menu_id=03S3K51540cm60753387&menu_class=3&subsys_code=B2B"; },
//handler : this.createWindow,
scope: this
}
},
createWindow : function(src){}
});
/*
* Example windows
*/
Plugin.GridWindow = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: '產品信息管理',
iconCls:'icon-grid',
handler:function(){ window.location = "/main.jsp?menu_id=d6fFy7S7O4tP00W54cp1&menu_class=3&subsys_code=B2B"; },
scope: this
}
},
createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('grid-win');
if(!win){
win = desktop.createWindow({
id: 'grid-win',
title:'Grid Window',
width:740,
height:480,
x:10,
y:10,
iconCls: 'icon-grid',
shim:false,
animCollapse:false,
constrainHeader:true,
layout: 'fit',
items:
new Ext.grid.GridPanel({
border:false,
ds: new Ext.data.Store({
reader: new Ext.data.ArrayReader({}, [
{name: 'company'},
{name: 'price', type: 'float'},
{name: 'change', type: 'float'},
{name: 'pctChange', type: 'float'},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
]),
data: Ext.grid.dummyData
}),
cm: new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),
{id:'company',header: "Company", width: 120, sortable: true, dataIndex: 'company'},
{header: "Price", width: 70, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{header: "Change", width: 70, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 70, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 95, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]),
viewConfig: {
forceFit:true
},
//autoExpandColumn:'company',
tbar:[{
text:'Add Something',
tooltip:'Add a new row',
iconCls:'add'
}, '-', {
text:'Options',
tooltip:'Blah blah blah blaht',
iconCls:'option'
},'-',{
text:'Remove Something',
tooltip:'Remove the selected item',
iconCls:'remove'
}]
})
});
}
win.show();
}
});
Plugin.TabWindow = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: '產品型號管理',
iconCls:'tabs',
handler:function(){ window.location = "/main.jsp?menu_id=prot4n2mB080X0G85Be1&menu_class=3&subsys_code=B2B"; },
scope: this
}
},
createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('tab-win');
if(!win){
win = desktop.createWindow({
id: 'tab-win',
title:'Tab Window',
width:740,
height:480,
x:10,
y:10,
iconCls: 'tabs',
shim:false,
animCollapse:false,
border:false,
constrainHeader:true,
layout: 'fit',
items:
new Ext.TabPanel({
activeTab:0,
items: [{
title: 'Tab Text 1',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
},{
title: 'Tab Text 2',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
},{
title: 'Tab Text 3',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
},{
title: 'Tab Text 4',
header:false,
html : '<p>Something useful would be in here.</p>',
border:false
}]
})
});
}
win.show();
}
});
Plugin.AccordionWindow = Ext.extend(Ext.app.Module, {
init : function(){
this.launcher = {
text: '綜合留言管理',
iconCls:'accordion',
handler:function(){ window.location = "/main.jsp?&menu_id=S3f8x5Tv5Ty0sJ6&menu_class=2&subsys_code=B2B"; },
//handler : this.createWindow,
scope: this
}
},
createWindow : function(){
var desktop = this.app.getDesktop();
var win = desktop.getWindow('acc-win');
if(!win){
win = desktop.createWindow({
id: 'acc-win',
title: 'Accordion Window',
width:250,
height:400,
x:10,
y:10,
iconCls: 'accordion',
shim:false,
animCollapse:false,
constrainHeader:true,
tbar:[{
tooltip:{title:'Rich Tooltips', text:'Let your users know what they can do!'},
iconCls:'connect'
},'-',{
tooltip:'Add a new user',
iconCls:'user-add'
},' ',{
tooltip:'Remove the selected user',
iconCls:'user-delete'
}],
layout:'accordion',
border:false,
layoutConfig: {
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -