Mercurial > lada > lada-client
comparison app/view/orte/CreateForm.js @ 447:12231f31c112
Apply new workflow in orte dialog.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 05 Dec 2013 09:57:57 +0100 |
parents | f4185f2d1a7c |
children | debfcc7713e3 |
comparison
equal
deleted
inserted
replaced
446:b3e806045a5a | 447:12231f31c112 |
---|---|
5 extend: 'Lada.view.widgets.LadaForm', | 5 extend: 'Lada.view.widgets.LadaForm', |
6 model: 'Lada.model.Ort', | 6 model: 'Lada.model.Ort', |
7 requires: [ | 7 requires: [ |
8 'Lada.view.widgets.Ortdetail', | 8 'Lada.view.widgets.Ortdetail', |
9 'Lada.view.widgets.Staat', | 9 'Lada.view.widgets.Staat', |
10 'Lada.view.widgets.Verwaltungseinheit' | 10 'Lada.view.widgets.Verwaltungseinheit', |
11 'Lada.view.orte.CreateOrt' | |
11 ], | 12 ], |
13 edit: false, | |
12 initComponent: function() { | 14 initComponent: function() { |
13 this.items = [ | 15 this.items = [ |
14 { | 16 { |
15 xtype: 'ortdetail', | 17 xtype: 'ortdetail', |
16 name: 'ortId', | 18 name: 'ortId', |
17 fieldLabel: 'Ort', | 19 fieldLabel: 'Ort', |
18 listeners: { | 20 listeners: { |
19 scope: this, | 21 scope: this, |
20 'change': function (field, newv, oldv, opts) { | 22 'change': function (field, newv, oldv, opts) { |
23 if (field.up('window')) { | |
24 field.up('window').down('fieldset').show(); | |
25 } | |
21 var orte = Ext.getStore('Ortedetails'); | 26 var orte = Ext.getStore('Ortedetails'); |
22 var ort = orte.getById(newv); | 27 var ort = orte.getById(newv); |
23 var fields = ['beschreibung', 'bezeichnung', 'hoeheLand', | 28 var fields = ['beschreibung', 'bezeichnung', 'hoeheLand', |
24 'latitude', 'longitude', 'staatId', 'gemId']; | 29 'latitude', 'longitude', 'staatId', 'gemId']; |
25 | 30 |
55 name: 'ortszusatztext', | 60 name: 'ortszusatztext', |
56 maxLength: 100, | 61 maxLength: 100, |
57 fieldLabel: 'Ortszusatz' | 62 fieldLabel: 'Ortszusatz' |
58 }, | 63 }, |
59 { | 64 { |
65 xtype: 'button', | |
66 name: 'newort', | |
67 text: 'Neuen Ort Anlegen', | |
68 hidden: this.edit, | |
69 action: 'newort' | |
70 }, | |
71 { | |
60 xtype: 'fieldset', | 72 xtype: 'fieldset', |
61 title: 'Ortsangaben', | 73 title: 'Ortsangaben', |
74 hidden: !this.edit, | |
62 defaults: { | 75 defaults: { |
63 labelWidth: 150 | 76 labelWidth: 150 |
64 }, | 77 }, |
65 items: [ | 78 items: [ |
66 { | 79 { |