[Lada-commits] [PATCH 10 of 16] Added Cancel Button to all Windows. Changed order howthe form is initialized

Wald Commits scm-commit at wald.intevation.org
Wed Aug 7 12:05:37 CEST 2013


# HG changeset patch
# User Torsten Irländer <torsten.irlaender at intevation.de>
# Date 1375797818 -7200
# Node ID 11f8a2c1b610c7f390246eb5c4dd1cc7ee0d432b
# Parent  0d6552bb28ea602e14d4e1314b1ffa3c24ede85c
Added Cancel Button to all Windows. Changed order howthe form is initialized.
Now the form could hide the buttuns in the parent window depending on the
readonly flag.

diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/kommentare/Create.js
--- a/app/view/kommentare/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/kommentare/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -13,15 +13,20 @@
         'Lada.view.kommentare.CreateForm'
     ],
     initComponent: function() {
-        var form = Ext.create('Lada.view.kommentare.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.kommentare.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/messungen/Create.js
--- a/app/view/messungen/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/messungen/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -13,15 +13,20 @@
         'Lada.view.messungen.CreateForm'
     ],
     initComponent: function() {
-        var form = Ext.create('Lada.view.messungen.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.messungen.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/messungen/Edit.js
--- a/app/view/messungen/Edit.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/messungen/Edit.js	Tue Aug 06 16:03:38 2013 +0200
@@ -13,15 +13,20 @@
         'Lada.view.messungen.EditForm'
     ],
     initComponent: function() {
-        var form = Ext.create('Lada.view.messungen.EditForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.messungen.EditForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/messwerte/Create.js
--- a/app/view/messwerte/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/messwerte/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -13,6 +13,11 @@
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
         var form = Ext.create('Lada.view.messwerte.CreateForm', this.initialConfig);
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/mkommentare/Create.js
--- a/app/view/mkommentare/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/mkommentare/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -13,15 +13,20 @@
         'Lada.view.mkommentare.CreateForm'
     ],
     initComponent: function() {
-        var form = Ext.create('Lada.view.mkommentare.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.mkommentare.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/orte/Create.js
--- a/app/view/orte/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/orte/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -11,15 +11,20 @@
         'Lada.view.orte.CreateForm'
     ],
     initComponent: function() {
-        var form = Ext.create('Lada.view.orte.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.orte.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/proben/Create.js
--- a/app/view/proben/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/proben/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -11,8 +11,6 @@
     autoScroll: true,
     modal: true,
     initComponent: function() {
-        var form = Ext.create('Lada.view.proben.CreateForm');
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
@@ -24,6 +22,8 @@
                 handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.proben.CreateForm');
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/status/Create.js
--- a/app/view/status/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/status/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -8,15 +8,20 @@
     modal: true,
 
     initComponent: function() {
-        var form = Ext.create('Lada.view.status.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.status.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });
diff -r 0d6552bb28ea -r 11f8a2c1b610 app/view/zusatzwerte/Create.js
--- a/app/view/zusatzwerte/Create.js	Tue Aug 06 14:33:14 2013 +0200
+++ b/app/view/zusatzwerte/Create.js	Tue Aug 06 16:03:38 2013 +0200
@@ -8,15 +8,20 @@
     modal: true,
 
     initComponent: function() {
-        var form = Ext.create('Lada.view.zusatzwerte.CreateForm', this.initialConfig);
-        this.items = [form];
         this.buttons = [
             {
                 text: 'Speichern',
                 scope: form,
                 action: 'save'
+            },
+            {
+                text: 'Abbrechen',
+                scope: this,
+                handler: this.close,
             }
         ];
+        var form = Ext.create('Lada.view.zusatzwerte.CreateForm', this.initialConfig);
+        this.items = [form];
         this.callParent();
     }
 });


More information about the Lada-commits mailing list