comparison app/view/Viewport.js @ 259:d19ad9d28de5

Added code to show general information about the application in the probenauswahlliste.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 25 Jul 2013 14:26:06 +0200
parents 125e2d43cd0f
children 1626279daadb
comparison
equal deleted inserted replaced
258:62e92e470a1e 259:d19ad9d28de5
1 Ext.define('Lada.view.Viewport' ,{ 1 Ext.define('Lada.view.Viewport' ,{
2 extend: 'Ext.container.Viewport', 2 extend: 'Ext.container.Viewport',
3 requires: [ 3 requires: [
4 'Lada.store.Info',
5 'Lada.view.search.List',
4 'Lada.view.search.List', 6 'Lada.view.search.List',
5 'Lada.view.proben.List', 7 'Lada.view.proben.List',
6 'Lada.view.widgets.Mst', 8 'Lada.view.widgets.Mst',
7 'Lada.view.widgets.Uwb', 9 'Lada.view.widgets.Uwb',
8 'Lada.view.widgets.Datetime' 10 'Lada.view.widgets.Datetime'
9 ], 11 ],
10
11 initComponent: function() { 12 initComponent: function() {
12 console.log('Setting up Viewport'); 13 console.log('Setting up Viewport');
13 this.initSearch(); 14 this.initSearch();
14 15
15 // Development related: 16 // Development related:
19 //this.initProbe(); 20 //this.initProbe();
20 //this.initOrt(); 21 //this.initOrt();
21 //this.initMessung(); 22 //this.initMessung();
22 //this.initMesswert(); 23 //this.initMesswert();
23 24
25 this.setInfo();
24 this.callParent(arguments); 26 this.callParent(arguments);
27 },
28 setInfo: function() {
29 var store = Ext.create('Lada.store.Info');
30 store.load({
31 callback: function(a,b,c) {
32 var info = store.data.items[0];
33 var clientVersion = "-/- (-/-)";
34 var user = info.get('user');
35 var groups = info.get('groups');
36 var serverVersion = info.get('version');
37 var info = Ext.getCmp('systeminfo');
38 info.update('Nutzer: '+user+' | Gruppe(n): '+groups+' | Server: '+serverVersion+' | Client: '+clientVersion);
39 info.show();
40 console.log(info);
41 }
42 });
25 }, 43 },
26 initProbe: function() { 44 initProbe: function() {
27 var store = Ext.getStore('Proben'); 45 var store = Ext.getStore('Proben');
28 store.load({ 46 store.load({
29 params: { 47 params: {
100 this.items = { 118 this.items = {
101 xtype: 'panel', 119 xtype: 'panel',
102 title: '<center>Probenauswahlmaske</center>', 120 title: '<center>Probenauswahlmaske</center>',
103 bodyPadding: '10 10', 121 bodyPadding: '10 10',
104 items: [ 122 items: [
123 // Informationen über Nutzer/Gruppe/Version
124 {
125 xtype: 'panel',
126 id: 'systeminfo',
127 bodyPadding: '5',
128 hidden: true,
129 },
105 // Auswahl einer Abfrage. 130 // Auswahl einer Abfrage.
106 { 131 {
107 xtype: 'queryselector', 132 xtype: 'queryselector',
108 margin: '0 0 10 0' 133 margin: '0 0 10 0'
109 }, 134 },

http://lada.wald.intevation.org