annotate app/controller/Proben.js @ 5:039584709fa7

Map double click event on rows of the userlist to the editProben function.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 29 Apr 2013 15:10:43 +0200
parents b8e56e880f02
children a8efc4b96888
rev   line source
1
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
1 Ext.define('Lada.controller.Proben', {
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
2 extend: 'Ext.app.Controller',
4
b8e56e880f02 Added a first example view (userlisting) from the EXJS Tutorial. Need to be
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 1
diff changeset
3 views: [
b8e56e880f02 Added a first example view (userlisting) from the EXJS Tutorial. Need to be
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 1
diff changeset
4 'proben.List'
b8e56e880f02 Added a first example view (userlisting) from the EXJS Tutorial. Need to be
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 1
diff changeset
5 ],
1
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
6 init: function() {
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
7 console.log('Initialising the Proben controller');
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
8 this.control({
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
9 // CSS like selector to select element in the viewport. See
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
10 // ComponentQuery documentation for more details.
5
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
11 'viewport > probenlist': {
1
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
12 // Map the "render" event to the given function.
5
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
13 render: this.onPanelRendered,
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
14 // Map Doubleclick on rows of the probenlist.
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
15 itemdblclick: this.editProbe
1
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
16 }
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
17 });
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
18 },
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
19 onPanelRendered: function() {
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
20 console.log('The panel was rendered');
5
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
21 },
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
22 editProbe: function(grid, record) {
039584709fa7 Map double click event on rows of the userlist to the editProben function.
Torsten Irländer <torsten.irlaender@intevation.de>
parents: 4
diff changeset
23 console.log('Double click on ' + record.get('name'));
1
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
24 }
af8d7217521d Added basic Proben controller.
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff changeset
25 });

http://lada.wald.intevation.org