Mercurial > lada > lada-client
view app/view/messwerte/List.js @ 440:d900db3e9be9
Added tag 0.9 for changeset 1fc4407c6c83
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 02 Dec 2013 15:20:30 +0100 |
parents | 3ed0ab0f5ee5 |
children | bba7fbcf2f70 |
line wrap: on
line source
/* * Grid to list Messwerte */ 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/list-add.png', action: 'add', probeId: this.probeId, parentId: this.parentId }, { text: 'Löschen', icon: 'gfx/list-remove.png', action: 'delete' } ] } ]; this.columns = [ { header: '<NWG', dataIndex: 'messwert', renderer: function(value, row) { // the seconds argument here is not documented in JQuery // but it has the current rendererd row and this // referenced the record. var nwg = row.record.get('nwgZuMesswert'); if (value < nwg) { return "<"; } else { return ""; } } }, { header: 'Messwert', dataIndex: 'messwert', renderer: function(value, row) { // the seconds argument here is not documented in JQuery // but it has the current rendererd row and this // referenced the record. var nwg = row.record.get('nwgZuMesswert'); if (value < nwg) { return nwg; } else { return value; } } }, {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); } });