acc-win-override.js
上传用户:snow1005
上传日期:2015-11-10
资源大小:3151k
文件大小:6k
- /* Override the module code here.
- * This code will be Loaded on Demand.
- */
- Ext.override(QoDesk.AccordionWindow, {
-
- 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,
- iconCls: 'acc-icon',
- shim:false,
- animCollapse:false,
- constrainHeader:true,
- maximizable: false,
- taskbuttonTooltip: '<b>Accordion Window</b><br />A window with an accordion layout',
- tbar:[{
- tooltip:'<b>Rich Tooltips</b><br />Let your users know what they can do!',
- iconCls:'demo-acc-connect'
- },'-',{
- tooltip:'Add a new user',
- iconCls:'demo-acc-user-add'
- },' ',{
- tooltip:'Remove the selected user',
- iconCls:'demo-acc-user-delete'
- }],
- layout: 'accordion',
- layoutConfig: {
- animate:false
- },
- items: [
- new Ext.tree.TreePanel({
- id:'im-tree',
- title: 'Online Users',
- loader: new Ext.tree.TreeLoader(),
- rootVisible:false,
- lines:false,
- autoScroll:true,
- useArrows: true,
- tools:[{
- id:'refresh',
- on:{
- click: function(){
- var tree = Ext.getCmp('im-tree');
- tree.body.mask('Loading', 'x-mask-loading');
- tree.root.reload();
- tree.root.collapse(true, false);
- setTimeout(function(){ // mimic a server call
- tree.body.unmask();
- tree.root.expand(true, true);
- }, 1000);
- }
- }
- }],
- root: new Ext.tree.AsyncTreeNode({
- text:'Online',
- children:[{
- text:'Friends',
- expanded:true,
- children:[{
- text:'Jack',
- iconCls:'user',
- leaf:true
- },{
- text:'Brian',
- iconCls:'user',
- leaf:true
- },{
- text:'Jon',
- iconCls:'user',
- leaf:true
- },{
- text:'Tim',
- iconCls:'user',
- leaf:true
- },{
- text:'Nige',
- iconCls:'user',
- leaf:true
- },{
- text:'Fred',
- iconCls:'user',
- leaf:true
- },{
- text:'Bob',
- iconCls:'user',
- leaf:true
- }]
- },{
- text:'Family',
- expanded:true,
- children:[{
- text:'Kelly',
- iconCls:'user-girl',
- leaf:true
- },{
- text:'Sara',
- iconCls:'user-girl',
- leaf:true
- },{
- text:'Zack',
- iconCls:'user-kid',
- leaf:true
- },{
- text:'John',
- iconCls:'user-kid',
- leaf:true
- }]
- }]
- })
- }), {
- title: 'Settings',
- html:'<p>Something useful would be in here.</p>',
- autoScroll:true
- },{
- title: 'Even More Stuff',
- html : '<p>Something useful would be in here.</p>'
- },{
- title: 'My Stuff',
- html : '<p>Something useful would be in here.</p>'
- }
- ]
- });
- }
- win.show();
- }
- });