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@350: /* torsten@350: * Grid to list Status torsten@350: */ raimund@497: Ext.define('Lada.view.status.List', { torsten@182: extend: 'Ext.grid.Panel', torsten@182: alias: 'widget.statuslist', raimund@491: torsten@182: store: 'Status', torsten@182: viewConfig: { torsten@182: maxHeight: 350, torsten@182: emptyText: 'Keine Statusangaben gefunden.', torsten@182: // minHeight and deferEmptyText are needed to be able to show the torsten@182: // emptyText message. torsten@182: minHeight: 35, torsten@182: deferEmptyText: false torsten@182: }, raimund@491: torsten@201: parentId: null, torsten@182: probeId: null, raimund@491: torsten@182: initComponent: function() { roland@523: var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { roland@523: clicksToMoveEditor: 1, roland@523: autoCancel: false roland@523: }); roland@523: this.plugins = [rowEditing]; 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@523: dataIndex: 'erzeuger', roland@523: editor: { roland@523: allowBlank: false roland@523: } raimund@491: }, { raimund@491: header: 'Status', roland@523: dataIndex: 'status', roland@523: editor: { roland@523: allowBlank: false roland@523: } raimund@491: }, { raimund@491: header: 'Datum', roland@523: dataIndex: 'datum', roland@523: editor: { roland@523: xtype: 'datefield', roland@523: allowBlank: false, roland@523: format: 'd.m.Y', roland@523: maxValue: Ext.Date.format(new Date(), 'd.m.Y') roland@523: } raimund@491: }, { raimund@491: header: 'Text', raimund@491: dataIndex: 'kommentar', roland@523: flex: 1, roland@523: editor: { roland@523: allowBlank: true roland@523: } raimund@491: }]; torsten@182: this.callParent(arguments); torsten@182: } torsten@182: });