diff -r 06df1320327c -r 77f1617b6994 www/js/inv_suppliers.js --- a/www/js/inv_suppliers.js Fri Sep 13 16:54:51 2019 +0200 +++ b/www/js/inv_suppliers.js Fri Sep 13 20:24:31 2019 +0200 @@ -45,7 +45,7 @@ $(document).ready(function () { - var url = "includes/db_inventory_suppliers.php"; + // tooltips $("#name").jqxTooltip({ content: 'De naam van de leverancier.' }); $("#address").jqxTooltip({ content: 'Het adres en huisnummer.' }); @@ -56,8 +56,10 @@ $("#email").jqxTooltip({ content: 'Het email adres.' }); $("#phone").jqxTooltip({ content: 'Het telefoon nummer.' }); $("#notes").jqxTooltip({ content: 'Opmerkingen over deze leverancier.' }); + + var url = 'includes/db_inventory_suppliers.php', // prepare the data - var source = { + source = { datatype: "json", cache: false, datafields: [ @@ -84,8 +86,8 @@ data: data, type: "POST", success: function (data, status, xhr) { - // delete command is executed. commit(true); + location.reload( true ); }, error: function (jqXHR, textStatus, errorThrown) { commit(false); @@ -102,6 +104,7 @@ type: "POST", success: function (data, status, xhr) { commit(true); + location.reload( true ); }, error: function(jqXHR, textStatus, errorThrown) { commit(false); @@ -117,15 +120,18 @@ data: data, type: "POST", success: function (data, status, xhr) { - // update command is executed. commit(true); + location.reload( true ); }, error: function(jqXHR, textStatus, errorThrown) { commit(false); } }); } - }; + }, + dataAdapter = new $.jqx.dataAdapter(source), + editrow = -1; + // initialize the input fields. $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); $("#address").jqxInput({ theme: theme, width: 350, height: 23 }); @@ -137,8 +143,6 @@ $("#phone").jqxInput({ theme: theme, width: 175, height: 23 }); $("#notes").jqxInput({ theme: theme, width: 800, height: 100 }); - var dataAdapter = new $.jqx.dataAdapter(source); - var editrow = -1; // initialize jqxGrid $("#jqxgrid").jqxGrid({ width: 1280, @@ -147,8 +151,8 @@ theme: theme, showstatusbar: true, renderstatusbar: function (statusbar) { - var container = $("
"); - var addButton = $("