torsten@472: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz torsten@472: * Software engineering by Intevation GmbH torsten@472: * torsten@472: * This file is Free Software under the GNU GPL (v>=3) torsten@472: * and comes with ABSOLUTELY NO WARRANTY! Check out raimund@497: * the documentation coming with IMIS-Labordaten-Application for details. torsten@472: */ torsten@472: torsten@346: /* torsten@346: * Grid to list Kommentare for Messunge torsten@346: */ raimund@497: Ext.define('Lada.view.mkommentare.List', { torsten@207: extend: 'Ext.grid.Panel', torsten@180: alias: 'widget.mkommentarelist', raimund@491: raimund@490: store: 'KommentareM', torsten@207: viewConfig: { torsten@207: maxHeight: 350, torsten@207: emptyText: 'Keine Kommentare gefunden.', torsten@207: // minHeight and deferEmptyText are needed to be able to show the torsten@207: // emptyText message. torsten@207: minHeight: 35, torsten@207: deferEmptyText: false torsten@207: }, raimund@491: torsten@207: probeId: null, torsten@207: parentId: null, raimund@491: torsten@207: initComponent: function() { roland@524: var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { roland@524: clicksToMoveEditor: 1, roland@524: autoCancel: false roland@524: }); roland@524: roland@524: this.plugins = [rowEditing]; roland@524: raimund@491: this.dockedItems = [{ raimund@491: xtype: 'toolbar', raimund@513: dock: 'bottom', raimund@513: items: ['->', { raimund@491: text: 'Hinzufügen', raimund@491: icon: 'gfx/list-add.png', raimund@491: action: 'add', raimund@491: probeId: this.probeId, raimund@491: parentId: this.parentId raimund@491: }, { raimund@491: text: 'Löschen', raimund@491: icon: 'gfx/list-remove.png', raimund@491: action: 'delete' raimund@491: }] raimund@491: }]; raimund@491: this.columns = [{ raimund@491: header: 'Erzeuger', roland@524: dataIndex: 'erzeuger', roland@524: editor: { roland@524: allowBlank: false roland@524: } raimund@491: }, { raimund@491: header: 'Datum', roland@524: dataIndex: 'datum', roland@524: editor: { roland@524: xtype: 'datefield', roland@524: allowBlank: false, roland@524: format: 'd.m.Y', roland@524: maxValue: Ext.Date.format(new Date(), 'd.m.Y') roland@524: } raimund@491: }, { raimund@491: header: 'Text', raimund@491: dataIndex: 'text', roland@524: flex: 1, roland@524: editor: { roland@524: allowBlank: false roland@524: } raimund@491: }]; torsten@207: this.callParent(arguments); torsten@207: } torsten@180: });