# HG changeset patch # User Roland Geider # Date 1418827295 -3600 # Node ID a12c9c97d3cb24663aba26c8929ba65417c11aed # Parent fbe81214026ae0c02d744cae5a2b271d8131368c Make tables editable for 'Zusatzwerte' See LSB 3.5 diff -r fbe81214026a -r a12c9c97d3cb app/controller/Zusatzwerte.js --- a/app/controller/Zusatzwerte.js Wed Dec 17 15:34:04 2014 +0100 +++ b/app/controller/Zusatzwerte.js Wed Dec 17 15:41:35 2014 +0100 @@ -22,9 +22,9 @@ addListeners: function() { this.control({ - 'zusatzwertelist': { - itemdblclick: this.editItem - }, + //'zusatzwertelist': { + // itemdblclick: this.editItem + //}, 'zusatzwertelist toolbar button[action=add]': { click: this.addItem }, diff -r fbe81214026a -r a12c9c97d3cb app/view/zusatzwerte/List.js --- a/app/view/zusatzwerte/List.js Wed Dec 17 15:34:04 2014 +0100 +++ b/app/view/zusatzwerte/List.js Wed Dec 17 15:41:35 2014 +0100 @@ -26,6 +26,11 @@ probeId: null, initComponent: function() { + var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', { + clicksToMoveEditor: 1, + autoCancel: false + }); + this.plugins = [rowEditing]; this.dockedItems = [{ xtype: 'toolbar', dock: 'bottom', @@ -42,7 +47,11 @@ }]; this.columns = [{ header: 'PZW-ID', - dataIndex: 'id' + dataIndex: 'id', + editor: { + xtype: 'numberfield', + allowBlank: false + } }, { header: 'PZW-Größe', dataIndex: 'pzsId', @@ -51,7 +60,10 @@ var record = store.getById(value); return record.get('beschreibung'); }, - flex: 1 + flex: 1, + editor: { + xtype: 'probenzusatzwert' + } }, { header: 'Messwert', dataIndex: 'id', @@ -67,7 +79,10 @@ } }, { header: 'rel. Unsich.[%]', - dataIndex: 'messfehler' + dataIndex: 'messfehler', + editor: { + allowBlank: false + } }, { header: 'Maßeinheit', dataIndex: 'pzsId', @@ -77,7 +92,11 @@ var mehId = zstore.getById(value).get('mehId'); var record = mstore.findRecord('id', mehId); return record.get('einheit'); - } + }/*, + editor: { + xtype: 'messeinheit', + allowBlank: false + }*/ }]; this.callParent(arguments); }