Mercurial > lada > lada-client
comparison app/controller/MKommentare.js @ 205:cd8cd3ac0231
Added new Controller for MKommentare.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Mon, 08 Jul 2013 16:47:18 +0200 |
parents | |
children | 62e116cd3e3b |
comparison
equal
deleted
inserted
replaced
204:4a79323336c6 | 205:cd8cd3ac0231 |
---|---|
1 Ext.define('Lada.controller.MKommentare', { | |
2 extend: 'Lada.controller.Kommentare', | |
3 stores: [ | |
4 'MKommentare' | |
5 ], | |
6 models: [ | |
7 'MKommentar' | |
8 ], | |
9 addKommentar: function(button) { | |
10 console.log('Adding new Kommentar for Messung ' + button.parentId + ' Probe ' + button.probeId); | |
11 var kommentar = Ext.create('Lada.model.MKommentar'); | |
12 kommentar.set('probeId', button.probeId); | |
13 kommentar.set('messungsId', button.parentId); | |
14 var view = Ext.widget('kommentarecreate', {model: kommentar}); | |
15 }, | |
16 createSuccess: function(form, record, operation) { | |
17 // Reload store | |
18 var store = this.getMKommentareStore(); | |
19 store.reload(); | |
20 var win = form.up('window'); | |
21 win.close(); | |
22 }, | |
23 editSuccess: function(form, record, operation) { | |
24 // Reload store | |
25 var store = this.getMKommentareStore(); | |
26 store.reload(); | |
27 var win = form.up('window'); | |
28 win.close(); | |
29 } | |
30 }); |