Mercurial > lada > lada-client
comparison app/view/panel/FilterDetails.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 |
comparison
equal
deleted
inserted
replaced
1010:94a6b5415d73 | 1015:af9879d72310 |
---|---|
1 /** | |
2 * | |
3 */ | |
4 Ext.define('Lada.view.panel.FilterDetails', { | |
5 extend: 'Ext.form.FieldSet', | |
6 alias: 'widget.filterdetails', | |
7 | |
8 record: null, | |
9 | |
10 title: 'test', | |
11 | |
12 /** | |
13 * @private | |
14 * Initialize the view. | |
15 */ | |
16 initComponent: function() { | |
17 var me = this; | |
18 var i18n = Lada.getApplication().bundle; | |
19 //me.title = i18n.getMsg('filterdetails.title'); | |
20 | |
21 me.items = [{ | |
22 xtype: 'displayfield', | |
23 margin: '5, 5, 5, 5', | |
24 name: 'name', | |
25 fieldLabel: 'Name' | |
26 }, { | |
27 xtype: 'displayfield', | |
28 margin: '0, 5, 5, 5', | |
29 name: 'beschreibung', | |
30 fieldLabel: 'Beschreibung' | |
31 }, { | |
32 xtype: 'displayfield', | |
33 margin: '0, 5, 5, 5', | |
34 name: 'filters', | |
35 fieldLabel: 'Filter' | |
36 }, { | |
37 xtype: 'displayfield', | |
38 margin: '0, 5, 5, 5', | |
39 name: 'columns', | |
40 fieldLabel: 'Spalten' | |
41 }]; | |
42 | |
43 this.callParent(arguments); | |
44 }, | |
45 | |
46 setRecord: function(record) { | |
47 this.record = record; | |
48 this.down('displayfield[name=name]').setValue(record.get('name')); | |
49 this.down('displayfield[name=beschreibung]').setValue(record.get('description')); | |
50 var columnString = []; | |
51 var value = record.get('results'); | |
52 for (var i = 0; i < value.length; i++) { | |
53 columnString.push(value[i].header); | |
54 } | |
55 this.down('displayfield[name=columns]').setValue(columnString.join(', ')); | |
56 value = record.get('filters'); | |
57 var filterString = []; | |
58 for (var i = 0; i < value.length; i++) { | |
59 filterString.push(value[i].label); | |
60 } | |
61 this.down('displayfield[name=filters]').setValue(filterString.join(', ')); | |
62 } | |
63 }); |