comparison 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
comparison
equal deleted inserted replaced
1265:a4c1a9862a88 1274:a792eecf1614
16 * Initialize the Controller with 4 listeners 16 * Initialize the Controller with 4 listeners
17 */ 17 */
18 init: function() { 18 init: function() {
19 this.control({ 19 this.control({
20 'ortszuordnungform button[action=setOrt]': { 20 'ortszuordnungform button[action=setOrt]': {
21 toggle: this.pickOrt 21 toggle: this.chooseLocation
22 }, 22 },
23 'ortszuordnungform button[action=save]': { 23 'ortszuordnungform button[action=save]': {
24 click: this.save 24 click: this.save
25 }, 25 },
26 'ortszuordnungform button[action=discard]': { 26 'ortszuordnungform button[action=discard]': {
141 button.setText(i18n.getMsg('ortszuordnung.form.setOrt')); 141 button.setText(i18n.getMsg('ortszuordnung.form.setOrt'));
142 osg.removeListener('select',oForm.setOrt, oForm); 142 osg.removeListener('select',oForm.setOrt, oForm);
143 } 143 }
144 }, 144 },
145 145
146 chooseLocation: function(button, pressed, opts) {
147 var win = button.up('window');
148 var gridPanel = win.down('panel[name=ortgrid]');
149 if (pressed) {
150 win.setHeight(Ext.getBody().getViewSize().height - 50);
151 win.setY(25);
152 gridPanel.show();
153 }
154 else {
155 var y = (Ext.getBody().getViewSize().height - 465) / 2
156 win.setHeight(465);
157 win.setY(y);
158 gridPanel.hide();
159 }
160 },
161
146 162
147 /** 163 /**
148 * The dirtyForm function enables or disables the save and discard 164 * The dirtyForm function enables or disables the save and discard
149 * button which are present in the toolbar of the form. 165 * button which are present in the toolbar of the form.
150 * The Buttons are only active if the content of the form was altered 166 * The Buttons are only active if the content of the form was altered

http://lada.wald.intevation.org