annotate app/view/Viewport.js @ 797:b8fd43021c29

Added a Window to alter Orte of a Messprogramm
author Dustin Demuth <dustin@intevation.de>
date Wed, 20 May 2015 16:48:03 +0200
parents 56f91254cd23
children 4b9b1d3ad9f1
rev   line source
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
9 /**
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
10 * Viewport for the Lada-Client
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
11 *
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
12 * The viewport initialises the graphical elements of the application. For
747
3ffecbce17d6 Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents: 716
diff changeset
13 * debugging it is possible to initialise other components directly see the
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14 * initComponent function.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
15 */
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
16 Ext.define('Lada.view.Viewport', {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
17 extend: 'Ext.container.Viewport',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
18 requires: [
747
3ffecbce17d6 Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents: 716
diff changeset
19 'Lada.view.ProbenPlanungSwitcher',
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
20 'Lada.view.FilterPanel',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
21 'Lada.view.grid.FilterResult'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
22 ],
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
23 layout: 'fit',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 initComponent: function() {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 this.items = [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
26 title: '<center>Labordatenerfassung</center>',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
27 layout: 'border',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 name: 'main',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
29 items: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 layout: {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 type: 'vbox',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
32 align: 'stretch'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 },
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
34 region: 'west',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
35 split: true,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
36 border: 1,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
37 flex: 1,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
38 dockedItems: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
39 xtype: 'toolbar',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
40 dock: 'top',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
41 items: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
42 xtype: 'splitbutton',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 text: 'Info',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 menu: {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 items: [{
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46 text: 'About',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
47 action: 'about'
693
817524db4017 Readonly was missing
Dustin Demuth <dustin@intevation.de>
parents: 548
diff changeset
48 }, {
716
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
49 text: 'Anmeldeinformationen',
693
817524db4017 Readonly was missing
Dustin Demuth <dustin@intevation.de>
parents: 548
diff changeset
50 handler: function(){
716
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
51 logintime = new Date(Lada.logintime);
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
52 Ext.Msg.alert("Anmeldeinformationen",
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
53 "<p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
54 + "Sie sind angemeldet mit der Kennung:"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
55 + "<br />"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
56 + Lada.username
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
57 + "</p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
58 + "<p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
59 + "Sie sind Mitglied der folgenden "
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
60 + "Gruppen:"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
61 + "<br />"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
62 + Lada.userroles
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
63 + "</p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
64 + "<p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
65 + "<br/>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
66 + "Die Anmeldung wurde durchgeführt um:"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
67 + "<br />"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
68 + Ext.Date.format(logintime, 'd.m.Y H:i:s P')
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
69 + "</p>"
b400629a2575 Added Logininformation to a Popup in Viewport
Dustin Demuth <dustin@intevation.de>
parents: 693
diff changeset
70 );
693
817524db4017 Readonly was missing
Dustin Demuth <dustin@intevation.de>
parents: 548
diff changeset
71 }
817524db4017 Readonly was missing
Dustin Demuth <dustin@intevation.de>
parents: 548
diff changeset
72 }
817524db4017 Readonly was missing
Dustin Demuth <dustin@intevation.de>
parents: 548
diff changeset
73 ]
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
74 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
75 }, '->', {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 xtype: 'tbtext',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77 id: 'userinfo',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
78 text: ''
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
79 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
80 xtype: 'tbtext',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
81 id: 'groupinfo',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
82 text: ''
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
83 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 }],
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 items: [{
747
3ffecbce17d6 Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents: 716
diff changeset
86 xtype: 'probenplanungswitcher',
3ffecbce17d6 Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents: 716
diff changeset
87 margin: '0, 10, 0, 10'
3ffecbce17d6 Radio-Buttons to switch between query-modes: Probenliste und Probenplanung. Filter-Combobox store wird automatisch gewechselt. ToDo: Query-Store für Probenplanung
Dustin Demuth <dustin@intevation.de>
parents: 716
diff changeset
88 }, {
548
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
89 // Auswahl einer Abfrage.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
90 xtype: 'filterpanel',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91 margin: '0, 10, 0, 10'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 // Variables settings for the current selected sql statement.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 xtype: 'fieldset',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
95 name: 'filtervariables',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
96 title: 'Variablenbelegung',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
97 hidden: true,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
98 margin: '0, 10, 0, 10',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
99 items: []
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
100 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
101 }, {
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
102 // Resultlist for the query.
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
103 flex: 3,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
104 xtype: 'filterresultgrid',
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
105 hidden: false,
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
106 region: 'center'
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
107 }]
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
108 }];
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
109 this.callParent(arguments);
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
110 }
d47ee7439f44 Added new js files.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111 });

http://lada.wald.intevation.org