comparison app/view/window/FilterManagement.js @ 1015:af9879d72310

Updated UI, added window for filter management and added fieldset for query details.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 02 Feb 2016 15:25:16 +0100
parents
children 6f5549e50607
comparison
equal deleted inserted replaced
1010:94a6b5415d73 1015:af9879d72310
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 *
11 */
12 Ext.define('Lada.view.window.FilterManagement', {
13 extend: 'Ext.window.Window',
14 alias: 'widget.filtermanagement',
15
16 requires: [
17 'Lada.view.widget.base.FavColumn'
18 ],
19
20 layout: 'fit',
21 width: window.innerWidth - 100,
22 height: 500,
23 closeAction: 'hide',
24
25 /**
26 * @private
27 * Initialize the view.
28 */
29 initComponent: function() {
30 var i18n = Lada.getApplication().bundle;
31 var me = this;
32 this.buttons = [{
33 text: i18n.getMsg('close'),
34 scope: this,
35 handler: this.close
36 }];
37 var probenstore = Ext.StoreManager.get('probequeries');
38 var messpstore = Ext.StoreManager.get('messprogrammqueries');
39 var stammstore = Ext.StoreManager.get('stammdatenqueries');
40 me.items = [{
41 xtype: 'tabpanel',
42 items: [{
43 title: i18n.getMsg('querygrid.probe.title'),
44 xtype: 'grid',
45 viewConfig: {
46 markDirty: false,
47 getRowClass: function() {
48 return 'x-lada-multiline-grid';
49 }
50 },
51 store: probenstore,
52 columns: [{
53 header: i18n.getMsg('querygrid.header.favorite'),
54 width: 48,
55 dataIndex: 'favorite',
56 xtype: 'favcolumn'
57 }, {
58 header: i18n.getMsg('querygrid.header.name'),
59 dataIndex: 'name',
60 width: 200
61 }, {
62 header: i18n.getMsg('querygrid.header.description'),
63 dataIndex: 'description',
64 minWidth: 200,
65 flex: 3
66 }, {
67 header: i18n.getMsg('querygrid.header.columns'),
68 dataIndex: 'results',
69 width: 250,
70 flex: 2,
71 renderer: function(value) {
72 var columnString = [];
73 for (var i = 0; i < value.length; i++) {
74 columnString.push(value[i].header);
75 }
76 return columnString.join(', ');
77 }
78 }, {
79 header: i18n.getMsg('querygrid.header.filters'),
80 dataIndex: 'filters',
81 width: 200,
82 renderer: function(value) {
83 var columnString = [];
84 for (var i = 0; i < value.length; i++) {
85 columnString.push(value[i].label);
86 }
87 return columnString.join(', ');
88 }
89 }]
90 }, {
91 title: i18n.getMsg('querygrid.messprogramm.title'),
92 xtype: 'grid',
93 viewConfig: {
94 markDirty: false,
95 getRowClass: function() {
96 return 'x-lada-multiline-grid';
97 }
98 },
99 store: messpstore,
100 columns: [{
101 header: i18n.getMsg('querygrid.header.favorite'),
102 width: 48,
103 dataIndex: 'favorite',
104 xtype: 'favcolumn'
105 }, {
106 header: i18n.getMsg('querygrid.header.name'),
107 dataIndex: 'name',
108 width: 200
109 }, {
110 header: i18n.getMsg('querygrid.header.description'),
111 dataIndex: 'description',
112 minWidth: 200,
113 flex: 3
114 }, {
115 header: i18n.getMsg('querygrid.header.columns'),
116 dataIndex: 'results',
117 width: 250,
118 flex: 2,
119 renderer: function(value) {
120 var columnString = [];
121 for (var i = 0; i < value.length; i++) {
122 columnString.push(value[i].header);
123 }
124 return columnString.join(', ');
125 }
126 }, {
127 header: i18n.getMsg('querygrid.header.filters'),
128 dataIndex: 'filters',
129 width: 200,
130 renderer: function(value) {
131 var columnString = [];
132 for (var i = 0; i < value.length; i++) {
133 columnString.push(value[i].label);
134 }
135 return columnString.join(', ');
136 }
137 }]
138 }, {
139 title: i18n.getMsg('querygrid.stammdaten.title'),
140 xtype: 'grid',
141 viewConfig: {
142 markDirty: false,
143 getRowClass: function() {
144 return 'x-lada-multiline-grid';
145 }
146 },
147 store: stammstore,
148 columns: [{
149 header: i18n.getMsg('querygrid.header.favorite'),
150 width: 48,
151 dataIndex: 'favorite',
152 xtype: 'favcolumn'
153 }, {
154 header: i18n.getMsg('querygrid.header.name'),
155 dataIndex: 'name',
156 width: 200
157 }, {
158 header: i18n.getMsg('querygrid.header.description'),
159 dataIndex: 'description',
160 flex: 1
161 }]
162 }]
163 }];
164
165 this.callParent(arguments);
166 }
167 });

http://lada.wald.intevation.org