Sun, 02 May 2021 22:03:25 +0200
Upgrade mash steps when loading a product. Mash steps Brix input doesn't need wort correction. Added measure data input on the checklist for the first mash step.
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /***************************************************************************** |
471 | 2 | * Copyright (C) 2018-2019 |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * Michiel Broek <mbroek at mbse dot eu> |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * This file is part of BMS |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * This is free software; you can redistribute it and/or modify it |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * under the terms of the GNU General Public License as published by the |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * Free Software Foundation; either version 2, or (at your option) any |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * later version. |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * BrewCloud is distributed in the hope that it will be useful, but |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * General Public License for more details. |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | *****************************************************************************/ |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
473 | 24 | $(document).ready(function() { |
25 | var source = { | |
26 | datatype: 'json', | |
27 | cache: false, | |
28 | datafields: [ | |
29 | { name: 'record', type: 'number' }, | |
30 | { name: 'st_name', type: 'string' }, | |
31 | { name: 'st_letter', type: 'string' }, | |
32 | { name: 'st_guide', type: 'string' }, | |
33 | { name: 'name', type: 'string' }, | |
34 | { name: 'est_og', type: 'float' }, | |
35 | { name: 'est_color', type: 'float' }, | |
36 | { name: 'est_ibu', type: 'float' }, | |
37 | { name: 'est_abv', type: 'float' }, | |
38 | ], | |
39 | id: 'record', | |
40 | url: 'includes/db_recipes.php' | |
41 | }, | |
42 | dataAdapter = new $.jqx.dataAdapter(source); | |
471 | 43 | |
473 | 44 | // initialize jqxGrid |
45 | $('#jqxgrid').jqxGrid({ | |
46 | width: 1280, | |
47 | height: 630, | |
48 | source: dataAdapter, | |
49 | groupable: true, | |
50 | theme: theme, | |
51 | showstatusbar: true, | |
52 | renderstatusbar: function(statusbar) { | |
53 | var addButton, container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); | |
524
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
473
diff
changeset
|
54 | addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' + |
55a246085522
Code cleanup and manual compress.
Michiel Broek <mbroek@mbse.eu>
parents:
473
diff
changeset
|
55 | 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -3px;">Add</span></div>'); |
473 | 56 | container.append(addButton); |
57 | statusbar.append(container); | |
58 | addButton.jqxButton({ theme: theme, width: 100, height: 20 }); | |
59 | // add new recipe. | |
60 | addButton.click(function(event) { | |
61 | window.location.href = 'rec_new.php?return=rec_main.php'; | |
62 | }); | |
63 | }, | |
64 | filterable: true, | |
65 | filtermode: 'excel', | |
66 | columns: [ | |
67 | { text: 'Stijlgids', datafield: 'st_guide', width: 120 }, | |
68 | { text: 'Letter', datafield: 'st_letter', width: 60 }, | |
69 | { text: 'Stijl', datafield: 'st_name', width: 160 }, | |
70 | { text: 'Naam', datafield: 'name' }, | |
71 | { text: 'OG', datafield: 'est_og', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f3' }, | |
72 | { text: 'EBC', datafield: 'est_color', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, | |
73 | { text: 'IBU', datafield: 'est_ibu', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f0' }, | |
74 | { text: 'ABV', datafield: 'est_abv', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'p1' }, | |
75 | { text: '', datafield: 'Edit', width: 120, align: 'center', columntype: 'button', cellsrenderer: function() { | |
76 | return 'Wijzig'; | |
77 | }, buttonclick: function(row) { | |
78 | var datarecord = dataAdapter.records[row]; | |
79 | window.location.href = 'rec_edit.php?record=' + datarecord.record + '&return=rec_main.php'; | |
80 | } | |
81 | } | |
82 | ], | |
83 | groups: ['st_guide', 'st_letter'] | |
84 | }); | |
67
883e897aad40
Start building the workflow in the scripts.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
85 | }); |