94 { name: 'bacteria', type: 'int' }, |
94 { name: 'bacteria', type: 'int' }, |
95 { name: 'harvest_top', type: 'int' }, |
95 { name: 'harvest_top', type: 'int' }, |
96 { name: 'harvest_time', type: 'int' }, |
96 { name: 'harvest_time', type: 'int' }, |
97 { name: 'pitch_temperature', type: 'float' }, |
97 { name: 'pitch_temperature', type: 'float' }, |
98 { name: 'pofpos', type: 'int' }, |
98 { name: 'pofpos', type: 'int' }, |
99 { name: 'zymocide', type: 'int' } |
99 { name: 'zymocide', type: 'int' }, |
|
100 { name: 'short_desc', type: 'string' } |
100 ], |
101 ], |
101 id: 'record', |
102 id: 'record', |
102 url: url, |
103 url: url, |
103 deleterow: function(rowid, commit) { |
104 deleterow: function(rowid, commit) { |
104 // synchronize with the server - send delete command |
105 // synchronize with the server - send delete command |
157 editrow = -1; |
158 editrow = -1; |
158 |
159 |
159 // initialize the input fields. |
160 // initialize the input fields. |
160 $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); |
161 $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); |
161 $('#laboratory').jqxInput({ theme: theme, width: 320, height: 23 }); |
162 $('#laboratory').jqxInput({ theme: theme, width: 320, height: 23 }); |
|
163 $('#short_desc').jqxInput({ theme: theme, width: 320, height: 23 }); |
162 $('#product_id').jqxInput({ theme: theme, width: 320, height: 23 }); |
164 $('#product_id').jqxInput({ theme: theme, width: 320, height: 23 }); |
163 $('#type').jqxDropDownList({ |
165 $('#type').jqxDropDownList({ |
164 theme: theme, |
166 theme: theme, |
165 source: YeastTypeAdapter, |
167 source: YeastTypeAdapter, |
166 valueMember: 'nl', |
168 valueMember: 'nl', |
253 addButton.click(function(event) { |
255 addButton.click(function(event) { |
254 editrow = -1; |
256 editrow = -1; |
255 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); |
257 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); |
256 $('#name').val(''); |
258 $('#name').val(''); |
257 $('#laboratory').val(''); |
259 $('#laboratory').val(''); |
|
260 $('#short_desc').val(''); |
258 $('#product_id').val(''); |
261 $('#product_id').val(''); |
259 $('#type').val('Bovengist'); |
262 $('#type').val('Bovengist'); |
260 $('#form').val('Vloeibaar'); |
263 $('#form').val('Vloeibaar'); |
261 $('#min_temperature').val(18); |
264 $('#min_temperature').val(18); |
262 $('#max_temperature').val(22); |
265 $('#max_temperature').val(22); |
354 $('#harvest_top').val(dataRecord.harvest_top); |
357 $('#harvest_top').val(dataRecord.harvest_top); |
355 $('#harvest_time').val(dataRecord.harvest_time); |
358 $('#harvest_time').val(dataRecord.harvest_time); |
356 $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature)); |
359 $('#pitch_temperature').val(parseFloat(dataRecord.pitch_temperature)); |
357 $('#pofpos').val(dataRecord.pofpos); |
360 $('#pofpos').val(dataRecord.pofpos); |
358 $('#zymocide').val(dataRecord.zymocide); |
361 $('#zymocide').val(dataRecord.zymocide); |
|
362 $('#short_desc').val(dataRecord.short_desc); |
359 calcTotal(); |
363 calcTotal(); |
360 // show the popup window. |
364 // show the popup window. |
361 $('#popupWindow').jqxWindow('open'); |
365 $('#popupWindow').jqxWindow('open'); |
362 } |
366 } |
363 } |
367 } |
476 bacteria: $('#bacteria').val(), |
480 bacteria: $('#bacteria').val(), |
477 harvest_top: $('#harvest_top').val(), |
481 harvest_top: $('#harvest_top').val(), |
478 harvest_time: $('#harvest_time').val(), |
482 harvest_time: $('#harvest_time').val(), |
479 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
483 pitch_temperature: parseFloat($('#pitch_temperature').jqxNumberInput('decimal')), |
480 pofpos: $('#pofpos').val(), |
484 pofpos: $('#pofpos').val(), |
481 zymocide: $('#zymocide').val() |
485 zymocide: $('#zymocide').val(), |
|
486 short_desc: $('#short_desc').val() |
482 }; |
487 }; |
483 if (editrow >= 0) { |
488 if (editrow >= 0) { |
484 $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
489 $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
485 } else { |
490 } else { |
486 $('#jqxgrid').jqxGrid('addrow', null, row); |
491 $('#jqxgrid').jqxGrid('addrow', null, row); |