diff app/controller/form/Ortszuordnung.js @ 1278:cb9609380056

merge
author Michael Stanko <mstanko@bfs.de>
date Mon, 16 Jan 2017 14:53:00 +0100
parents a792eecf1614
children 08085b7d1d0b
line wrap: on
line diff
--- a/app/controller/form/Ortszuordnung.js	Mon Jan 16 14:32:41 2017 +0100
+++ b/app/controller/form/Ortszuordnung.js	Mon Jan 16 14:53:00 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