diff app/controller/form/Ortszuordnung.js @ 1274:a792eecf1614

Updated Layout and Map for 'ortsbezug'-window. WIP!
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 10 Jan 2017 10:03:57 +0100
parents 1cf5280bbc45
children 08085b7d1d0b
line wrap: on
line diff
--- a/app/controller/form/Ortszuordnung.js	Wed Dec 14 10:21:48 2016 +0100
+++ b/app/controller/form/Ortszuordnung.js	Tue Jan 10 10:03:57 2017 +0100
@@ -18,7 +18,7 @@
     init: function() {
         this.control({
             'ortszuordnungform button[action=setOrt]': {
-                toggle: this.pickOrt
+                toggle: this.chooseLocation
             },
             'ortszuordnungform button[action=save]': {
                 click: this.save
@@ -143,6 +143,22 @@
         }
      },
 
+    chooseLocation: function(button, pressed, opts) {
+        var win = button.up('window');
+        var gridPanel = win.down('panel[name=ortgrid]');
+        if (pressed) {
+            win.setHeight(Ext.getBody().getViewSize().height - 50);
+            win.setY(25);
+            gridPanel.show();
+        }
+        else {
+            var y = (Ext.getBody().getViewSize().height - 465) / 2
+            win.setHeight(465);
+            win.setY(y);
+            gridPanel.hide();
+        }
+    },
+
 
     /**
      * The dirtyForm function enables or disables the save and discard

http://lada.wald.intevation.org