comparison app/view/Viewport.js @ 341:6eaa741b396b

Added documentation.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 13 Aug 2013 11:12:09 +0200
parents 1626279daadb
children b8bd8d9a93ab
comparison
equal deleted inserted replaced
340:7cddca668d21 341:6eaa741b396b
1 /**
2 * Viewport for the Lada-Client
3 *
4 * The viewport initialises the graphical elements of the application. For
5 * debugging it is possible to initialize other components directly see the
6 * initComponent function.
7 */
1 Ext.define('Lada.view.Viewport' ,{ 8 Ext.define('Lada.view.Viewport' ,{
2 extend: 'Ext.container.Viewport', 9 extend: 'Ext.container.Viewport',
3 requires: [ 10 requires: [
4 'Lada.store.Info', 11 'Lada.store.Info',
5 'Lada.view.search.List', 12 'Lada.view.search.List',
23 //this.initMesswert(); 30 //this.initMesswert();
24 31
25 this.setInfo(); 32 this.setInfo();
26 this.callParent(arguments); 33 this.callParent(arguments);
27 }, 34 },
35 /**
36 * Set some information about user, client and server version in the top
37 * of the application window. The data will be fetched from the server.
38 */
28 setInfo: function() { 39 setInfo: function() {
29 var store = Ext.create('Lada.store.Info'); 40 var store = Ext.create('Lada.store.Info');
30 store.load({ 41 store.load({
31 callback: function(a,b,c) { 42 callback: function(a,b,c) {
32 var info = store.data.items[0]; 43 var info = store.data.items[0];
39 info.show(); 50 info.show();
40 console.log(info); 51 console.log(info);
41 } 52 }
42 }); 53 });
43 }, 54 },
55 /**
56 * Function to initialize the edit window for a priticular probe directly
57 * @private
58 */
44 initProbe: function() { 59 initProbe: function() {
45 var store = Ext.getStore('Proben'); 60 var store = Ext.getStore('Proben');
46 store.load({ 61 store.load({
47 params: { 62 params: {
48 probeId: "000007575943X" 63 probeId: "000007575943X"
57 var model = store.data.items[0]; 72 var model = store.data.items[0];
58 var win = Ext.create('Lada.view.proben.Edit', {model: model}); 73 var win = Ext.create('Lada.view.proben.Edit', {model: model});
59 } 74 }
60 }); 75 });
61 }, 76 },
77 /**
78 * Function to initialize the edit window for a priticular messwert directly
79 * @private
80 */
62 initMesswert: function() { 81 initMesswert: function() {
63 var store = Ext.getStore('Messwerte'); 82 var store = Ext.getStore('Messwerte');
64 store.load({ 83 store.load({
65 params: { 84 params: {
66 probeId: "000007575853X", 85 probeId: "000007575853X",
70 var model = store.data.items[0]; 89 var model = store.data.items[0];
71 var win = Ext.create('Lada.view.messwerte.Create', {model: model}); 90 var win = Ext.create('Lada.view.messwerte.Create', {model: model});
72 } 91 }
73 }); 92 });
74 }, 93 },
94 /**
95 * Function to initialize the edit window for a priticular ort directly
96 * @private
97 */
75 initOrt: function() { 98 initOrt: function() {
76 var ort = Ext.create('Lada.model.Ort'); 99 var ort = Ext.create('Lada.model.Ort');
77 var win = Ext.create('Lada.view.orte.Create', {model: ort}); 100 var win = Ext.create('Lada.view.orte.Create', {model: ort});
78 }, 101 },
102 /**
103 * Function to initialize the edit window for a priticular ort directly
104 * @private
105 */
79 initMessung: function() { 106 initMessung: function() {
80 var store = Ext.getStore('Messungen'); 107 var store = Ext.getStore('Messungen');
81 var kstore = Ext.getStore('MKommentare'); 108 var kstore = Ext.getStore('MKommentare');
82 var mstore = Ext.getStore('Messwerte'); 109 var mstore = Ext.getStore('Messwerte');
83 var sstore = Ext.getStore('Status'); 110 var sstore = Ext.getStore('Status');
112 //var messung = Ext.create('Lada.model.Messung'); 139 //var messung = Ext.create('Lada.model.Messung');
113 var win = Ext.create('Lada.view.messungen.Create', {model: messung}); 140 var win = Ext.create('Lada.view.messungen.Create', {model: messung});
114 } 141 }
115 }); 142 });
116 }, 143 },
144 /**
145 * Function to initialize the search window. This is the default method
146 * called by the {@link Lada.view.Viewport#initComponent initComponent} method.
147 * @private
148 */
117 initSearch: function() { 149 initSearch: function() {
118 this.items = { 150 this.items = {
119 xtype: 'panel', 151 xtype: 'panel',
120 title: '<center>Probenauswahlmaske</center>', 152 title: '<center>Probenauswahlmaske</center>',
121 bodyPadding: '10 10', 153 bodyPadding: '10 10',

http://lada.wald.intevation.org