diff 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
line wrap: on
line diff
--- a/app/view/orte/CreateForm.js	Thu Dec 05 09:56:50 2013 +0100
+++ b/app/view/orte/CreateForm.js	Thu Dec 05 09:57:57 2013 +0100
@@ -7,8 +7,10 @@
     requires: [
         'Lada.view.widgets.Ortdetail',
         'Lada.view.widgets.Staat',
-        'Lada.view.widgets.Verwaltungseinheit'
+        'Lada.view.widgets.Verwaltungseinheit',
+        'Lada.view.orte.CreateOrt'
     ],
+    edit: false,
     initComponent: function() {
         this.items = [
             {
@@ -18,6 +20,9 @@
                 listeners: {
                     scope: this,
                     'change': function (field, newv, oldv, opts) {
+                        if (field.up('window')) {
+                            field.up('window').down('fieldset').show();
+                        }
                         var orte = Ext.getStore('Ortedetails');
                         var ort = orte.getById(newv);
                         var fields = ['beschreibung', 'bezeichnung', 'hoeheLand',
@@ -57,8 +62,16 @@
                 fieldLabel: 'Ortszusatz'
             },
             {
+                xtype: 'button',
+                name: 'newort',
+                text: 'Neuen Ort Anlegen',
+                hidden: this.edit,
+                action: 'newort'
+            },
+            {
                 xtype: 'fieldset',
                 title: 'Ortsangaben',
+                hidden: !this.edit,
                 defaults: {
                         labelWidth: 150
                 },

http://lada.wald.intevation.org