Mon, 24 Sep 2018 22:13:50 +0200
Start building the workflow in the scripts.
www/css/style.css | file | annotate | diff | comparison | revisions | |
www/gen_about.php | file | annotate | diff | comparison | revisions | |
www/includes/global.inc.php | file | annotate | diff | comparison | revisions | |
www/js/global.js | file | annotate | diff | comparison | revisions | |
www/js/rec_main.js | file | annotate | diff | comparison | revisions | |
www/js/recipes.js | file | annotate | diff | comparison | revisions | |
www/rec_main.php | file | annotate | diff | comparison | revisions |
--- a/www/css/style.css Mon Sep 24 11:57:40 2018 +0200 +++ b/www/css/style.css Mon Sep 24 22:13:50 2018 +0200 @@ -29,6 +29,15 @@ } +#about_table { + width: 960px; + background: #353536; + margin: 150px; + border: 2px solid; + border-color: #59b4d4; + border-radius: 5px 5px 5px 5px; +} + #node_table { width: 600px;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/gen_about.php Mon Sep 24 22:13:50 2018 +0200 @@ -0,0 +1,19 @@ +<?php +require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); +page_header('Over BMS', NULL); +?> + + <div id="MainPanel"> + <div id="ContentPanel"></div> + <div id='about_table'> + <table style='width: 100%; padding: 10px;'> + <tr><th colspan=2>Over BMS</th></tr> + <tr><td> </td><td> </td></tr> + <tr><td>Versie:</td><td><?php echo $my_version;?> </td></tr> + </table> + </div> + </div> + +<?php +page_footer(); +?>
--- a/www/includes/global.inc.php Mon Sep 24 11:57:40 2018 +0200 +++ b/www/includes/global.inc.php Mon Sep 24 22:13:50 2018 +0200 @@ -121,7 +121,7 @@ </li> <li>Recepten <ul> - <li><a href="recipes.php">Recepten</a></li> + <li><a href="rec_main.php">Recepten</a></li> <li>Import</li> </ul> </li> @@ -146,21 +146,12 @@ </li> <li>Over <ul> - <li><a href="#aboutWindow">Informatie</a></li> + <li><a href="gen_about.php">Informatie</a></li> </ul> </li> </ul> </div> <!-- End menu --> - <div id="aboutWindow"> - <div> - Over BMS - </div> - <div> - The about text comes here - </div> - </div> - <?php }
--- a/www/js/global.js Mon Sep 24 11:57:40 2018 +0200 +++ b/www/js/global.js Mon Sep 24 22:13:50 2018 +0200 @@ -72,15 +72,6 @@ $(document).ready(function () { - $('#aboutWindow').jqxWindow({ - resizable: true, - minWidth: 300, - minHeight: 300, - theme: theme, - autoOpen: false, - isModal: true - }); - $('#aboutWindow').jqxWindow('focus'); $("#jqxMenu").jqxMenu({ width: 1280,
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/js/rec_main.js Mon Sep 24 22:13:50 2018 +0200 @@ -0,0 +1,84 @@ +/***************************************************************************** + * Copyright (C) 2018 + * + * 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: 'st_name', type: 'string' }, + { name: 'st_letter', type: 'string' }, + { name: 'st_guide', type: 'string' }, + { name: 'name', type: 'string' }, + { name: 'est_og', type: 'float' }, + { name: 'est_color', type: 'float' }, + { name: 'est_ibu', type: 'float' }, + ], + id: 'record', + url: "includes/db_recipes.php" + }; + var dataAdapter = new $.jqx.dataAdapter(source); + // initialize jqxGrid + $("#jqxgrid").jqxGrid({ + width: 1280, + height: 630, + source: dataAdapter, + groupable: true, + theme: theme, + showstatusbar: true, + localization: getLocalization(), + renderstatusbar: function (statusbar) { + 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;'>Add</span></div>"); + container.append(addButton); + statusbar.append(container); + addButton.jqxButton({ theme: theme, width: 120, height: 20 }); + // add new recipe. + addButton.click(function (event) { + var url= "rec_new.php?return='rec_main.php'"; + window.location.href = url; + }); + }, + filterable: true, + filtermode: 'excel', + columns: [ + { text: 'Stijlgids', datafield: 'st_guide', width: 120 }, + { text: 'Letter', datafield: 'st_letter', width: 60 }, + { text: 'Stijl', datafield: 'st_name', width: 150 }, + { text: 'Naam', datafield: 'name' }, + { text: 'OG', datafield: 'est_og', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, + { text: 'EBC', datafield: 'est_color', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, + { text: 'IBU', datafield: 'est_ibu', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, + { text: 'Wijzig', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function () { + return "Wijzig"; + }, buttonclick: function (row) { + var datarecord = dataAdapter.records[row]; + var url= "rec_edit.php?record=" + datarecord.record + "&return='rec_main.php'"; + window.location.href = url; + } + } + ], + groups: ['st_guide','st_letter' ] + }); +});
--- a/www/js/recipes.js Mon Sep 24 11:57:40 2018 +0200 +++ b/www/js/recipes.js Mon Sep 24 22:13:50 2018 +0200 @@ -298,7 +298,12 @@ }); }, columns: [ - { text: 'Mout/suiker', editable: false, datafield: 'f_name' }, + { text: 'Mout/suiker', editable: false, datafield: 'f_name', + cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties) { + var rowData = $("#fermentableGrid").jqxGrid('getrowdata', row); + return rowData.f_name + " (" + rowData.f_color + " EBC)"; + } + }, { text: 'Type', editable: false, width: 100, datafield: 'f_type' }, { text: 'Opbrengst', editable: false, datafield: 'f_yield', width: 80, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, { text: 'Gewicht', datafield: 'f_amount', width: 110, align: 'right', cellsalign: 'right', cellsformat: 'f3',
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/www/rec_main.php Mon Sep 24 22:13:50 2018 +0200 @@ -0,0 +1,14 @@ +<?php +require_once($_SERVER['DOCUMENT_ROOT'].'/includes/global.inc.php'); +page_header('Recepten', 'rec_main'); +?> + + <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(); +?>