comparison app/controller/Kommentare.js @ 54:3c7bfff8bd64

Added Controller for kommentare
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 28 May 2013 11:20:24 +0200
parents
children 4fa3fba50f79
comparison
equal deleted inserted replaced
53:73bc17de6ff2 54:3c7bfff8bd64
1 Ext.define('Lada.controller.Kommentare', {
2 extend: 'Ext.app.Controller',
3 views: [
4 'kommentare.List'
5 ],
6 stores: [
7 'Kommentare'
8 ],
9 models: [
10 'Kommentar'
11 ],
12 init: function() {
13 console.log('Initialising the Kommentare controller');
14 this.control({
15 // CSS like selector to select element in the viewport. See
16 // ComponentQuery documentation for more details.
17 //'probenlist': {
18 // // Map the "render" event to the given function.
19 // render: this.onPanelRendered,
20 // // Map Doubleclick on rows of the probenlist.
21 // itemdblclick: this.editProbe
22 //},
23 //'probenedit button[action=save]': {
24 // click: this.updateProbe
25 //}
26 });
27 },
28 editKommentar: function(grid, record) {
29 //console.log('Double click on ' + record.get('probeId'));
30 //// Create new window to edit the seletced record.
31 //var view = Ext.widget('probenedit');
32 //var form = view.down('form');
33 //form.loadRecord(record);
34
35 //// Load kommentare
36 //var kommentare = form.down('kommentarelist'); //form.down('kommentare');
37 //var kstore = kommentare.getStore();
38 //kstore.load({
39 // params: {
40 // probe: record.data['probeId']
41 // }
42 //});
43
44 //// Set form data
45 //console.log("Loaded probe with ID " + record.getId()); //outputs ID
46 },
47 updateKommentar: function(button) {
48 //console.log('Click save');
49 //// We only have a reference to the button here but we really wnat to
50 //// get the form and the window. So first get the window and form and
51 //// the the record an values.
52 //var win = button.up('window');
53 //var form = win.down('form');
54 //var record = form.getRecord();
55 //var values = form.getValues();
56
57 //record.set(values);
58 //win.close();
59 //// synchronize the store after editing the record
60 //// NOTE: The function 'getProbenStore' will be generated
61 //// dynamically based on the Name of the configured Store!!!
62 //this.getProbenStore().sync();
63 }
64 });

http://lada.wald.intevation.org