Mercurial > lada > lada-client
view app/view/messwerte/List.js @ 245:9a2c04b19874
Put all available search filters to the viewport. They are later hidden and
shown when the user selects the search query
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Tue, 23 Jul 2013 14:16:41 +0200 |
parents | f3a2f985f451 |
children | c3c64920b740 |
line wrap: on
line source
Ext.define('Lada.view.messwerte.List' ,{ extend: 'Ext.grid.Panel', alias: 'widget.messwertelist', store: 'Messwerte', viewConfig: { maxHeight: 350, emptyText: 'Keine Messwerte gefunden.', // minHeight and deferEmptyText are needed to be able to show the // emptyText message. minHeight: 35, deferEmptyText: false }, probeId: null, parentId: null, initComponent: function() { this.dockedItems = [ { xtype: 'toolbar', dock: 'top', items: [ { text: 'Hinzufügen', icon: 'gfx/plus.gif', action: 'add', probeId: this.probeId, parentId: this.parentId }, { text: 'Löschen', icon: 'gfx/minus.gif', action: 'delete' } ] } ]; this.columns = [ {header: 'Messwert', dataIndex: 'messwert'}, {header: 'Messfehler', dataIndex: 'messfehler'}, { header: 'Messgröße', dataIndex: 'messgroesseId', renderer: function(value) { var store = Ext.getStore('Messgroessen'); return store.findRecord('messgroesseId', value).get('messgro0esse'); } }, { header: 'Messeinheit', dataIndex: 'mehId', renderer: function(value) { var store = Ext.getStore('Messeinheit'); return store.findRecord('mehId', value).get('einheit'); } }, { header: 'Grenzwertüberschreitung', dataIndex: 'grenzwertueberschreitung', flex: 1, renderer: function(value) { if (value === true) { return "Ja"; } else { return "Nein"; } } } ]; this.callParent(arguments); } });