53 source = { |
53 source = { |
54 datatype: 'json', |
54 datatype: 'json', |
55 cache: false, |
55 cache: false, |
56 datafields: [ |
56 datafields: [ |
57 { name: 'record', type: 'number' }, |
57 { name: 'record', type: 'number' }, |
|
58 { name: 'uuid', type: 'string' }, |
58 { name: 'name', type: 'string' }, |
59 { name: 'name', type: 'string' }, |
59 { name: 'type', type: 'string' }, |
60 { name: 'type', type: 'string' }, |
60 { name: 'yield', type: 'float' }, |
61 { name: 'yield', type: 'float' }, |
61 { name: 'color', type: 'float' }, |
62 { name: 'color', type: 'float' }, |
62 { name: 'add_after_boil', type: 'int' }, |
63 { name: 'add_after_boil', type: 'int' }, |
228 // add new row. |
229 // add new row. |
229 addButton.click(function(event) { |
230 addButton.click(function(event) { |
230 editrow = -1; |
231 editrow = -1; |
231 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); |
232 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } }); |
232 $('#name').val('Nieuw product'); |
233 $('#name').val('Nieuw product'); |
|
234 dataRecord.uuid = ''; |
233 $('#type').val('Mout'); |
235 $('#type').val('Mout'); |
234 $('#origin').val(''); |
236 $('#origin').val(''); |
235 $('#supplier').val(''); |
237 $('#supplier').val(''); |
236 $('#notes').val(''); |
238 $('#notes').val(''); |
237 $('#yield').val(80); |
239 $('#yield').val(80); |
367 $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); |
369 $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); |
368 $('#Clone').click(function() { |
370 $('#Clone').click(function() { |
369 var row = { |
371 var row = { |
370 record: -1, |
372 record: -1, |
371 name: $('#name').val() + ' kopie', |
373 name: $('#name').val() + ' kopie', |
|
374 uuid: '', |
372 type: $('#type').val(), |
375 type: $('#type').val(), |
373 yield: parseFloat($('#yield').jqxNumberInput('decimal')), |
376 yield: parseFloat($('#yield').jqxNumberInput('decimal')), |
374 color: parseFloat($('#color').jqxNumberInput('decimal')), |
377 color: parseFloat($('#color').jqxNumberInput('decimal')), |
375 add_after_boil: $('#add_after_boil').val(), |
378 add_after_boil: $('#add_after_boil').val(), |
376 origin: $('#origin').val(), |
379 origin: $('#origin').val(), |
404 rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); |
407 rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); |
405 } |
408 } |
406 row = { |
409 row = { |
407 record: rowID, |
410 record: rowID, |
408 name: $('#name').val(), |
411 name: $('#name').val(), |
|
412 uuid: dataRecord.uuid, |
409 type: $('#type').val(), |
413 type: $('#type').val(), |
410 yield: parseFloat($('#yield').jqxNumberInput('decimal')), |
414 yield: parseFloat($('#yield').jqxNumberInput('decimal')), |
411 color: parseFloat($('#color').jqxNumberInput('decimal')), |
415 color: parseFloat($('#color').jqxNumberInput('decimal')), |
412 add_after_boil: $('#add_after_boil').val(), |
416 add_after_boil: $('#add_after_boil').val(), |
413 origin: $('#origin').val(), |
417 origin: $('#origin').val(), |