comparison app/controller/grid/MessungList.js @ 1082:dbd435256f77

Open status edit window and send status objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 13 Apr 2016 19:04:15 +0200
parents e32c10cf5499
children 0a032c98c3a6
comparison
equal deleted inserted replaced
1081:5e9a674d7bb4 1082:dbd435256f77
22 this.control({ 22 this.control({
23 'messunglistgrid': { 23 'messunglistgrid': {
24 itemdblclick: this.editItem, 24 itemdblclick: this.editItem,
25 select: this.activateButtons, 25 select: this.activateButtons,
26 deselect: this.deactivateButtons 26 deselect: this.deactivateButtons
27 },
28 'messunglistgrid toolbar button[action=setstatus]': {
29 click: this.setStatus
27 } 30 }
28 }); 31 });
29 this.callParent(arguments); 32 this.callParent(arguments);
30 }, 33 },
34
35 /**
36 * Sets the Status on Bulk
37 **/
38 setStatus: function(button) {
39 //disable Button and setLoading...
40
41 var grid = button.up('grid');
42 var selection = grid.getView().getSelectionModel().getSelection();
43 var i18n = Lada.getApplication().bundle;
44
45 var win = Ext.create('Lada.view.window.SetStatus', {
46 title: i18n.getMsg('statusSetzen.win.title'),
47 grid: grid,
48 modal: true,
49 selection: selection
50 });
51
52 win.show();
53
54 },
55
31 56
32 /** 57 /**
33 * This function is called after a Row in the 58 * This function is called after a Row in the
34 * {@link Lada.view.grid.ProbeList} 59 * {@link Lada.view.grid.ProbeList}
35 * was double-clicked. 60 * was double-clicked.
255 * Enables/Disables a set of buttons 280 * Enables/Disables a set of buttons
256 **/ 281 **/
257 buttonToggle: function(enabled, grid) { 282 buttonToggle: function(enabled, grid) {
258 if (!enabled) { 283 if (!enabled) {
259 grid.down('button[action=print]').disable(); 284 grid.down('button[action=print]').disable();
260 grid.down('button[action=setStatus]').disable(); 285 grid.down('button[action=setstatus]').disable();
261 } 286 }
262 else { 287 else {
263 grid.down('button[action=print]').enable(); 288 grid.down('button[action=print]').enable();
264 // TODO: enable button only on messungen with owner == true and 289 // TODO: enable button only on messungen with owner == true and
265 // readonly == false 290 // readonly == false
266 grid.down('button[action=setStatus]').enable(); 291 grid.down('button[action=setstatus]').enable();
267 } 292 }
268 }, 293 },
269 294
270 reload: function(btn) { 295 reload: function(btn) {
271 if (btn === 'yes') { 296 if (btn === 'yes') {

http://lada.wald.intevation.org