www/js/prod_divide.js

changeset 525
8bbc5730aaa8
parent 500
8d53ad389204
child 533
be8691b7d634
--- a/www/js/prod_divide.js	Fri Oct 18 20:04:40 2019 +0200
+++ b/www/js/prod_divide.js	Fri Oct 18 20:49:07 2019 +0200
@@ -21,7 +21,7 @@
  *****************************************************************************/
 
 
-$(document).ready(function () {
+$(document).ready(function() {
 
  $('#divide_type').jqxDropDownList({
   theme: theme,
@@ -298,7 +298,7 @@
    for (i = 0; i < SplitData.length; i++) {
     console.log('i:' + i + ' ok:' + SplitData[i].ok + ' stage:' + dataRecord.stage);
     if (SplitData[i].ok < dataRecord.stage)
-     $("#divide_type").jqxDropDownList('disableAt', i);
+     $('#divide_type').jqxDropDownList('disableAt', i);
    }
   },
    loadError: function(jqXHR, status, error) {
@@ -396,23 +396,23 @@
     { text: 'Splits code', datafield: 'split_code', width: 120, editable: false },
     { text: 'Splits naam', datafield: 'split_name' },
     { text: 'Splits volume', datafield: 'split_size', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'f1', columntype: 'numberinput',
-      validation: function (cell, value) {
+      validation: function(cell, value) {
        if (value < 0 || value > maxvolume) {
          return { result: false, message: 'Volume should be between 0 and ' + maxvolume + ' liter' };
        }
        return true;
       },
-      createeditor: function (row, cellvalue, editor) {
+      createeditor: function(row, cellvalue, editor) {
        editor.jqxNumberInput({ decimalDigits: 1, digits: 3 });
       }
     }
    ]
   });
-  $('#splitGrid').on('cellbeginedit', function (event) {
+  $('#splitGrid').on('cellbeginedit', function(event) {
     var args = event.args;
     calcRoom(args.rowindex); // Make maxvolume available.
   });
-  $('#splitGrid').on('cellvaluechanged', function (event) {
+  $('#splitGrid').on('cellvaluechanged', function(event) {
     var args = event.args;
     //console.log("cellvaluechanged, Column: " + args.datafield + ", Row: " + (1 + args.rowindex) + ", Value: " + args.value);
     calcLeftover();
@@ -493,8 +493,8 @@
      url: durl,
      cache: false,
      data: data,
-     type: "POST",
-     success: function (data, status, xhr) {
+     type: 'POST',
+     success: function(data, status, xhr) {
       console.log('insert divides: 0');
      },
      error: function(jqXHR, textStatus, errorThrown) {
@@ -519,8 +519,8 @@
      url: durl,
      cache: false,
      data: data,
-     type: "POST",
-     success: function (data, status, xhr) {
+     type: 'POST',
+     success: function(data, status, xhr) {
       console.log('insert divides: ' + i);
      },
      error: function(jqXHR, textStatus, errorThrown) {
@@ -540,8 +540,8 @@
      url: url,
      cache: false,
      data: data,
-     type: "POST",
-     success: function (data, status, xhr) {
+     type: 'POST',
+     success: function(data, status, xhr) {
       console.log('updated products');
      },
      error: function(jqXHR, textStatus, errorThrown) {

mercurial