comparison app/view/grid/MessungList.js @ 1076:e32c10cf5499

Added model/store, view and controller for messung list.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 08 Apr 2016 19:32:02 +0200
parents
children dbd435256f77
comparison
equal deleted inserted replaced
1075:d23427c68285 1076:e32c10cf5499
1 /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
2 * Software engineering by Intevation GmbH
3 *
4 * This file is Free Software under the GNU GPL (v>=3)
5 * and comes with ABSOLUTELY NO WARRANTY! Check out
6 * the documentation coming with IMIS-Labordaten-Application for details.
7 */
8
9 /**
10 * Grid to list the result of the Filter
11 */
12 Ext.define('Lada.view.grid.MessungList', {
13 extend: 'Lada.view.widget.DynamicGrid',
14 alias: 'widget.messunglistgrid',
15
16 initComponent: function() {
17 var i18n = Lada.getApplication().bundle;
18 this.emptyText = i18n.getMsg('messung.emptyGrid');
19 this.selModel = Ext.create('Ext.selection.CheckboxModel', {
20 checkOnly: true
21 });
22
23 this.dockedItems = [{
24 xtype: 'toolbar',
25 dock: 'top',
26 items: [{
27 xtype: 'tbtext',
28 text: i18n.getMsg('messung.gridTitle')
29 },
30 '->',
31 {
32 text: i18n.getMsg('probe.button.print'),
33 icon: 'resources/img/printer.png',
34 action: 'print',
35 disabled: true //disabled on start, enabled by the controller
36 }, {
37 text: i18n.getMsg('statusSetzen'),
38 icon: 'resources/img/emblem-important.png',
39 action: 'setStatus',
40 disabled: true //disabled on start, enabled by the controller
41 }]
42 }];
43 this.columns = [];
44 this.callParent(arguments);
45 },
46
47 /**
48 * Setup columns of the Grid dynamically based on a list of given cols.
49 * The function is called from the {@link Lada.controller.Filter#search
50 * search event}
51 * The Images for the Read-Write Icon are defined in CSS
52 * This Method overrides setupColumns of the parents class,
53 * becaus the delete colum is required.
54 */
55 setupColumns: function(cols) {
56 var caf = this.generateColumnsAndFields(cols);
57 var columns = caf[0];
58 var fields = caf[1];
59 var i18n = Lada.getApplication().bundle;
60
61 this.store.model.setFields(fields);
62 this.reconfigure(this.store, columns);
63 }
64 });

http://lada.wald.intevation.org