Reinstalled the product archives menus

Wed, 10 Aug 2022 11:28:53 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Wed, 10 Aug 2022 11:28:53 +0200
changeset 833
bdef871e6db7
parent 832
2641860ad61d
child 834
00e610fc3571

Reinstalled the product archives menus

www/includes/global.inc.php file | annotate | diff | comparison | revisions
www/js/prod_archive_code.js file | annotate | diff | comparison | revisions
www/js/prod_archive_date.js file | annotate | diff | comparison | revisions
www/js/prod_archive_name.js file | annotate | diff | comparison | revisions
www/prod_archive_code.php file | annotate | diff | comparison | revisions
www/prod_archive_date.php file | annotate | diff | comparison | revisions
www/prod_archive_name.php file | annotate | diff | comparison | revisions
--- a/www/includes/global.inc.php	Sat Aug 06 22:10:28 2022 +0200
+++ b/www/includes/global.inc.php	Wed Aug 10 11:28:53 2022 +0200
@@ -222,7 +222,14 @@
        </li>
       </ul>
      </li>
-     <li style='width: 80px;'><a href="prod_inprod.php">Productie</a></li>
+     <li style='width: 80px;'>Productie
+      <ul style='width: 200px;'>
+       <li><img style='float: left; margin-right: 5px;' src='images/beerstyles.png' /><a href="prod_inprod.php">In productie</a></li>
+       <li><img style='float: left; margin-right: 5px;' src='images/database.png' /><a href="prod_archive_code.php">Archief op code</a></li>
+       <li><img style='float: left; margin-right: 5px;' src='images/database.png' /><a href="prod_archive_date.php">Archief op datum</a></li>
+       <li><img style='float: left; margin-right: 5px;' src='images/database.png' /><a href="prod_archive_name.php">Archief op naam</a></li>
+      </ul>
+     </li>
      <li style='width: 80px;'><a href="rec_main.php">Recepten</a></li>
      <li style='width: 80px;'><a href="gen_about.php">Over</a></li>
     </ul>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_archive_code.js	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * 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';
+    }
+   }
+  ],
+ });
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_archive_date.js	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,70 @@
+/*****************************************************************************
+ * 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: 'year', 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=archdate'
+ },
+ dataAdapter = new $.jqx.dataAdapter(source);
+
+ // initialize jqxGrid
+ $('#jqxgrid').jqxGrid({
+  width: 1280,
+  height: 630,
+  source: dataAdapter,
+  groupable: true,
+  theme: theme,
+  columns: [
+   { text: 'Jaar', datafield: 'year', width: 80 },
+   { text: 'Datum', datafield: 'date', width: 120, menu: false },
+   { text: 'Naam', datafield: 'name', menu: false },
+   { text: 'Stijl', datafield: 'style', width: 250 },
+   { text: 'OG', datafield: 'og', width: 80, cellsformat: 'f3', menu: false },
+   { text: 'FG', datafield: 'fg', width: 80, cellsformat: 'f3', menu: false },
+   { text: 'Code', datafield: 'code', width: 100, menu: false },
+   { text: 'Liters', datafield: 'batch_size', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'f1', menu: false },
+   { 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=archdate&return=prod_archive_date.php';
+    }
+   }
+  ],
+  groups: ['year']
+ });
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/js/prod_archive_name.js	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,66 @@
+/*****************************************************************************
+ * 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=archname'
+ },
+ dataAdapter = new $.jqx.dataAdapter(source);
+
+ // initialize jqxGrid
+ $('#jqxgrid').jqxGrid({
+  width: 1280,
+  height: 630,
+  source: dataAdapter,
+  theme: theme,
+  columns: [
+   { 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: 'Code', datafield: 'code', width: 100 },
+   { 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=archname&return=prod_archive_name.php';
+    }
+   }
+  ],
+ });
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_archive_code.php	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,14 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Producten archief op code', 'prod_archive_code');
+?>
+
+   <div id="jqxgrid"></div>
+    <div style="margin-top: 30px;">
+    <div id="cellbegineditevent"></div>
+    <div style="margin-top: 10px;" id="cellendeditevent"></div>
+   </div>
+
+<?php
+page_footer();
+?>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_archive_date.php	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,14 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Producten archief op datum', 'prod_archive_date');
+?>
+
+   <div id="jqxgrid"></div>
+    <div style="margin-top: 30px;">
+    <div id="cellbegineditevent"></div>
+    <div style="margin-top: 10px;" id="cellendeditevent"></div>
+   </div>
+
+<?php
+page_footer();
+?>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/www/prod_archive_name.php	Wed Aug 10 11:28:53 2022 +0200
@@ -0,0 +1,14 @@
+<?php
+require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php');
+page_header('Producten archief op naam', 'prod_archive_name');
+?>
+
+   <div id="jqxgrid"></div>
+    <div style="margin-top: 30px;">
+    <div id="cellbegineditevent"></div>
+    <div style="margin-top: 10px;" id="cellendeditevent"></div>
+   </div>
+
+<?php
+page_footer();
+?>

mercurial