comparison app/view/grid/Probenzusatzwert.js @ 665:4a9bd2664da6

Field Validity in Probenzusatzwerte Grid
author Dustin Demuth <dustin@intevation.de>
date Thu, 19 Mar 2015 11:33:43 +0100
parents f59bda7551d7
children 612f4f933083
comparison
equal deleted inserted replaced
664:6fe3cef53e74 665:4a9bd2664da6
65 editor: { 65 editor: {
66 xtype: 'combobox', 66 xtype: 'combobox',
67 store: Ext.data.StoreManager.get('probenzusaetze'), 67 store: Ext.data.StoreManager.get('probenzusaetze'),
68 displayField: 'beschreibung', 68 displayField: 'beschreibung',
69 valueField: 'id', 69 valueField: 'id',
70 allowBlank: false 70 allowBlank: false,
71 editable: false
71 } 72 }
72 }, { 73 }, {
73 header: 'Messwert', 74 header: 'Messwert',
74 dataIndex: 'messwertPzs', 75 dataIndex: 'messwertPzs',
75 xtype: 'numbercolumn', 76 xtype: 'numbercolumn',
76 flex: 1, 77 flex: 1,
77 editor: { 78 editor: {
78 xtype: 'numberfield', 79 xtype: 'numberfield',
79 allowBlank: false 80 allowBlank: false,
81 maxLength: 10,
82 enforceMaxLength: true,
83 allowExponential: false
84 }
85 }, {
86 header: '< NWG',
87 flex: 1,
88 renderer: function(value, meta, record) {
89 var nwg = record.get('nwgZuMesswert');
90 var mw = record.get('messwertPzs');
91 if ( mw < nwg) {
92 return '<';
93 }
94 return '';
95 }
96 }, {
97 header: 'Nachweisgrenze',
98 dataIndex: 'nwgZuMesswert',
99 xtype: 'numbercolumn',
100 format: '0',
101 flex: 1,
102 editor: {
103 xtype: 'numberfield',
104 allowBlank: false,
105 maxLength: 10,
106 enforceMaxLength: true,
107 allowExponential: false
80 } 108 }
81 }, { 109 }, {
82 header: 'Maßeinheit', 110 header: 'Maßeinheit',
83 dataIndex: 'pzsId', 111 dataIndex: 'pzsId',
84 flex: 1, 112 flex: 1,
91 var mehId = zstore.getById(value).get('mehId'); 119 var mehId = zstore.getById(value).get('mehId');
92 var record = mstore.findRecord('id', mehId); 120 var record = mstore.findRecord('id', mehId);
93 return record.get('einheit'); 121 return record.get('einheit');
94 } 122 }
95 }, { 123 }, {
96 header: 'Nachweisgrenze',
97 dataIndex: 'nwgZuMesswert',
98 xtype: 'numbercolumn',
99 format: '0',
100 flex: 1,
101 editor: {
102 xtype: 'numberfield',
103 allowBlank: false
104 }
105 }, {
106 header: 'rel. Unsich.[%]', 124 header: 'rel. Unsich.[%]',
107 dataIndex: 'messfehler', 125 dataIndex: 'messfehler',
108 xtype: 'numbercolumn', 126 xtype: 'numbercolumn',
109 format: '0', 127 format: '0',
110 flex: 1, 128 flex: 1,
111 editor: { 129 editor: {
112 xtype: 'numberfield', 130 xtype: 'numberfield',
113 allowBlank: false 131 allowBlank: false,
114 } 132 maxLength: 3,
115 }, { 133 enforceMaxLength: true,
116 header: '< NWG', 134 allowExponential: false,
117 flex: 1, 135 allowDecimal: false
118 renderer: function(value, meta, record) {
119 var nwg = record.get('nwgZuMesswert');
120 var mw = record.get('messwertPzs');
121 if ( mw < nwg) {
122 return 'MW < NWG';
123 }
124 return '';
125 } 136 }
126 }]; 137 }];
127 this.initData(); 138 this.initData();
128 this.callParent(arguments); 139 this.callParent(arguments);
129 }, 140 },

http://lada.wald.intevation.org