3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
17 * Copyright(c) 2006-2011 Sencha Inc.
18 * licensing@sencha.com
19 * http://www.sencha.com/license
22 Ext.define('MyDesktop.AccordionWindow', {
23 extend: 'Ext.ux.desktop.Module',
27 'Ext.layout.container.Accordion',
36 text: 'Accordion Window',
38 handler : this.createWindow,
43 createTree : function(){
44 var tree = Ext.create('Ext.tree.Panel', {
46 title: 'Online Users',
52 handler: function(c, t) {
53 tree.setLoading(true, tree.body);
54 var root = tree.getRootNode();
55 root.collapseChildren(true, false);
56 Ext.Function.defer(function() { // mimic a server call
57 tree.setLoading(false);
58 root.expand(true, true);
62 store: Ext.create('Ext.data.TreeStore', {
70 { text:'Brian', iconCls:'user', leaf:true },
71 { text:'Kevin', iconCls:'user', leaf:true },
72 { text:'Mark', iconCls:'user', leaf:true },
73 { text:'Matt', iconCls:'user', leaf:true },
74 { text:'Michael', iconCls:'user', leaf:true },
75 { text:'Mike Jr', iconCls:'user', leaf:true },
76 { text:'Mike Sr', iconCls:'user', leaf:true },
77 { text:'JR', iconCls:'user', leaf:true },
78 { text:'Rich', iconCls:'user', leaf:true },
79 { text:'Nige', iconCls:'user', leaf:true },
80 { text:'Zac', iconCls:'user', leaf:true }
86 { text:'Kiana', iconCls:'user-girl', leaf:true },
87 { text:'Aubrey', iconCls:'user-girl', leaf:true },
88 { text:'Cale', iconCls:'user-kid', leaf:true }
98 createWindow : function(){
99 var desktop = this.app.getDesktop();
100 var win = desktop.getWindow('acc-win');
103 win = desktop.createWindow({
105 title: 'Accordion Window',
108 iconCls: 'accordion',
110 constrainHeader: true,
116 tooltip:{title:'Rich Tooltips', text:'Let your users know what they can do!'},
121 tooltip:'Add a new user',
126 tooltip:'Remove the selected user',
127 iconCls:'user-delete'
138 html:'<p>Something useful would be in here.</p>',
142 title: 'Even More Stuff',
143 html : '<p>Something useful would be in here.</p>'
147 html : '<p>Something useful would be in here.</p>'