annotate app.js @ 24:72778ac34dbb

Do not autoload the data from the server. Only load an request.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 07 May 2013 17:20:11 +0200
parents 3eaeeec2bb28
children f964a50bfe57
rev   line source
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.application({
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 name: 'Lada',
10
21d7b63f8783 Do not autocreate a viewport as automatic loading of the Viewport.js fiel
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 9
diff changeset
3 // Setting this variable to true should trigger loading the Viewport.js
21d7b63f8783 Do not autocreate a viewport as automatic loading of the Viewport.js fiel
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 9
diff changeset
4 // file which sets ob the viewport. But this does not happen.
21d7b63f8783 Do not autocreate a viewport as automatic loading of the Viewport.js fiel
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 9
diff changeset
5 autoCreateViewprt: false,
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 launch: function() {
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 // Start the application.
2
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
8 console.log('Launching the application');
11
06da8faa2806 Added some comment.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 10
diff changeset
9
06da8faa2806 Added some comment.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 10
diff changeset
10 // This code works here, but this should usually be done in the
06da8faa2806 Added some comment.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 10
diff changeset
11 // Viewport.js class.
06da8faa2806 Added some comment.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 10
diff changeset
12 Ext.create('Ext.panel.Panel', {
06da8faa2806 Added some comment.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 10
diff changeset
13 renderTo: Ext.getBody(),
17
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
14 title: '<center>Probenauswahlmaske</center>',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
15 items:[
2
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
16 {
17
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
17 xtype: 'panel',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
18 id: 'searchSelection',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
19 border: false,
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
20 items: [
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
21 // 1. SQL-Selection
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
22 // 1.1 Just a small texttual field
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
23 {
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
24 xtype: 'displayfield',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
25 padding : '10 0',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
26 fieldLabel: '<b>SQL-Auswahl</b>'
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
27 },
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
28 // 1.2 Selection of prepared sql statements
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
29 {
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
30 xtype: 'sqllist'
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
31 }
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
32 ]
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
33 },
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
34 {
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
35 xtype: 'panel',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
36 id: 'searchVariables',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
37 hidden: true,
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
38 border: false,
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
39 items: [
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
40 // 2. Variable-Definition. Depending on the SQL-Selection we
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
41 // need to show a small form to be able to diefine some values
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
42 // within the preselected Search-statement.
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
43 // 2.1 Just a small texttual field
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
44 {
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
45 xtype: 'displayfield',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
46 padding : '10 0',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
47 fieldLabel: '<b>Variablenbelegung (Zeiten in UTC)</b>',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
48 labelWidth: 500
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
49 }
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
50
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
51 ]
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
52 },
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
53 {
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
54 xtype: 'probenlist',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
55 id: 'searchResult',
3eaeeec2bb28 Changed layout and added Listeners to show the correct variable definition for
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 11
diff changeset
56 hidden: true,
2
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
57 }
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
58 ]
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
59 });
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
60 },
3
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
61 // Define the controllers of the application. They will be initialized
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
62 // first before the application "launch" function is called.
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
63 controllers: [
6
8e79bda4d55b Added a list to select predefined SQL Statement for the Proben list.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
64 'Proben',
8e79bda4d55b Added a list to select predefined SQL Statement for the Proben list.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
65 'Sql'
3
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
66 ]
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
67 });

http://lada.wald.intevation.org