www/js/prod_archive_code.js

Thu, 12 Oct 2023 14:19:46 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 12 Oct 2023 14:19:46 +0200
changeset 849
16079aef4c4c
parent 833
bdef871e6db7
permissions
-rw-r--r--

Version 0.3.44. Moved iSpindel Plato calculation from the php script to bmsd. This uses calibration data in the mon_ispindels table. Setup of this data will be done by the bmsapp applications. Default settings are stored in MySQL. From now on you don't need to store calibration data in the iSpindel.

/*****************************************************************************
 * Copyright (C) 2019
 *
 * Michiel Broek <mbroek at mbse dot eu>
 *
 * This file is part of BMS
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * BrewCloud is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ThermFerm; see the file COPYING.  If not, write to the Free
 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 *****************************************************************************/


$(document).ready(function() {
 var source = {
  datatype: 'json',
  cache: false,
  datafields: [
   { name: 'record', type: 'number' },
   { name: 'name', type: 'string' },
   { name: 'code', type: 'string' },
   { name: 'date', type: 'string' },
   { name: 'style', type: 'string' },
   { name: 'og', type: 'float' },
   { name: 'fg', type: 'float' },
   { name: 'batch_size', type: 'float' },
  ],
  id: 'record',
  url: 'includes/db_product.php?select=archcode'
 },
 dataAdapter = new $.jqx.dataAdapter(source);

 // initialize jqxGrid
 $('#jqxgrid').jqxGrid({
  width: 1280,
  height: 630,
  source: dataAdapter,
  theme: theme,
  columns: [
   { text: 'Code', datafield: 'code', width: 100 },
   { text: 'Naam', datafield: 'name' },
   { text: 'Stijl', datafield: 'style', width: 250 },
   { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3' },
   { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3' },
   { text: 'Datum', datafield: 'date', width: 120 },
   { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
   { text: '', datafield: 'Edit', width: 80, align: 'center', columntype: 'button', cellsrenderer: function() {
    return 'Bekijk';
    }, buttonclick: function(row) {
     var datarecord = dataAdapter.records[row];
     window.location.href = 'prod_view.php?record=' + datarecord.record + '&select=archcode&return=prod_archive_code.php';
    }
   }
  ],
 });
});

mercurial