311 }); |
311 }); |
312 } |
312 } |
313 $("#popupWindow").jqxWindow('hide'); |
313 $("#popupWindow").jqxWindow('hide'); |
314 }); |
314 }); |
315 $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); |
315 $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); |
|
316 $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme }); |
|
317 $("#Clone").click(function () { |
|
318 var row = { |
|
319 record: -1, |
|
320 name: $("#name").val()+" kopie", |
|
321 alpha: parseFloat($("#alpha").jqxNumberInput('decimal')), |
|
322 beta: parseFloat($("#beta").jqxNumberInput('decimal')), |
|
323 humulene: parseFloat($("#humulene").jqxNumberInput('decimal')), |
|
324 caryophyllene: parseFloat($("#caryophyllene").jqxNumberInput('decimal')), |
|
325 cohumulone: parseFloat($("#cohumulone").jqxNumberInput('decimal')), |
|
326 myrcene: parseFloat($("#myrcene").jqxNumberInput('decimal')), |
|
327 hsi: parseFloat($("#hsi").jqxNumberInput('decimal')), |
|
328 type: $("#type").val(), |
|
329 form: $("#form").val(), |
|
330 notes: $("#notes").val(), |
|
331 origin: $("#origin").val(), |
|
332 substitutes: $("#substitutes").val(), |
|
333 always_on_stock: $("#always_on_stock").val(), |
|
334 inventory: 0, |
|
335 cost: parseFloat($("#cost").jqxNumberInput('decimal')), |
|
336 production_date: '', |
|
337 tht_date: '', |
|
338 total_oil: parseFloat($("#total_oil").jqxNumberInput('decimal')) |
|
339 }; |
|
340 $('#jqxgrid').jqxGrid('addrow', null, row); |
|
341 $("#popupWindow").jqxWindow('hide'); |
|
342 location.reload( true ); // reload ourself. |
|
343 }); |
316 $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
344 $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
317 // update the edited row when the user clicks the 'Save' button. |
345 // update the edited row when the user clicks the 'Save' button. |
318 $("#Save").click(function () { |
346 $("#Save").click(function () { |
319 var rowID = -1; |
347 var rowID = -1; |
320 if (editrow >= 0) { |
348 if (editrow >= 0) { |