Mercurial > lada > lada-client
annotate app/view/window/Ortserstellung.js @ 1284:faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
functional, still needs error handling and layout
author | Maximilian Krambach <mkrambach@intevation.de> |
---|---|
date | Tue, 24 Jan 2017 12:58:26 +0100 |
parents | |
children | bfdc00c24baf |
rev | line source |
---|---|
1284
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
2 * Software engineering by Intevation GmbH |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
3 * |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
4 * This file is Free Software under the GNU GPL (v>=3) |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
5 * and comes with ABSOLUTELY NO WARRANTY! Check out |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
6 * the documentation coming with IMIS-Labordaten-Application for details. |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
7 */ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
8 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
9 /** |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
10 * Window for new Ort, wraps around a {@link Lada.view.form.Ortsertellung} |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
11 */ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
12 Ext.define('Lada.view.window.Ortserstellung', { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
13 extend: 'Ext.window.Window', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
14 alias: 'window.ortserstellung', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
15 requires: [ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
16 'Lada.model.Ort', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
17 'Lada.view.form.Ortserstellung' |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
18 ], |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
19 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
20 minWidth: 350, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
21 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
22 margin: 5, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
23 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
24 border: 0, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
25 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
26 bodyStyle: {background: '#fff'}, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
27 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
28 layout: 'fit', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
29 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
30 title: 'Neuen Messpunkt anlegen', |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
31 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
32 /** |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
33 * The record for the new Ort. Should be a {@link Lada.model.Ort} |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
34 */ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
35 record: null, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
36 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
37 parentWindow: null, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
38 |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
39 initComponent: function() { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
40 var me = this; |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
41 if (this.record === null) { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
42 this.record = Ext.create('Lada.model.Ort'); |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
43 } |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
44 this.items = [ |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
45 Ext.create('Lada.view.form.Ortserstellung', { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
46 record: me.record, |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
47 listeners: { |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
48 destroy: {fn: function() {me.close();}} |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
49 } |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
50 }) |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
51 ]; |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
52 this.callParent(arguments); |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
53 } |
faecbb446a04
Ortserstellung: new Messpunkt from map, clone or form
Maximilian Krambach <mkrambach@intevation.de>
parents:
diff
changeset
|
54 }); |