364 }); |
364 }); |
365 } |
365 } |
366 $("#popupWindow").jqxWindow('hide'); |
366 $("#popupWindow").jqxWindow('hide'); |
367 }); |
367 }); |
368 $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); |
368 $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); |
|
369 $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme }); |
|
370 $("#Clone").click(function () { |
|
371 var row = { |
|
372 record: -1, |
|
373 name: $("#name").val()+" kopie", |
|
374 type: $("#type").val(), |
|
375 form: $("#form").val(), |
|
376 laboratory: $("#laboratory").val(), |
|
377 product_id: $("#product_id").val(), |
|
378 min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')), |
|
379 max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')), |
|
380 flocculation: $("#flocculation").val(), |
|
381 attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), |
|
382 notes: $("#notes").val(), |
|
383 best_for: $("#best_for").val(), |
|
384 max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')), |
|
385 inventory: 0, |
|
386 cost: parseFloat($("#cost").jqxNumberInput('decimal')), |
|
387 production_date: '', |
|
388 tht_date: '', |
|
389 cells: parseFloat($("#cells").jqxNumberInput('decimal')), |
|
390 tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')) |
|
391 }; |
|
392 $('#jqxgrid').jqxGrid('addrow', null, row); |
|
393 $("#popupWindow").jqxWindow('hide'); |
|
394 location.reload( true ); // reload ourself. |
|
395 }); |
369 $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
396 $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
370 // update the edited row when the user clicks the 'Save' button. |
397 // update the edited row when the user clicks the 'Save' button. |
371 $("#Save").click(function () { |
398 $("#Save").click(function () { |
372 var rowID = -1; |
399 var rowID = -1; |
373 if (editrow >= 0) { |
400 if (editrow >= 0) { |