annotate app.js @ 473:b2501a488480

Added license text
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 17 Jan 2014 11:39:46 +0100
parents debfcc7713e3
children 32ccce3b62a9
rev   line source
472
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
2 * Software engineering by Intevation GmbH
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
3 *
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
7 */
debfcc7713e3 Added license header to each file.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 421
diff changeset
8
421
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
9 Ext.Loader.setConfig({
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
10 enabled: true,
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
11 paths: {
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
12 'Ext.ux.form.DateTimeField': 'resources/datetime/UX_DateTimeField.js',
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
13 'Ext.ux.DateTimeMenu': 'resources/datetime/UX_DateTimeMenu.js',
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
14 'Ext.ux.DateTimePicker': 'resources/datetime/UX_DateTimePicker.js',
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
15 'Ext.ux.form.TimePickerField': 'resources/datetime/UX_TimePickerField.js'
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
16 }
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
17 });
f06a882ab776 Added compiler tags for sencha cmd compiler and made the DateTime lib compile.
Raimund Renkert <rrenkert@intevation.de>
parents: 311
diff changeset
18
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 Ext.application({
118
f2579cadaee8 Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 117
diff changeset
20
f2579cadaee8 Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 117
diff changeset
21 // Name of the application. Do not change as this name is used in
f2579cadaee8 Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 117
diff changeset
22 // references!
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
23 name: 'Lada',
118
f2579cadaee8 Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 117
diff changeset
24
117
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
25 // Setting up translations. This is done using a ext-plgin which can be
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
26 // found on https://github.com/elmasse/Ext.i18n.Bundle
311
d80bb62b7fd4 Required Lada.lib.Helpers
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 206
diff changeset
27 requires: ['Ext.i18n.Bundle', 'Lada.lib.Helpers'],
73
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
28 bundle: {
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
29 bundle: 'Lada',
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
30 lang: 'de-DE',
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
31 path: 'resources',
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
32 noCache: true
7661f09466cc Added i18n extension. Note: This extension must be installed. See https://github.com/elmasse/Ext.i18n.Bundle/wiki/HowTo
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 54
diff changeset
33 },
118
f2579cadaee8 Formatting
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 117
diff changeset
34
117
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
35 // Setting this variable to true triggers loading the Viewport.js
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
36 // file which sets ob the viewport.
25
f964a50bfe57 Restructured the application. Fixed layouts etc.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 24
diff changeset
37 autoCreateViewport: true,
117
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
38
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
39 // Start the application.
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
40 launch: function() {
2
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
41 console.log('Launching the application');
570373979387 Added a simple panel to the application.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 0
diff changeset
42 },
117
5ef91e9ac7b1 Clean up code and improve comments.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 110
diff changeset
43
3
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
44 // 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
45 // first before the application "launch" function is called.
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
46 controllers: [
121
c05fda928b82 Cleanup part two. Reenabled Proben edit but one use minimum version of the probenedit. Move some stores to the combobox definitons
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 120
diff changeset
47 'Sql',
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
48 'Proben',
144
7b1140bd8b3d Re-Added Kommentare
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 130
diff changeset
49 'Zusatzwerte',
149
26ac4c99f8c4 Added Orte.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 144
diff changeset
50 'Kommentare',
206
32e1356cf391 Preload Mkommentar Controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 202
diff changeset
51 'MKommentare',
157
237a4efe715a Enabled loading Messungen.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 149
diff changeset
52 'Orte',
190
781113839155 Fixed name of store.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 157
diff changeset
53 'Messungen',
202
7a4d93c9b0ff Added status controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 190
diff changeset
54 'Messwert',
7a4d93c9b0ff Added status controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 190
diff changeset
55 'Status'
3
ac736eea9b30 Initialise the Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 2
diff changeset
56 ]
0
1e257ec56220 Initial commit
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
57 });
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
58
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
59 Ext.data.writer.Json.override({
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
60 getRecordData: function(record, getEverything) {
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
61 if(this.writeEverything || record.writeEverything){
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
62 console.log('getRecordData', this,arguments);
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
63 return record.getAllData();
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
64 } else {
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
65 return this.callOverridden(arguments);
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
66 }
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
67 }
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
68 });
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
69
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
70 Ext.data.Model.addMembers({
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
71 getAllData: function() {
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
72 var data1 = this.getData();
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
73 var data2 = this.getAssociatedData( );
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
74 var dataMerged = Ext.Object.merge(data1, data2);
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
75 return dataMerged;
130
747d488b9203 Added function getEidi which returns the part of the id of an item which needs
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 122
diff changeset
76 },
747d488b9203 Added function getEidi which returns the part of the id of an item which needs
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 122
diff changeset
77 getEidi: function() {
747d488b9203 Added function getEidi which returns the part of the id of an item which needs
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 122
diff changeset
78 return "/" + this.getId();
122
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
79 }
a7bfaeb1655d Cleanup part three. Reenabled Zusatzwerte and implemented sending nested data.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 121
diff changeset
80 });

http://lada.wald.intevation.org