# HG changeset patch # User Michiel Broek # Date 1551693926 -3600 # Node ID f943efa07d9fc5314f6b11f7b6eb80891c54a6ec # Parent 9f45d09c20714df9bce0838dbd47679c4c82b148 Added yeast duplicate button diff -r 9f45d09c2071 -r f943efa07d9f README.design --- a/README.design Sun Mar 03 16:27:39 2019 +0100 +++ b/README.design Mon Mar 04 11:05:26 2019 +0100 @@ -146,6 +146,7 @@ Extra: Gisten alcohol_tolerance veld toevoegen. +Gisten diastaticus bit toevoegen. Gist typen: kveik en brett? Apart of niet. diff -r 9f45d09c2071 -r f943efa07d9f www/inv_yeasts.php --- a/www/inv_yeasts.php Sun Mar 03 16:27:39 2019 +0100 +++ b/www/inv_yeasts.php Mon Mar 04 11:05:26 2019 +0100 @@ -83,7 +83,7 @@ - + diff -r 9f45d09c2071 -r f943efa07d9f www/js/inv_yeasts.js --- a/www/js/inv_yeasts.js Sun Mar 03 16:27:39 2019 +0100 +++ b/www/js/inv_yeasts.js Mon Mar 04 11:05:26 2019 +0100 @@ -366,6 +366,33 @@ $("#popupWindow").jqxWindow('hide'); }); $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme }); + $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme }); + $("#Clone").click(function () { + var row = { + record: -1, + name: $("#name").val()+" kopie", + type: $("#type").val(), + form: $("#form").val(), + laboratory: $("#laboratory").val(), + product_id: $("#product_id").val(), + min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')), + max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')), + flocculation: $("#flocculation").val(), + attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')), + notes: $("#notes").val(), + best_for: $("#best_for").val(), + max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')), + inventory: 0, + cost: parseFloat($("#cost").jqxNumberInput('decimal')), + production_date: '', + tht_date: '', + cells: parseFloat($("#cells").jqxNumberInput('decimal')), + tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal')) + }; + $('#jqxgrid').jqxGrid('addrow', null, row); + $("#popupWindow").jqxWindow('hide'); + location.reload( true ); // reload ourself. + }); $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); // update the edited row when the user clicks the 'Save' button. $("#Save").click(function () {