www/js/prod_new.js

Tue, 05 Feb 2019 21:55:22 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Tue, 05 Feb 2019 21:55:22 +0100
changeset 243
b43214d218c0
parent 240
a85c1d4c4d12
child 254
3d61397fe9cd
permissions
-rw-r--r--

In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.

111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
170
71850ebe5a1c Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents: 167
diff changeset
2 * Copyright (C) 2018-2019
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of BMS
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * BrewCloud is distributed in the hope that it will be useful, but
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 $(document).ready(function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
26 var recipe_type = 2;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
27 var style_type = 0;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
28 var tun_material = 0;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
29
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
30 // Tab 1, base
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
31 $("#name").jqxTooltip({ content: 'De naam voor dit brouw project.' });
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 $("#name").jqxInput({ theme: theme, width: 640, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
33 $("#code").jqxTooltip({ content: 'Het unieke code nummer van dit brouw project.' });
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
34 $("#code").jqxInput({ theme: theme, width: 100, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
35 $("#notes").jqxTooltip({ content: 'De uitgebreide opmerkingen over dit project.' });
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
36 $("#notes").jqxInput({ theme: theme, width: 960, height: 200 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
37 $("#type").jqxDropDownList({
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
38 theme: theme,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
39 source: RecipeTypeAdapter,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
40 valueMember: 'id',
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
41 displayMember: 'nl',
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
42 width: 180,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
43 height: 23,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
44 autoDropDownHeight: true
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
45 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
46 $("#type").jqxDropDownList('selectItem', 2);
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
47 $("#type").on('select', function (event) {
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
48 if (event.args) {
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
49 recipe_type = event.args.index;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
50 }
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
51 });
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
52
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
53 // Tab 2, style
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
54 $("#st_name").jqxTooltip({ content: 'De bierstijl naam voor dit recept.'});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
55 $("#st_name").jqxInput({ theme: theme, width: 250, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
56 $("#st_category").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie.'});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
57 $("#st_category").jqxInput({ theme: theme, width: 250, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
58 $("#st_category_number").jqxTooltip({ content: 'De Amerikaanse bierstijl categorie sub nummer.'});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
59 $("#st_category_number").jqxInput({ theme: theme, width: 70, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
60 $("#st_letter").jqxTooltip({ content: 'De bierstijl letter voor dit recept.'});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
61 $("#st_letter").jqxInput({ theme: theme, width: 250, height: 23 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
62 $("#st_guide").jqxTooltip({ content: 'De bierstijl gids voor dit recept.'});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
63 $("#st_guide").jqxInput({ theme: theme, width: 250, height: 23 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
64 $("#st_notes").jqxInput({ theme: theme, width: 800, height: 100 });
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
65 $("#st_type").jqxTooltip({ content: 'Het bierstijl type.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
66 $("#st_type").jqxInput({ theme: theme, width: 250, height: 23 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
67 $("#st_og_min").jqxTooltip({ content: 'Het minimum begin SG voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
68 $("#st_og_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
69 $("#st_og_max").jqxTooltip({ content: 'Het maximum begin SG voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
70 $("#st_og_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
71 $("#st_fg_min").jqxTooltip({ content: 'Het minimum eind SG voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
72 $("#st_fg_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
73 $("#st_fg_max").jqxTooltip({ content: 'Het maximum eind SG voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
74 $("#st_fg_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 3, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
75 $("#st_ibu_min").jqxTooltip({ content: 'De minimum bitterheid voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
76 $("#st_ibu_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
77 $("#st_ibu_max").jqxTooltip({ content: 'De maximum bitterheid voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
78 $("#st_ibu_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
79 $("#st_color_min").jqxTooltip({ content: 'De minimum kleur voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
80 $("#st_color_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
81 $("#st_color_max").jqxTooltip({ content: 'De maximum kleur voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
82 $("#st_color_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 0, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
83 $("#st_carb_min").jqxTooltip({ content: 'Het minimum koolzuur volume voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
84 $("#st_carb_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
85 $("#st_carb_max").jqxTooltip({ content: 'Het maximum koolzuur volume voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
86 $("#st_carb_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
87 $("#st_abv_min").jqxTooltip({ content: 'Het minimum alcohol volume % voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
88 $("#st_abv_min").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
89 $("#st_abv_max").jqxTooltip({ content: 'Het maximum alcohol volume % voor deze bierstijl.'});
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
90 $("#st_abv_max").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 90, height: 23, decimalDigits: 1, readOnly: true });
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
91 $("#st_profile").jqxInput({ theme: theme, width: 800, height: 48 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
92 $("#st_ingredients").jqxInput({ theme: theme, width: 800, height: 23 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
93 $("#st_examples").jqxInput({ theme: theme, width: 800, height: 48 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
94 $("#styleSelect").jqxDropDownList({
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
95 placeHolder: "Kies bierstijl:",
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
96 theme: theme,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
97 source: styleslist,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
98 displayMember: "name",
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
99 width: 250,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
100 height: 27,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
101 dropDownWidth: 500,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
102 dropDownHeight: 500,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
103 renderer: function (index, label, value) {
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
104 var datarecord = styleslist.records[index];
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
105 return datarecord.style_guide + " " + datarecord.style_letter+ " " + datarecord.name;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
106 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
107 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
108 $("#styleSelect").on('select', function (event) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
109 if (event.args) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
110 var index = event.args.index;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
111 var datarecord = styleslist.records[index];
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
112 $("#st_name").val(datarecord.name);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
113 $("#st_category").val(datarecord.category);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
114 $("#st_category_number").val(datarecord.category_number);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
115 $("#st_letter").val(datarecord.style_letter);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
116 $("#st_guide").val(datarecord.style_guide);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
117 style_type = datarecord.type;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
118 $("#st_type").val(StyleTypeData[datarecord.type].nl);
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
119 $("#st_og_min").val(datarecord.og_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
120 $("#st_og_max").val(datarecord.og_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
121 $("#st_fg_min").val(datarecord.fg_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
122 $("#st_fg_max").val(datarecord.fg_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
123 $("#st_ibu_min").val(datarecord.ibu_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
124 $("#st_ibu_max").val(datarecord.ibu_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
125 $("#st_color_min").val(datarecord.color_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
126 $("#st_color_max").val(datarecord.color_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
127 $("#st_carb_min").val(datarecord.carb_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
128 $("#st_carb_max").val(datarecord.carb_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
129 $("#st_abv_min").val(datarecord.abv_min);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
130 $("#st_abv_max").val(datarecord.abv_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
131 $("#st_notes").val(datarecord.notes);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
132 $("#st_profile").val(datarecord.profile);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
133 $("#st_ingredients").val(datarecord.ingredients);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
134 $("#st_examples").val(datarecord.examples);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
135 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
136 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
137
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
138 // Tab 3, equipment
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
139 $("#eq_name").jqxTooltip({ content: 'De naam van deze brouw apparatuur.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
140 $("#eq_name").jqxInput({ theme: theme, width: 250, height: 23 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
141 $("#eq_calc_boil_volume").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled: true });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
142 $("#eq_boil_size").jqxTooltip({ content: 'Normaal kook volume in liters' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
143 $("#eq_boil_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
144 $("#eq_batch_size").jqxTooltip({ content: 'Berekende batch grootte in liters aan het eind van de kook.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
145 $("#eq_batch_size").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
146 $("#eq_tun_volume").jqxTooltip({ content: 'Maisch ketel volume.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
147 $("#eq_tun_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
148 $("#eq_tun_weight").jqxTooltip({ content: 'Maisch ketel gewicht.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
149 $("#eq_tun_weight").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
150 $("#eq_tun_height").jqxTooltip({ content: 'Maisch ketel hoogte.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
151 $("#eq_tun_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
152 $("#eq_tun_material").jqxTooltip({ content: 'Maisch ketel materiaal.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
153 $("#eq_tun_material").jqxInput({ theme: theme, width: 180, height: 23 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
154 $("#eq_tun_specific_heat").jqxTooltip({ content: 'Maisch ketel warmte geleiding.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
155 $("#eq_tun_specific_heat").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 3 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
156 $("#eq_top_up_water").jqxTooltip({ content: 'Extra water in het gistvat.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
157 $("#eq_top_up_water").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
158 $("#eq_trub_chiller_loss").jqxTooltip({ content: 'Standaard verlies bij het overbrengen naar het gistvat.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
159 $("#eq_trub_chiller_loss").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
160 $("#eq_evap_rate").jqxTooltip({ content: 'Verdamping in liters per uur.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
161 $("#eq_evap_rate").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 2, });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
162 $("#eq_boil_time").jqxTooltip({ content: 'Normale kooktijd in minuten.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
163 $("#eq_boil_time").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 0 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
164 $("#eq_top_up_kettle").jqxTooltip({ content: 'Extra water toevoegen tijdens de kook.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
165 $("#eq_top_up_kettle").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
166 $("#eq_hop_utilization").jqxTooltip({ content: '100% voor kleine installaties, hoger voor grote brouwerijen.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
167 $("#eq_hop_utilization").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 0 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
168 $("#eq_notes").jqxTooltip({ content: 'Opmerkingen over deze apparatuur.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
169 $("#eq_notes").jqxInput({ theme: theme, width: 960, height: 100 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
170 $("#eq_lauter_volume").jqxTooltip({ content: 'Filterkuip volume.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
171 $("#eq_lauter_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
172 $("#eq_lauter_height").jqxTooltip({ content: 'Filterkuip hoogte.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
173 $("#eq_lauter_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
174 $("#eq_lauter_deadspace").jqxTooltip({ content: 'Filterkuip verlies in liters.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
175 $("#eq_lauter_deadspace").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
176 $("#eq_kettle_volume").jqxTooltip({ content: 'Kook ketel volume in liters.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
177 $("#eq_kettle_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
178 $("#eq_kettle_height").jqxTooltip({ content: 'Kook ketel hoogte in cm.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
179 $("#eq_kettle_height").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
180 $("#eq_mash_volume").jqxTooltip({ content: 'Maisch water voor de eerste stap.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
181 $("#eq_mash_volume").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
182 $("#eq_mash_max").jqxTooltip({ content: 'De maximale moutstort in Kg.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
183 $("#eq_mash_max").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
184 $("#eq_efficiency").jqxTooltip({ content: 'Gemiddeld brouwzaal rendement.' });
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
185 $("#eq_efficiency").jqxNumberInput({ inputMode: 'simple', readOnly: true, theme: theme, width: 90, height: 23, decimalDigits: 1 });
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
186 $("#equipmentSelect").jqxDropDownList({
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
187 placeHolder: "Kies apparatuur:",
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
188 theme: theme,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
189 source: equipmentlist,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
190 displayMember: "name",
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
191 width: 250,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
192 height: 27,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
193 dropDownWidth: 300,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
194 renderer: function (index, label, value) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
195 var datarecord = equipmentlist.records[index];
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
196 return datarecord.batch_size + " liter " + datarecord.name;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
197 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
198 });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
199 $("#equipmentSelect").on('select', function (event) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
200 if (event.args) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
201 var index = event.args.index;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
202 var datarecord = equipmentlist.records[index];
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
203 $("#eq_name").val(datarecord.name);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
204 $("#eq_boil_size").val(datarecord.boil_size);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
205 $("#eq_batch_size").val(datarecord.batch_size);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
206 $("#eq_tun_volume").val(datarecord.tun_volume);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
207 $("#eq_tun_weight").val(datarecord.tun_weight);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
208 $("#eq_tun_specific_heat").val(datarecord.tun_specific_heat);
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
209 tun_material = datarecord.tun_material;
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
210 $("#eq_tun_material").val(MaterialData[datarecord.tun_material].nl);
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
211 $("#eq_tun_height").val(datarecord.tun_height);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
212 $("#eq_top_up_water").val(datarecord.top_up_water);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
213 $("#eq_trub_chiller_loss").val(datarecord.trub_chiller_loss);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
214 $("#eq_evap_rate").val(datarecord.evap_rate);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
215 $("#eq_boil_time").val(datarecord.boil_time);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
216 $("#eq_calc_boil_volume").val(datarecord.calc_boil_volume);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
217 $("#eq_top_up_kettle").val(datarecord.top_up_kettle);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
218 $("#eq_hop_utilization").val(datarecord.hop_utilization);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
219 $("#eq_notes").val(datarecord.notes);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
220 $("#eq_lauter_volume").val(datarecord.lauter_volume);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
221 $("#eq_lauter_height").val(datarecord.lauter_height);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
222 $("#eq_lauter_deadspace").val(datarecord.lauter_deadspace);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
223 $("#eq_kettle_volume").val(datarecord.kettle_volume);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
224 $("#eq_kettle_height").val(datarecord.kettle_height);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
225 $("#eq_mash_volume").val(datarecord.mash_volume);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
226 $("#eq_mash_max").val(datarecord.mash_max);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
227 $("#eq_efficiency").val(datarecord.efficiency);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
228 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
229 });
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 //Creating wizard module
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
232 var wizard = (function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
233
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
234 //Adding event listeners
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 var _addHandlers = function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 $('#name').on('change', function (event) { wizard.validate(true); });
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
237 $('#code').on('change', function (event) { wizard.validate(true); });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
238 $('#type').on('change', function (event) { wizard.validate(true); });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
239 $('#styleSelect').on('change', function (event) { wizard.validate(true); });
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
240 $('#equipmentSelect').on('change', function (event) { wizard.validate(true); });
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
241 $('#nextButtonCompleted').click(function () {
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
242 var d = new Date();
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
243 var m = d.getMonth() + 1;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
244 var b = d.getFullYear() + '-';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
245 if (m < 10)
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
246 b = b + '0';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
247 b = b + m + '-';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
248 if (d.getDate() < 10)
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
249 b = b + '0';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
250 b = b + d.getDate();
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
251 var newrow = {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
252 record: -1,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
253 name: $("#name").val(),
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
254 code: $("#code").val(),
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
255 birth: b,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
256 stage: 0,
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
257 notes: $("#notes").val(),
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
258 log_brew: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
259 log_fermentation: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
260 inventory_reduced: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
261 locked: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
262 eq_name: $("#eq_name").val(),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
263 eq_boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
264 eq_batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
265 eq_tun_volume: parseFloat($("#eq_tun_volume").jqxNumberInput('decimal')),
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
266 eq_tun_weight: parseFloat($("#eq_tun_weight").jqxNumberInput('decimal')),
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
267 eq_tun_specific_heat: parseFloat($("#eq_tun_specific_heat").jqxNumberInput('decimal')),
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
268 eq_tun_material: tun_material,
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 240
diff changeset
269 eq_tun_height: parseFloat($("#eq_tun_height").jqxNumberInput('decimal')) / 100,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
270 eq_top_up_water: parseFloat($("#eq_top_up_water").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
271 eq_trub_chiller_loss: parseFloat($("#eq_trub_chiller_loss").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
272 eq_evap_rate: parseFloat($("#eq_evap_rate").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
273 eq_boil_time: parseFloat($("#eq_boil_time").jqxNumberInput('decimal')),
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
274 eq_calc_boil_volume: $("#eq_calc_boil_volume").val(),
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
275 eq_top_up_kettle: parseFloat($("#eq_top_up_kettle").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
276 eq_hop_utilization: parseFloat($("#eq_hop_utilization").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
277 eq_notes: $("#eq_notes").val(),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
278 eq_lauter_volume: parseFloat($("#eq_lauter_volume").jqxNumberInput('decimal')),
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 240
diff changeset
279 eq_lauter_height: parseFloat($("#eq_lauter_height").jqxNumberInput('decimal')) / 100,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
280 eq_lauter_deadspace: parseFloat($("#eq_lauter_deadspace").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
281 eq_kettle_volume: parseFloat($("#eq_kettle_volume").jqxNumberInput('decimal')),
243
b43214d218c0 In stage Plan the brewdate data is saved, but not the brewdate itself. Added kettle_cm() function. Fixed serveral kettle heights when creating a new product. Print product prints a almost complete checklist in stages plan and brew.
Michiel Broek <mbroek@mbse.eu>
parents: 240
diff changeset
282 eq_kettle_height: parseFloat($("#eq_kettle_height").jqxNumberInput('decimal')) / 100,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
283 eq_mash_volume: parseFloat($("#eq_mash_volume").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
284 eq_mash_max: parseFloat($("#eq_mash_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
285 eq_efficiency: parseFloat($("#eq_efficiency").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
286 brew_date_start: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
287 brew_mash_ph: 0.0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
288 brew_mash_sg: 1.000,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
289 brew_sparge_temperature: 0,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
290 brew_sparge_volume: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
291 brew_sparge_ph: 0.0,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
292 brew_preboil_volume: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
293 brew_preboil_sg: 1.000,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
294 brew_preboil_ph: 0.0,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
295 brew_aboil_volume: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
296 brew_aboil_sg: 1.000,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
297 brew_aboil_ph: 0.0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
298 brew_aboil_efficiency: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
299 brew_cooling_method: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
300 brew_cooling_time: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
301 brew_cooling_to: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
302 brew_whirlpool9: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
303 brew_whirlpool7: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
304 brew_whirlpool6: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
305 brew_whirlpool2: 0,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
306 brew_fermenter_volume: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
307 brew_fermenter_extrawater: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
308 brew_aeration_time: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
309 brew_aeration_speed: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
310 brew_aeration_type: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
311 brew_fermenter_sg: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
312 brew_fermenter_ibu: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
313 brew_date_end: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
314 brew_log_available: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
315 og: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
316 fg: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
317 primary_start_temp: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
318 primary_max_temp: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
319 primary_end_temp: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
320 primary_end_sg: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
321 primary_end_date: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
322 secondary_temp: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
323 secondary_end_date: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
324 tertiary_temp: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
325 package_date: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
326 bottle_amount: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
327 bottle_carbonation: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
328 bottle_priming_sugar: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
329 bottle_priming_amount: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
330 bottle_carbonation_temp: 23,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
331 keg_amount: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
332 keg_carbonation: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
333 keg_priming_sugar: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
334 keg_priming_amount: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
335 keg_carbonation_temp: 23,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
336 keg_forced_carb: false,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
337 keg_pressure: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
338 taste_notes: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
339 taste_rate: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
340 taste_date: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
341 taste_color: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
342 taste_transparency: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
343 taste_head: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
344 taste_aroma: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
345 taste_taste: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
346 taste_mouthfeel: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
347 taste_aftertaste: '',
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
348 st_name: $('#st_name').val(),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
349 st_letter: $('#st_letter').val(),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
350 st_guide: $('#st_guide').val(),
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
351 st_type: style_type,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
352 st_category: $('#st_category').val(),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
353 st_category_number: parseFloat($("#st_category_number").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
354 st_og_min: parseFloat($("#st_og_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
355 st_og_max: parseFloat($("#st_og_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
356 st_fg_min: parseFloat($("#st_fg_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
357 st_fg_max: parseFloat($("#st_fg_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
358 st_ibu_min: parseFloat($("#st_ibu_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
359 st_ibu_max: parseFloat($("#st_ibu_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
360 st_color_min: parseFloat($("#st_color_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
361 st_color_max: parseFloat($("#st_color_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
362 st_carb_min: parseFloat($("#st_carb_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
363 st_carb_max: parseFloat($("#st_carb_max").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
364 st_abv_min: parseFloat($("#st_abv_min").jqxNumberInput('decimal')),
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
365 st_abv_max: parseFloat($("#st_abv_max").jqxNumberInput('decimal')),
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
366 type: recipe_type,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
367 batch_size: parseFloat($("#eq_batch_size").jqxNumberInput('decimal')),
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
368 boil_size: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')),
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
369 boil_time: parseFloat($("#eq_boil_time").jqxNumberInput('decimal')),
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
370 efficiency: parseFloat($("#eq_efficiency").jqxNumberInput('decimal')),
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
371 est_og: 0.000,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
372 est_fg: 0.000,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
373 est_color: 0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
374 est_abv: 0.0,
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
375 est_carb: 0.0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
376 color_method: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
377 est_ibu: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
378 ibu_method: 0,
166
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
379 mash_name: "",
635033a29c48 Fixed new recipes uuid generation and saving missing new fields.
Michiel Broek <mbroek@mbse.eu>
parents: 111
diff changeset
380 mash_ph: 5.4,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
381 sparge_temp: 85.0,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
382 sparge_volume: parseFloat($("#eq_boil_size").jqxNumberInput('decimal')) / 2,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
383 sparge_ph: 5.8,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
384 sparge_source: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
385 sparge_acid_type: 0,
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
386 sparge_acid_perc: 80,
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
387 sparge_acid_amount: 0,
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
388 calc_acid: true,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
389 w1_name: 'Tap water',
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
390 w1_amount: parseFloat($("#eq_mash_volume").jqxNumberInput('decimal')),
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
391 w1_calcium: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
392 w1_sulfate: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
393 w1_chloride: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
394 w1_sodium: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
395 w1_magnesium: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
396 w1_total_alkalinity: 0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
397 w1_ph: 7.0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
398 w1_cost: 0.0,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
399 wa_acid_name: 0, // Lactic acid
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
400 wa_acid_perc: 80,
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
401 wa_base_name: 0
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
402
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
403 };
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
404 var data = "insert=true&return=" + my_return + "&" + $.param(newrow);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
405 $.ajax({
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
406 dataType: 'json',
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
407 url: "includes/db_product.php",
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
408 cache: false,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
409 data: data,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
410 type: "POST",
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
411 success: function (data, status, xhr) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
412 // update command is executed.
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
413 window.location.href = my_return;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
414 },
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
415 error: function(jqXHR, textStatus, errorThrown) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
416 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
417 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
418 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
419 $('.nextButton').click(function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
420 wizard.validate(true);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
421 $('#jqxTabs').jqxTabs('next');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
422 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
423 $('.backButton').click(function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
424 wizard.validate(true);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
425 $('#jqxTabs').jqxTabs('previous');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
426 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
427 };
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
428
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
429 return {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
430 //Initializing the wizzard - creating all elements, adding event handlers and starting the validation
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
431 init: function () {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
432 $('#jqxTabs').jqxTabs({
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
433 theme: theme,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
434 height: 630,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
435 width: 1280,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
436 autoHeight: false,
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
437 position: 'top',
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
438 keyboardNavigation: false
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
439 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
440 $('#nextButtonBase').jqxButton({ theme: theme, width: 150 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
441 $('#nextButtonStyle').jqxButton({ theme: theme, width: 150});
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
442 $('#backButtonStyle').jqxButton({ theme: theme, width: 150});
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
443 $('#nextButtonEq').jqxButton({ theme: theme, width: 150});
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
444 $('#backButtonEq').jqxButton({ theme: theme, width: 150});
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
445 $('#nextButtonCompleted').jqxButton({ theme: theme, width: 150});
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
446 $('#backButtonCompleted').jqxButton({ theme: theme, width: 150});
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
447 _addHandlers();
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
448 this.validate();
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
449 this.showHint('Validation hints.');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
450 },
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
451
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
452 //Validating all wizard tabs
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
453 validate: function (notify) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
454 if (!this.firstTab(notify)) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
455 $('#jqxTabs').jqxTabs('disableAt', 1);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
456 $('#jqxTabs').jqxTabs('disableAt', 2);
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
457 $('#jqxTabs').jqxTabs('disableAt', 3);
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
458 return;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
459 } else {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
460 $('#jqxTabs').jqxTabs('enableAt', 1);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
461 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
462 if (!this.secondTab(notify)) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
463 $('#jqxTabs').jqxTabs('disableAt', 2);
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
464 $('#jqxTabs').jqxTabs('disableAt', 3);
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
465 return;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
466 } else {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
467 $('#jqxTabs').jqxTabs('enableAt', 2);
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
468 }
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
469 if (!this.thirdTab(notify)) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
470 $('#jqxTabs').jqxTabs('disableAt', 3);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
471 return;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
472 } else {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
473 $('#jqxTabs').jqxTabs('enableAt', 3);
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
474 }
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
475 },
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
476
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
477 //Displaying message to the user
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
478 showHint: function (message, selector) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
479 if (typeof selector === 'undefined') {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
480 selector = '.hint';
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
481 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
482 if (message === '') {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
483 message = 'Ok, je mag doorgaan.';
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
484 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
485 $(selector).html('<strong>' + message + '</strong>');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
486 },
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
487
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
488 //Validating the first tab
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
489 firstTab: function (notify) {
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
490 var name = $('#name').val(),
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
491 code = $('#code').val(),
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
492 message = '';
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
493 if (name.length < 3) {
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
494 message += 'Je moet een brouw project naam invullen. <br />';
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
495 }
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
496 if (code.length < 3) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
497 message += 'Je moet een brouw project code invullen. <br />';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
498 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
499 // Check if code already exists.
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
500 if (message !== '') {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
501 if (notify) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
502 this.showHint(message, '#hintBase');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
503 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
504 return false;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
505 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
506 this.showHint('Ok, je mag doorgaan.', '#hintBase');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
507 return true;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
508 },
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
509
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
510 //Validating the second tab
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
511 secondTab: function (notify) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
512 var stylesel = $('#styleSelect').val(),
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
513 message = '';
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
514 if (stylesel.length < 3) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
515 message += 'Je moet een bierstijl kiezen. <br />';
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
516 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
517 if (message !== '') {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
518 if (notify) {
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
519 this.showHint(message, '#hintStyle');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
520 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
521 return false;
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
522 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
523 this.showHint('Ok, je mag doorgaan.', '#hintStyle');
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
524 return true;
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
525 },
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
526
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
527 //Validating the third tab
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
528 thirdTab: function (notify) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
529 var equipsel = $('#equipmentSelect').val(),
240
a85c1d4c4d12 Depending on the product stage, more or less fields are saved in the database. Added begin of auto stage increase. Added missing inventory columns in the fermentables grid. New product wizzard now works with the indexed values. Product print works with indexed values and prepared for different print modules depending on the product stage.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
530 message = '';
167
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
531 if (equipsel.length < 3) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
532 message += 'Je moet een brouw installatie kiezen. <br />';
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
533 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
534 if (message !== '') {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
535 if (notify) {
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
536 this.showHint(message, '#hintEq');
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
537 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
538 return false;
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
539 }
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
540 this.showHint('Ok, je mag doorgaan.', '#hintEq');
dabcd35f8f92 Added new brew project wizzard. Moved equipment dropdown to global script. The project birth date is allways read-only, so it can never be changed.
Michiel Broek <mbroek@mbse.eu>
parents: 166
diff changeset
541 return true;
111
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
542 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
543 }
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
544 } ());
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
545
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
546 //Initializing the wizard
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
547 wizard.init();
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
548 });
8c4ba91adf58 Basic screens for brew products.
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
549

mercurial