Sat, 23 May 2020 20:01:50 +0200
In inventory miscs added the clone option.
www/inv_miscs.php | file | annotate | diff | comparison | revisions | |
www/js/inv_miscs.js | file | annotate | diff | comparison | revisions |
--- 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 @@ <td align="left" style="vertical-align: top;"><div id="tht_date"></div></td> </tr> <tr> - <td style="padding-top: 110px;" align="right"><input type="button" id="Delete" value="Verwijder" /></td> - <td align="right"></td> - <td align="right"></td> - <td style="padding-top: 110px;" align="left"> - <input style="margin-right: 5px;" type="button" id="Save" value="Sla op" /> - <input id="Cancel" type="button" value="Annuleer" /> - </td> + <td style="padding-top: 100px;" align="right"><input type="button" id="Delete" value="Verwijder" /></td> + <td style="padding-top: 100px;" align="left"><input type="button" id="Clone" value="Kloon" /></td> + <td style="padding-top: 100px;" align="right"><input type="button" id="Save" value="Sla op" /></td> + <td style="padding-top: 100px;" align="left"><input id="Cancel" type="button" value="Annuleer" /></td> </tr> </table> </div>
--- 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 <mbroek at mbse dot eu> * @@ -177,13 +177,12 @@ theme: theme, showstatusbar: true, renderstatusbar: function(statusbar) { - var container, addButton, impButton; - container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>'); - addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' + + var container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>'); + var addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' + 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Nieuw</span></div>'); - impButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' + + var impButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' + 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Import</span></div>'); - expButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' + + var expButton = $('<div style="float: right; margin-right: 50px;"><img style="position: relative; margin-top: 2px;" ' + 'src="images/database.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Export</span></div>'); 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() {