Mercurial > lada > lada-client
comparison app/controller/grid/Messmethode.js @ 764:ba8c0e754979
Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Fri, 08 May 2015 15:31:58 +0200 |
parents | b2fcbdc4969d |
children | 62721a75d31d |
comparison
equal
deleted
inserted
replaced
763:0e8d4178bb7e | 764:ba8c0e754979 |
---|---|
18 */ | 18 */ |
19 init: function() { | 19 init: function() { |
20 this.control({ | 20 this.control({ |
21 'messmethodengrid': { | 21 'messmethodengrid': { |
22 edit: this.gridSave, | 22 edit: this.gridSave, |
23 canceledit: this.cancelEdit | 23 canceledit: this.cancelEdit, |
24 select: this.selectRow | |
24 }, | 25 }, |
25 'messmethodengrid button[action=add]': { | 26 'messmethodengrid button[action=add]': { |
26 click: this.add | 27 click: this.add |
27 }, | 28 }, |
28 'messmethodengrid button[action=delete]': { | 29 'messmethodengrid button[action=delete]': { |
73 editor.getCmp().store.remove(context.record); | 74 editor.getCmp().store.remove(context.record); |
74 } | 75 } |
75 }, | 76 }, |
76 | 77 |
77 /** | 78 /** |
79 * When a row is selected, | |
80 * the nuklid-grid will be updated | |
81 * to display the nuklide which are possible for this | |
82 * Messmethod | |
83 */ | |
84 selectRow: function(row, record, index) { | |
85 var ngrid = row.view.up('window').down('nuklidegrid'); | |
86 var nuklide = record.get('messgroessen'); | |
87 var store = Ext.data.StoreManager.get('messgroessen'); | |
88 if (!store) { | |
89 store = Ext.create('Lada.store.Messgroessen'); | |
90 } | |
91 ngrid.setData(store); | |
92 }, | |
93 | |
94 /** | |
78 * This function adds a new row | 95 * This function adds a new row |
79 */ | 96 */ |
80 add: function(button) { | 97 add: function(button) { |
81 var record = Ext.create('Lada.model.MmtMessprogramm'); | 98 var record = Ext.create('Lada.model.MmtMessprogramm'); |
82 record.set('messprogrammId', button.up('messmethodengrid').recordId); | 99 record.set('messprogrammId', button.up('messmethodengrid').recordId); |