]> git.proxmox.com Git - proxmox-backup.git/blob - www/Application.js
start the GUI
[proxmox-backup.git] / www / Application.js
1 /*global Proxmox*/
2 Ext.define('PBS.Application', {
3 extend: 'Ext.app.Application',
4
5 name: 'PBS',
6 appProperty: 'app',
7
8 stores: [
9 // 'NavigationStore'
10 ],
11
12 layout: 'fit',
13
14 realignWindows: function() {
15 var modalwindows = Ext.ComponentQuery.query('window[modal]');
16 Ext.Array.forEach(modalwindows, function(item) {
17 item.center();
18 });
19 },
20
21 logout: function() {
22 var me = this;
23 //Proxmox.Utils.authClear();
24 //me.changeView('loginview', true);
25 },
26
27 changeView: function(view, skipCheck) {
28 var me = this;
29 //?
30 },
31
32 launch: function() {
33 var me = this;
34 Ext.on('resize', me.realignWindows);
35
36 var provider = new Ext.state.LocalStorageProvider({ prefix: 'ext-pbs-' });
37 Ext.state.Manager.setProvider(provider);
38
39 // fixme: show login window if not loggedin
40
41 me.currentView = Ext.create({
42 xtype: 'mainview'
43 });
44 }
45 });
46
47 Ext.application('PBS.Application');