Wed, 16 Oct 2019 21:05:03 +0200
Added dutch array strings to a global php script. Changed fermentables, hops, yeast and misc inventory scripts to use these strings between the database scripts and javascript scripts. This makes filtering on types strings useable. Added these changes to the product/recipe forum and print exports too.
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | /***************************************************************************** |
218
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
2 | * Copyright (C) 2019 |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | * |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * Michiel Broek <mbroek at mbse dot eu> |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * This file is part of BMS |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * This is free software; you can redistribute it and/or modify it |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * under the terms of the GNU General Public License as published by the |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * Free Software Foundation; either version 2, or (at your option) any |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * later version. |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * BrewCloud is distributed in the hope that it will be useful, but |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * General Public License for more details. |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | *****************************************************************************/ |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | $(document).ready(function () { |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
26 | var dataRecord = {}, |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
27 | // dropdownlist datasource from inventory_waters, must load sync |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
28 | waterUrl = "getwatersources.php", |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
29 | waterInvSource = { |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
30 | datatype: "json", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | datafields: [ |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | { name: 'name', type: 'string' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | ], |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
34 | url: waterUrl, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
35 | async: false |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
36 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
37 | waterlist = new $.jqx.dataAdapter(waterInvSource); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
38 | url = "includes/db_setup.php", |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
39 | |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
40 | // Prepare the data |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
41 | source = { |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
42 | datatype: "json", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
43 | cache: false, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
44 | datafields: [ |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
45 | { name: 'brewery_name', type: 'string' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
46 | { name: 'factor_mashhop', type: 'number' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
47 | { name: 'factor_fwh', type: 'number' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
48 | { name: 'factor_pellet', type: 'number' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
49 | { name: 'factor_plug', type: 'number' }, |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
270
diff
changeset
|
50 | { name: 'factor_wethop', type: 'number' }, |
446 | 51 | { name: 'factor_cryohop', type: 'number' }, |
218
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
52 | { name: 'ibu_method', type: 'int' }, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
53 | { name: 'color_method', type: 'int' }, |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
54 | { name: 'brix_correction', type: 'float' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
55 | { name: 'grain_absorbtion', type: 'float' }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
56 | { name: 'default_water', type: 'string' } |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
57 | ], |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
58 | url: url |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
59 | }, |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
60 | |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
61 | // Load data and select one record. |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
62 | dataAdapter = new $.jqx.dataAdapter(source, { |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
63 | loadComplete: function () { |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
64 | var records = dataAdapter.records; |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
65 | dataRecord = records[0]; |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
66 | $("#brewery_name").val(dataRecord.brewery_name); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
67 | $("#factor_mashhop").val(dataRecord.factor_mashhop); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
68 | $("#factor_fwh").val(dataRecord.factor_fwh); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
69 | $("#factor_pellet").val(dataRecord.factor_pellet); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
70 | $("#factor_plug").val(dataRecord.factor_plug); |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
270
diff
changeset
|
71 | $("#factor_wethop").val(dataRecord.factor_wethop); |
446 | 72 | $("#factor_cryohop").val(dataRecord.factor_cryohop); |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
73 | $("#color_method").val(dataRecord.color_method); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
74 | $("#ibu_method").val(dataRecord.ibu_method); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
75 | $("#brix_correction").val(dataRecord.brix_correction); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
76 | $("#grain_absorbtion").val(dataRecord.grain_absorbtion); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
77 | }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
78 | loadError: function (jqXHR, status, error) { |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
79 | }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
80 | }); |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
81 | |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
82 | dataAdapter.dataBind(); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
83 | |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
84 | // Tooltips |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
85 | $("#brewery_name").jqxTooltip({ content: 'De naam voor deze brouwerij.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
86 | $("#factor_mashhop").jqxTooltip({ content: 'Het efficientie percentage voor hop tijdens de maisch.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
87 | $("#factor_fwh").jqxTooltip({ content: 'Het efficientie percentage voor First Wort Hop.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
88 | $("#factor_pellet").jqxTooltip({ content: 'Het efficientie percentage bij gebruik van hop pellets.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
89 | $("#factor_plug").jqxTooltip({ content: 'Het efficientie percentage bij gebruik van hop plugs.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
90 | $("#factor_wethop").jqxTooltip({ content: 'Het efficientie percentage bij gebruik van nat geplukte hop.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
91 | $("#factor_cryohop").jqxTooltip({ content: 'Het efficientie percentage bij gebruik van Cryo Hop®.' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
92 | $("#brix_correction").jqxTooltip({ content: 'Omzettingsfactor voor Plato naar Brix' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
93 | $("#grain_absorbtion").jqxTooltip({ content: 'Absorbtie van water door graan (L/Kg)' }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
94 | |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
95 | // Editers |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
96 | $("#brewery_name").jqxInput({ theme: theme, width: 640, height: 23 }); |
270 | 97 | $("#factor_fwh").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); |
98 | $("#factor_mashhop").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -50, max: 50, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); | |
99 | $("#factor_pellet").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); | |
100 | $("#factor_plug").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); | |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
270
diff
changeset
|
101 | $("#factor_wethop").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -98, max: -20, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); |
446 | 102 | $("#factor_cryohop").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -20, max: 150, decimalDigits: 0, spinButtons: true, symbol: '%', symbolPosition: 'right' }); |
270 | 103 | $("#brix_correction").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1.00, max: 1.05, decimalDigits: 2, spinButtons: true }); |
104 | $("#grain_absorbtion").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0.5, max: 1.1, decimalDigits: 2, spinButtons: true }); | |
218
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
105 | $("#color_method").jqxDropDownList({ |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
106 | theme: theme, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
107 | source: ColorMethodAdapter, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
108 | valueMember: 'id', |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
109 | displayMember: 'nl', |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
110 | width: 180, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
111 | autoDropDownHeight: true |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
112 | }); |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
113 | $("#ibu_method").jqxDropDownList({ |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
114 | theme: theme, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
115 | source: IBUmethodAdapter, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
116 | valueMember: 'id', |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
117 | displayMember: 'nl', |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
118 | width: 180, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
119 | autoDropDownHeight: true |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
120 | }); |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
121 | $('#default_water').jqxDropDownList({ |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
122 | placeHolder: "Kies water:", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
123 | theme: theme, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
124 | source: waterlist, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
125 | valueMember: "name", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
126 | displayMember: "name", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
127 | width: 250, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
128 | dropDownHorizontalAlignment: 'right', |
218
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
129 | dropDownWidth: 300, |
38499e3859fa
Global setup switched to dropdown indexes.
Michiel Broek <mbroek@mbse.eu>
parents:
103
diff
changeset
|
130 | autoDropDownHeight: true |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
131 | }); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
132 | $('#default_water').jqxDropDownList( 'selectItem', dataRecord.default_water ); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
133 | |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
134 | $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
135 | $("#Save").click(function () { |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
136 | var data, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
137 | row = { |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
138 | record: 1, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
139 | brewery_name: $("#brewery_name").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
140 | factor_mashhop: $("#factor_mashhop").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
141 | factor_fwh: $("#factor_fwh").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
142 | factor_pellet: $("#factor_pellet").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
143 | factor_plug: $("#factor_plug").val(), |
289
4082c41f45e9
Added the use and calculation of wet hops. Assume 5.5 times more hops needed by weight.
Michiel Broek <mbroek@mbse.eu>
parents:
270
diff
changeset
|
144 | factor_wethop: $("#factor_wethop").val(), |
446 | 145 | factor_cryohop: $("#factor_cryohop").val(), |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
146 | color_method: $("#color_method").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
147 | ibu_method: $("#ibu_method").val(), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
148 | brix_correction: parseFloat($("#brix_correction").jqxNumberInput('decimal')), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
149 | grain_absorbtion: parseFloat($("#grain_absorbtion").jqxNumberInput('decimal')), |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
150 | default_water: $("#default_water").val() |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
151 | }; |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
446
diff
changeset
|
152 | data = "update=true&" + $.param(row); |
99
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
153 | $.ajax({ |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
154 | dataType: 'json', |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
155 | url: url, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
156 | cache: false, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
157 | data: data, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
158 | type: "POST", |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
159 | success: function (data, status, xhr) { |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
160 | // update command is executed. |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
161 | //window.location.href = my_return; |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
162 | }, |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
163 | error: function(jqXHR, textStatus, errorThrown) { |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
164 | } |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
165 | }); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
166 | }); |
f433193f7bb6
Removed default water setting from the inventory_waters table. Added global setup record with default settings and the default water selection. Added a setup screen.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
167 | }); |