# HG changeset patch # User Michiel Broek # Date 1590256910 -7200 # Node ID 10ff024acff12eb1a518fba0b1821b4f83f42682 # Parent 499c4921a90f04bc70589b030caefd5f4af84d44 In inventory miscs added the clone option. diff -r 499c4921a90f -r 10ff024acff1 www/inv_miscs.php --- a/www/inv_miscs.php Sat May 23 17:33:35 2020 +0200 +++ b/www/inv_miscs.php Sat May 23 20:01:50 2020 +0200 @@ -60,13 +60,10 @@
- - - - - - - + + + + diff -r 499c4921a90f -r 10ff024acff1 www/js/inv_miscs.js --- a/www/js/inv_miscs.js Sat May 23 17:33:35 2020 +0200 +++ b/www/js/inv_miscs.js Sat May 23 20:01:50 2020 +0200 @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (C) 2014-2019 + * Copyright (C) 2014-2020 * * Michiel Broek * @@ -177,13 +177,12 @@ theme: theme, showstatusbar: true, renderstatusbar: function(statusbar) { - var container, addButton, impButton; - container = $('
'); - addButton = $('
'); + var addButton = $('
Nieuw
'); - impButton = $('
Import
'); - expButton = $('
Export
'); container.append(addButton); container.append(impButton); @@ -330,6 +329,26 @@ $('#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(), + use_use: $('#use_use').val(), + time: parseFloat($('#time').jqxNumberInput('decimal')), + amount_is_weight: $('#amount_is_weight').val(), + use_for: $('#use_for').val(), + notes: $('#notes').val(), + always_on_stock: $('#always_on_stock').val(), + inventory: 0, + cost: parseFloat($('#cost').jqxNumberInput('decimal')), + production_date: '', + tht_date: '' + }; + $('#jqxgrid').jqxGrid('addrow', null, row); + $('#popupWindow').jqxWindow('hide'); + }); $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme }); // update the edited row when the user clicks the 'Save' button. $('#Save').click(function() {