annotate app/controller/grid/Ortszuordnung.js @ 1279:291df0037835

Ortszuordnung window: create, change and display (wip)
author Maximilian Krambach <mkrambach@intevation.de>
date Wed, 18 Jan 2017 11:41:50 +0100
parents 981339d774b8
children faecbb446a04
rev   line source
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
3 *
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU GPL (v>=3)
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
6 * the documentation coming with IMIS-Labordaten-Application for details.
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
7 */
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
8
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
9 /**
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
10 * This is a controller for a grid of Orte
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
11 */
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
12 Ext.define('Lada.controller.grid.Ortszuordnung', {
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
13 extend: 'Ext.app.Controller',
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
14
602
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
15 requires: [
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
16 'Lada.view.window.Ortszuordnung',
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
17 'Lada.view.form.Ortserstellung'
602
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
18 ],
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
19
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
20 /**
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
21 * Inhitialize the controller
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
22 * It has 3 listeners
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
23 */
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
24 init: function() {
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
25 this.control({
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
26 'ortszuordnunggrid': {
602
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
27 itemdblclick: this.open
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
28 },
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
29 'ortszuordnunggrid button[action=add]': {
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
30 click: this.add
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
31 },
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
32 'ortszuordnunggrid button[action=delete]': {
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
33 click: this.remove
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
34 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
35 'ortszuordnungwindow toolbar button[action=createort]':{
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
36 click: this.createort
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
37 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
38 'ortszuordnungwindow toolbar button[action=frommap]':{
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
39 click: this.frommap
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
40 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
41 'ortszuordnungwindow toolbar button[action=clone]':{
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
42 click: this.cloneort
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
43 }
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
44 });
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
45 },
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
46
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
47 /**
1013
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
48 * When open is called, a {@link Lada.view.window.Ortszuordnung}
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
49 * is created which allows to edit the Orte
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
50 */
602
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
51 open: function(grid, record) {
690
e88381fb3bdb Use treeModiefied timestamp to determine if working with 'old' objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 644
diff changeset
52 var probe = grid.up('window').record;
1013
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
53 var win = Ext.create('Lada.view.window.Ortszuordnung', {
690
e88381fb3bdb Use treeModiefied timestamp to determine if working with 'old' objects.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 644
diff changeset
54 parentWindow: grid.up('window'),
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
55 probe: probe,
1028
2e7adc19b4fe Do not copy the Record to the Ortszuordnungwin
Dustin Demuth <dustin@intevation.de>
parents: 1022
diff changeset
56 record: record,
644
71e8b84d7829 Reload grids on messung or ort changed/added.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 643
diff changeset
57 grid: grid
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
58 });
602
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
59 win.show();
e1ab24758392 Updated the ort grid controller.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 587
diff changeset
60 win.initData();
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
61 },
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
62
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
63 /**
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
64 * This function adds a new row to add an Ort
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
65 */
643
477379250512 Open the ort create window on button click.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 602
diff changeset
66 add: function(button) {
477379250512 Open the ort create window on button click.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 602
diff changeset
67 var probe = button.up('window').record;
1013
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
68 var win = Ext.create('Lada.view.window.Ortszuordnung', {
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
69 parentWindow: button.up('window'),
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
70 probe: probe,
75ce503ab296 Added a Ortszuordnungwindow and Form
Dustin Demuth <dustin@intevation.de>
parents: 1012
diff changeset
71 record: null,
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
72 grid: button.up('ortszuordnung')
643
477379250512 Open the ort create window on button click.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 602
diff changeset
73 });
477379250512 Open the ort create window on button click.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 602
diff changeset
74 win.show();
477379250512 Open the ort create window on button click.
Raimund Renkert <raimund.renkert@intevation.de>
parents: 602
diff changeset
75 win.initData();
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
76 },
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
77
742
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
78 /**
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
79 * A Ort-row can be removed from the grid with the remove
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
80 * function. It asks the user for confirmation
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
81 * If the removal was confirmed, it reloads the parent window on success,
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
82 * on failure, an error message is shown.
6e28ebbe1a73 added documentation for Form and Grid controllers
Dustin Demuth <dustin@intevation.de>
parents: 701
diff changeset
83 */
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
84 remove: function(button) {
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
85 var grid = button.up('grid');
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
86 var selection = grid.getView().getSelectionModel().getSelection()[0];
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
87 var i18n = Lada.getApplication().bundle;
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
88 Ext.MessageBox.confirm(i18n.getMsg('delete'), i18n.getMsg('confirmation.question'),
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
89 function(btn) {
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
90 if (btn === 'yes') {
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
91 selection.destroy({
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
92 success: function() {
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
93 button.up('window').initData();
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
94 },
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
95 failure: function(request, response) {
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
96 var i18n = Lada.getApplication().bundle;
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
97 var json = response.request.scope.reader.jsonData;
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
98 if (json) {
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
99 if (json.message){
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
100 Ext.Msg.alert(i18n.getMsg('err.msg.delete.title')
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
101 +' #'+json.message,
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
102 i18n.getMsg(json.message));
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
103 } else {
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
104 Ext.Msg.alert(i18n.getMsg('err.msg.delete.title'),
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
105 i18n.getMsg('err.msg.generic.body'));
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
106 }
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
107 } else {
1012
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
108 Ext.Msg.alert(i18n.getMsg('err.msg.delete.title'),
2adc329d90fe Replaced Locations with Ortszuordnung
Dustin Demuth <dustin@intevation.de>
parents: 826
diff changeset
109 i18n.getMsg('err.msg.response.body'));
701
f0bc5387abcc Added failure - Messages
Dustin Demuth <dustin@intevation.de>
parents: 690
diff changeset
110 }
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
111 }
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
112 });
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
113 }
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
114 });
826
2362f8ab1e9f disable remove button after a item is deleted from grid
Dustin Demuth <dustin@intevation.de>
parents: 742
diff changeset
115 grid.down('button[action=delete]').disable();
1279
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
116 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
117
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
118 /**
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
119 * Opens the form for a new Messpunkt
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
120 */
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
121 createort: function() {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
122 Ext.create('Lada.view.form.Ortserstellung').show();
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
123 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
124
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
125 /**
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
126 *
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
127 * Opens the form for a new Messpunkt, with prefilled coordinates.
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
128 * TODO Not functional yet
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
129 */
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
130 frommap: function(button) {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
131 var map = button.up('ortszuordnungwindow').down('map');
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
132 // map.getClick();
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
133 //TODO: wait for click return
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
134 Ext.create('Lada.view.form.Ortserstellung', {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
135 presets: {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
136 kda_id: 4,
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
137 koord_x_extern: 35000000, //TODO dummy values
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
138 koord_y_extern: 1000000
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
139 }
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
140 }).show();
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
141 },
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
142
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
143 /**
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
144 * Opens the form for a new Messpunkt, with all values prefilled from the currently
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
145 * selected item
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
146 */
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
147 cloneort: function(button) {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
148 var grid = button.up('ortszuordnungwindow').down('ortstammdatengrid').getView();
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
149 var selected = grid.getSelectionModel().getSelection()[0];
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
150 Ext.create('Lada.view.form.Ortserstellung', {
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
151 presets: selected.data
291df0037835 Ortszuordnung window: create, change and display (wip)
Maximilian Krambach <mkrambach@intevation.de>
parents: 1051
diff changeset
152 }).show();
587
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
153 }
cf328526b5bb Moved controller into subfolders.
Raimund Renkert <raimund.renkert@intevation.de>
parents:
diff changeset
154 });

http://lada.wald.intevation.org