]> git.proxmox.com Git - extjs.git/blame - extjs/examples/classic/desktop/app/App.js
add extjs 6.0.1 sources
[extjs.git] / extjs / examples / classic / desktop / app / App.js
CommitLineData
6527f429
DM
1/*!\r
2 * Ext JS Library\r
3 * Copyright(c) 2006-2014 Sencha Inc.\r
4 * licensing@sencha.com\r
5 * http://www.sencha.com/license\r
6 */\r
7\r
8Ext.define('Desktop.App', {\r
9 extend: 'Ext.ux.desktop.App',\r
10\r
11 requires: [\r
12 'Ext.window.MessageBox',\r
13\r
14 'Ext.ux.desktop.ShortcutModel',\r
15\r
16 'Desktop.SystemStatus',\r
17 'Desktop.VideoWindow',\r
18 'Desktop.GridWindow',\r
19 'Desktop.TabWindow',\r
20 'Desktop.AccordionWindow',\r
21 'Desktop.Notepad',\r
22 'Desktop.BogusMenuModule',\r
23 'Desktop.BogusModule',\r
24\r
25// 'Desktop.Blockalanche',\r
26 'Desktop.Settings'\r
27 ],\r
28\r
29 init: function() {\r
30 // custom logic before getXYZ methods get called...\r
31\r
32 this.callParent();\r
33\r
34 // now ready...\r
35 },\r
36\r
37 getModules : function(){\r
38 return [\r
39 new Desktop.VideoWindow(),\r
40 //new Desktop.Blockalanche(),\r
41 new Desktop.SystemStatus(),\r
42 new Desktop.GridWindow(),\r
43 new Desktop.TabWindow(),\r
44 new Desktop.AccordionWindow(),\r
45 new Desktop.Notepad(),\r
46 new Desktop.BogusMenuModule(),\r
47 new Desktop.BogusModule()\r
48 ];\r
49 },\r
50\r
51 getDesktopConfig: function () {\r
52 var me = this, ret = me.callParent();\r
53\r
54 return Ext.apply(ret, {\r
55 //cls: 'ux-desktop-black',\r
56\r
57 contextMenuItems: [\r
58 { text: 'Change Settings', handler: me.onSettings, scope: me }\r
59 ],\r
60\r
61 shortcuts: Ext.create('Ext.data.Store', {\r
62 model: 'Ext.ux.desktop.ShortcutModel',\r
63 data: [\r
64 { name: 'Grid Window', iconCls: 'grid-shortcut', module: 'grid-win' },\r
65 { name: 'Accordion Window', iconCls: 'accordion-shortcut', module: 'acc-win' },\r
66 { name: 'Notepad', iconCls: 'notepad-shortcut', module: 'notepad' },\r
67 { name: 'System Status', iconCls: 'cpu-shortcut', module: 'systemstatus'}\r
68 ]\r
69 }),\r
70\r
71 wallpaper: 'resources/images/wallpapers/Blue-Sencha.jpg',\r
72 wallpaperStretch: false\r
73 });\r
74 },\r
75\r
76 // config for the start menu\r
77 getStartConfig : function() {\r
78 var me = this, ret = me.callParent();\r
79\r
80 return Ext.apply(ret, {\r
81 title: 'Don Griffin',\r
82 iconCls: 'user',\r
83 height: 300,\r
84 toolConfig: {\r
85 width: 100,\r
86 items: [\r
87 {\r
88 text:'Settings',\r
89 iconCls:'settings',\r
90 handler: me.onSettings,\r
91 scope: me\r
92 },\r
93 '-',\r
94 {\r
95 text:'Logout',\r
96 iconCls:'logout',\r
97 handler: me.onLogout,\r
98 scope: me\r
99 }\r
100 ]\r
101 }\r
102 });\r
103 },\r
104\r
105 getTaskbarConfig: function () {\r
106 var ret = this.callParent();\r
107\r
108 return Ext.apply(ret, {\r
109 quickStart: [\r
110 { name: 'Accordion Window', iconCls: 'accordion', module: 'acc-win' },\r
111 { name: 'Grid Window', iconCls: 'icon-grid', module: 'grid-win' }\r
112 ],\r
113 trayItems: [\r
114 { xtype: 'trayclock', flex: 1 }\r
115 ]\r
116 });\r
117 },\r
118\r
119 onLogout: function () {\r
120 Ext.Msg.confirm('Logout', 'Are you sure you want to logout?');\r
121 },\r
122\r
123 onSettings: function () {\r
124 var dlg = new Desktop.Settings({\r
125 desktop: this.desktop\r
126 });\r
127 dlg.show();\r
128 }\r
129});\r