Mercurial > lada > lada-client
changeset 183:ceb04286152a
Added missing file.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Fri, 05 Jul 2013 09:36:23 +0200 |
parents | 23f74ae3bb87 |
children | cfa4ed3b62b5 |
files | app/view/messwerte/List.js |
diffstat | 1 files changed, 69 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/view/messwerte/List.js Fri Jul 05 09:36:23 2013 +0200 @@ -0,0 +1,69 @@ +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, + initComponent: function() { + this.dockedItems = [ + { + xtype: 'toolbar', + dock: 'top', + items: [ + { + text: 'Hinzufügen', + icon: 'gfx/plus.gif', + action: 'add', + probeId: this.probeId + }, + { + 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); + } +}); +