www/js/global.js

Sun, 24 Feb 2019 17:23:52 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 24 Feb 2019 17:23:52 +0100
changeset 286
124af734af68
parent 282
f765249d57d7
child 289
4082c41f45e9
permissions
-rw-r--r--

Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.

13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
2 * Copyright (C) 2014-2019
13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of BrewCloud
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * BrewCloud is distributed in the hope that it will be useful, but
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
24 // dropdownlists arrays
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
25
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
26 var StageData = [
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
27 { id: 0, en: "Plan", nl: "Plan" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
28 { id: 1, en: "Wait", nl: "Wacht" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
29 { id: 2, en: "Brew", nl: "Brouwen" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
30 { id: 3, en: "Primary", nl: "Hoofdgisting" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
31 { id: 4, en: "Secondary", nl: "Nagisting" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
32 { id: 5, en: "Tertiary", nl: "Lagering" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
33 { id: 6, en: "Package", nl: "Afvullen" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
34 { id: 7, en: "Carbonation", nl: "Hergisten" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
35 { id: 8, en: "Mature", nl: "Rijpen" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
36 { id: 9, en: "Taste", nl: "Proeven" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
37 { id: 10, en: "Ready", nl: "Gereed" },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
38 { id: 11, en: "Closed", nl: "Afgesloten" }
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
39 ];
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
40 var StageSource = {
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
41 localdata: StageData,
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
42 datatype: "array",
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
43 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
44 };
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
45 var StageAdapter = new $.jqx.dataAdapter(StageSource);
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
46
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
47 var MaterialData = [
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
48 { id: 0, en: "Stainless Steel", nl: "RVS", sh: 0.11 },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
49 { id: 1, en: "Aluminium", nl: "Aluminium", sh: 0.22 },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
50 { id: 2, en: "Plastics", nl: "Kunststof", sh: 0.46 },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
51 { id: 3, en: "Coper", nl: "Koper", sh: 0.092 }
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
52 ];
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
53 var MaterialSource = {
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
54 localdata: MaterialData,
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
55 datatype: "array",
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
56 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }, { name: 'sh' }]
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
57 };
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
58 var MaterialAdapter = new $.jqx.dataAdapter(MaterialSource);
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
59
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
60 var FermentableTypeData = [
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
61 { id: 0, en: 'Grain', nl: 'mout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
62 { id: 1, en: 'Sugar', nl: 'suiker' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
63 { id: 2, en: 'Extract', nl: 'vloeibaar extract' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
64 { id: 3, en: 'Dry extract', nl: 'droog extract' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
65 { id: 4, en: 'Adjunct', nl: 'ongemout graan' }
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
66 ];
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
67 var FermentableTypeSource = {
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
68 localdata: FermentableTypeData,
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
69 datatype: "array",
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
70 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
71 };
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
72 var FermentableTypeAdapter = new $.jqx.dataAdapter(FermentableTypeSource);
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
73
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
74 var GrainTypeData = [
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
75 { id: 0, en: 'Base', nl: 'basismout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
76 { id: 1, en: 'Roast', nl: 'geroosterde mout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
77 { id: 2, en: 'Crystal', nl: 'cara- of crystalmout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
78 { id: 3, en: 'Kilned', nl: 'geëeste mout'},
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
79 { id: 4, en: 'Sour malt', nl: 'zuurmout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
80 { id: 5, en: 'Special', nl: 'speciale mout' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
81 { id: 6, en: 'No malt', nl: 'n.v.t.' }
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
82 ];
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
83 var GrainTypeSource = {
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
84 localdata: GrainTypeData,
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
85 datatype: "array",
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
86 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
87 };
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
88 var GrainTypeAdapter = new $.jqx.dataAdapter(GrainTypeSource);
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
89
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
90 var AddedData = [
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
91 { id: 0, en: 'Mash', nl: 'maischen' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
92 { id: 1, en: 'Boil', nl: 'koken' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
93 { id: 2, en: 'Fermentation', nl: 'vergisten' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
94 { id: 3, en: 'Lagering', nl: 'nagisten/lageren' },
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
95 { id: 4, en: 'Bottle', nl: 'bottelen' }
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
96 ];
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
97 var AddedSource = {
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
98 localdata: AddedData,
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
99 datatype: "array",
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
100 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
101 };
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
102 var AddedAdapter = new $.jqx.dataAdapter(AddedSource);
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
103
196
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
104 var HopTypeData = [
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
105 { id: 0, en: 'Bittering', nl: 'bitterhop' },
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
106 { id: 1, en: 'Aroma', nl: 'aromahop' },
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
107 { id: 2, en: 'Both', nl: 'beide' }
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
108 ];
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
109 var HopTypeSource = {
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
110 localdata: HopTypeData,
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
111 datatype: "array",
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
112 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
113 };
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
114 var HopTypeAdapter = new $.jqx.dataAdapter(HopTypeSource);
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
115
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
116 var HopFormData = [
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
117 { id: 0, en: 'Pellet', nl: 'pellets' },
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
118 { id: 1, en: 'Plug', nl: 'plugs' },
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
119 { id: 2, en: 'Leaf', nl: 'bellen' }
282
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
120 // { id: 3, en: 'Leaf wet', nl: 'bellen nat' }
196
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
121 ];
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
122 var HopFormSource = {
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
123 localdata: HopFormData,
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
124 datatype: "array",
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
125 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
126 };
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
127 var HopFormAdapter = new $.jqx.dataAdapter(HopFormSource);
531d5458782f Hops database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Removed the useat field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 195
diff changeset
128
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
129 var HopUseData = [
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
130 { id: 0, en: 'Mash', nl: 'maischhop' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
131 { id: 1, en: 'First wort', nl: 'first wort hop' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
132 { id: 2, en: 'Boil', nl: 'koken' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
133 { id: 3, en: 'Aroma', nl: 'vlamuit' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
134 { id: 4, en: 'Whirlpool', nl: 'whirlpool' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
135 { id: 5, en: 'Dry hop', nl: 'koudhop' }
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
136 ];
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
137 var HopUseSource = {
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
138 localdata: HopUseData,
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
139 datatype: "array",
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
140 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
141 };
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
142 var HopUseAdapter = new $.jqx.dataAdapter(HopUseSource);
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
143
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
144 var YeastTypeData = [
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
145 { id: 0, en: 'Lager', nl: 'ondergist' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
146 { id: 1, en: 'Ale', nl: 'bovengist' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
147 { id: 2, en: 'Wheat', nl: 'weizengist' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
148 { id: 3, en: 'Wine', nl: 'wijngist' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
149 { id: 4, en: 'Champagne', nl: 'champagnegist' }
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
150 ];
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
151 var YeastTypeSource = {
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
152 localdata: YeastTypeData,
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
153 datatype: "array",
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
154 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
155 };
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
156 var YeastTypeAdapter = new $.jqx.dataAdapter(YeastTypeSource);
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
157
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
158 var YeastFormData = [
200
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
159 { id: 0, en: 'Liquid', nl: 'vloeibaar', cells: 100000000000 },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
160 { id: 1, en: 'Dry', nl: 'droog', cells: 15000000000 },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
161 { id: 2, en: 'Slant', nl: 'schuine buis', cells: 1700000000 },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
162 { id: 3, en: 'Culture', nl: 'slurry', cells: 1700000000 },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
163 { id: 4, en: 'Frozen', nl: 'ingevroren', cells: 1700000000 },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
164 { id: 5, en: 'Bottle', nl: 'depot', cells: 1700000000 }
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
165 ];
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
166 var YeastFormSource = {
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
167 localdata: YeastFormData,
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
168 datatype: "array",
207
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
169 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }, { name: 'cells' }]
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
170 };
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
171 var YeastFormAdapter = new $.jqx.dataAdapter(YeastFormSource);
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
172
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
173 var YeastUseData = [
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
174 { id: 0, en: 'Primary', nl: 'Hoofdgisting' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
175 { id: 1, en: 'Secondary', nl: 'Nagisting' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
176 { id: 2, en: 'Tertiary', nl: 'Lagering' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
177 { id: 3, en: 'Bottle', nl: 'Bottelen' }
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
178 ];
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
179 var YeastUseSource = {
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
180 localdata: YeastUseData,
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
181 datatype: "array",
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
182 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }, { name: 'cells' }]
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
183 };
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
184 var YeastUseAdapter = new $.jqx.dataAdapter(YeastUseSource);
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
185
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
186 var FlocculationData = [
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
187 { id: 0, en: 'Low', nl: 'laag' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
188 { id: 1, en: 'Medium', nl: 'medium' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
189 { id: 2, en: 'High', nl: 'hoog' },
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
190 { id: 3, en: 'Very high', nl: 'zeer hoog' }
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
191 ];
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
192 var FlocculationSource = {
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
193 localdata: FlocculationData,
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
194 datatype: "array",
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
195 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
196 };
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
197 var FlocculationAdapter = new $.jqx.dataAdapter(FlocculationSource);
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
199 var StarterTypeData = [
278
dc22dd5d77fd Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents: 258
diff changeset
200 { id: 0, en: 'Stirred', nl: 'Geroerd' },
dc22dd5d77fd Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents: 258
diff changeset
201 { id: 1, en: 'Shaken', nl: 'Geschud' },
dc22dd5d77fd Initial design of a yeast starter calculator based on the Braukaiser model. Changed the yeast inventory prompts to the correct Dutch amounts. The pitchrate calculator makes a difference between light and heavy beers, turning point is a SG 1.060. Some code is from Homebrew Dad's calculator.
Michiel Broek <mbroek@mbse.eu>
parents: 258
diff changeset
202 { id: 2, en: 'Simple', nl: 'Simpel' }
198
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
203 ];
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
204 var StarterTypeSource = {
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
205 localdata: StarterTypeData,
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
206 datatype: "array",
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
207 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
208 };
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
209 var StarterTypeAdapter = new $.jqx.dataAdapter(StarterTypeSource);
f0ec83e1e01f Switches yeasts inventory to indexed names and translations. Database save is using POST instead of GET. Redesigned the web page. Added total cost display which updates on inventory changes.
Michiel Broek <mbroek@mbse.eu>
parents: 196
diff changeset
210
200
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
211 var MiscTypeData = [
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
212 { id: 0, en: 'Spice', nl: 'specerij' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
213 { id: 1, en: 'Herb', nl: 'kruid' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
214 { id: 2, en: 'Flavor', nl: 'smaakstof' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
215 { id: 3, en: 'Fining', nl: 'klaringsmiddel' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
216 { id: 4, en: 'Water agent', nl: 'brouwzout' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
217 { id: 5, en: 'Yeast nutrient', nl: 'gistvoeding' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
218 { id: 6, en: 'Other', nl: 'anders' }
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
219 ];
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
220 var MiscTypeSource = {
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
221 localdata: MiscTypeData,
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
222 datatype: "array",
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
223 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
224 };
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
225 var MiscTypeAdapter = new $.jqx.dataAdapter(MiscTypeSource);
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
226
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
227 var MiscUseData = [
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
228 { id: 0, en: 'Starter', nl: 'starter' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
229 { id: 1, en: 'Mash', nl: 'maischen' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
230 { id: 2, en: 'Boil', nl: 'koken' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
231 { id: 3, en: 'Primary', nl: 'hoofdvergisting' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
232 { id: 4, en: 'Secondary', nl: 'nagisting/lagering' },
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
233 { id: 5, en: 'Bottling', nl: 'bottelen' }
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
234 ];
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
235 var MiscUseSource = {
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
236 localdata: MiscUseData,
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
237 datatype: "array",
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
238 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
239 };
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
240 var MiscUseAdapter = new $.jqx.dataAdapter(MiscUseSource);
7b2f11652d67 Miscs from bool to ints. Miscs database uses POST instead of GET. Dropdowns are unsing indexes. Dynamic edit screen adjust for weight and liter. Edit screen redesigned. Friendly show duration of ingredients.
Michiel Broek <mbroek@mbse.eu>
parents: 198
diff changeset
241
207
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
242 var StyleTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
243 { id: 0, en: 'Lager', nl: 'Ondergistend bier' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
244 { id: 1, en: 'Ale', nl: 'Bovengistend bier' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
245 { id: 2, en: 'Mead', nl: 'Mede' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
246 { id: 3, en: 'Wheat', nl: 'Tarwebier' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
247 { id: 4, en: 'Mixed', nl: 'Gemengd' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
248 { id: 5, en: 'Cider', nl: 'Cider' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
249 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
250 var StyleTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
251 localdata: StyleTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
252 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
253 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
254 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
255 var StyleTypeAdapter = new $.jqx.dataAdapter(StyleTypeSource);
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
256
207
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
257 var MashStepTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
258 { id: 0, en: 'Infusion', nl: 'Infusie' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
259 { id: 1, en: 'Temperature', nl: 'Directe verwarming' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
260 { id: 2, en: 'Decoction', nl: 'Decoctie' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
261 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
262 var MashStepTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
263 localdata: MashStepTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
264 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
265 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
266 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
267 var MashStepTypeAdapter = new $.jqx.dataAdapter(MashStepTypeSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
268
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
269 var RecipeTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
270 { id: 0, en: 'Extract', nl: 'Extract' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
271 { id: 1, en: 'Partial Mash', nl: 'Deelmaisch' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
272 { id: 2, en: 'All Grain', nl: 'Mout' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
273 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
274 var RecipeTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
275 localdata: RecipeTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
276 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
277 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
278 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
279 var RecipeTypeAdapter = new $.jqx.dataAdapter(RecipeTypeSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
280
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
281 var IBUmethodData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
282 { id: 0, en: 'Tinseth', nl: 'Tinseth' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
283 { id: 1, en: 'Rager', nl: 'Rager' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
284 { id: 2, en: 'Daniels', nl: 'Daniels' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
285 // { id: 3, en: 'Garetz', nl: 'Garetz' }, // Not yet supported.
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
286 // { id: 4, en: 'Mosher', nl: 'Mosher' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
287 // { id: 5, en: 'Noonan', nl: 'Noonan' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
288 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
289 var IBUmethodSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
290 localdata: IBUmethodData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
291 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
292 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
293 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
294 var IBUmethodAdapter = new $.jqx.dataAdapter(IBUmethodSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
295
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
296 var ColorMethodData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
297 { id: 0, en: 'Morey', nl: 'Morey' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
298 { id: 1, en: 'Mosher', nl: 'Mosher' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
299 { id: 2, en: 'Daniels', nl: 'Daniels' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
300 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
301 var ColorMethodSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
302 localdata: ColorMethodData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
303 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
304 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
305 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
306 var ColorMethodAdapter = new $.jqx.dataAdapter(ColorMethodSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
307
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
308 var CoolingTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
309 { id: 0, en: '-', nl: '-' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
310 { id: 1, en: 'Emersion chiller', nl: 'Dompelkoeler' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
311 { id: 2, en: 'Counterflow chiller', nl: 'Tegenstroomkoeler' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
312 { id: 3, en: 'Au bain marie', nl: 'Au bain marie' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
313 { id: 4, en: 'Natural', nl: 'Laten afkoelen' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
314 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
315 var CoolingTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
316 localdata: CoolingTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
317 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
318 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
319 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
320 var CoolingTypeAdapter = new $.jqx.dataAdapter(CoolingTypeSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
321
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
322 var AerationTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
323 { id: 0, en: 'None', nl: 'Geen' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
324 { id: 1, en: 'Air', nl: 'Lucht' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
325 { id: 2, en: 'Oxygen', nl: 'Zuurstof' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
326 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
327 var AerationTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
328 localdata: AerationTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
329 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
330 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
331 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
332 var AerationTypeAdapter = new $.jqx.dataAdapter(AerationTypeSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
333
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
334 var PrimingSugarData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
335 { id: 0, en: 'Saccharose', nl: 'Kristalsuiker', factor: 1 },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
336 { id: 1, en: 'Glucose or dextrose', nl: 'Glucose/dextrose', factor: 1.16 },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
337 { id: 2, en: 'Honey', nl: 'Honing', factor: 1.28 },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
338 { id: 3, en: 'DME', nl: 'Moutextract', factor: 1.74 },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
339 { id: 4, en: 'Molassis', nl: 'Melasse', factor: 3.83 }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
340 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
341 var PrimingSugarSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
342 localdata: PrimingSugarData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
343 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
344 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }, { name: 'factor' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
345 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
346 var PrimingSugarAdapter = new $.jqx.dataAdapter(PrimingSugarSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
347
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
348 var AcidTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
349 { id: 0, en: 'Lactic', nl: 'Melkzuur' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
350 { id: 1, en: 'Hydrochloric', nl: 'Zoutzuur' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
351 { id: 2, en: 'Phosphoric', nl: 'Fosforzuur' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
352 { id: 3, en: 'Sulfuric', nl: 'Zwavelzuur' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
353 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
354 var AcidTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
355 localdata: AcidTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
356 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
357 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
358 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
359 var AcidTypeAdapter = new $.jqx.dataAdapter(AcidTypeSource);
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
360
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
361 var BaseTypeData = [
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
362 { id: 0, en: 'Sodiumbicarbonate', nl: 'NaHCO3' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
363 { id: 1, en: 'Sodiumcarbonate', nl: 'Na2CO3' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
364 { id: 2, en: 'Calciumcarbonate', nl: 'CaCO3' },
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
365 { id: 3, en: 'Calciumhydroxide', nl: 'Ca(OH)2' }
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
366 ];
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
367 var BaseTypeSource = {
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
368 localdata: BaseTypeData,
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
369 datatype: "array",
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
370 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
371 };
f87ff15be531 Finished data arrays for dropdown menus.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
372 var BaseTypeAdapter = new $.jqx.dataAdapter(BaseTypeSource);
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
373
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
374 var SpargeSourceData = [
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
375 { id: 0, en: 'Source 1', nl: 'Bron 1' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
376 { id: 1, en: 'Source 2', nl: 'Bron 2' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
377 { id: 2, en: 'Mixed', nl: 'Gemengd' }
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
378 ];
230
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
379 var SpargeSourceSource = {
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
380 localdata: SpargeSourceData,
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
381 datatype: "array",
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
382 datafields: [{ name: 'id' }, { name: 'en' }, { name: 'nl' }]
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
383 };
8edca0488e65 Finished the water treatment in the recipes editor. It seems that the recipes editor is ready.
Michiel Broek <mbroek@mbse.eu>
parents: 228
diff changeset
384 var SpargeSourceAdapter = new $.jqx.dataAdapter(SpargeSourceSource);
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
385
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
386
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
387 // options for editors
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
388
256
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
389 var Show1wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 1, readOnly: true };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
390 var Show2wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 2, readOnly: true };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
391 var Show3wat = { inputMode: 'simple', theme: theme, width: 74, height: 23, decimalDigits: 3, readOnly: true };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
392 var Show0dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 0 };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
393 var Show1dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 1 };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
394 var Show2dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 2 };
4767a790d1f6 Progress bars have color ranges. More var definitions for input fields.
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
395 var Show3dec = { inputMode: 'simple', theme: theme, width: 90, height: 23, readOnly: true, decimalDigits: 3 };
245
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
396 var SGopts = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0.990, max: 1.199, decimalDigits: 3, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
397 var Spin1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
398 var Spin2dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
399 var Spin3dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 3, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
400 var SpinpH = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1, max: 14, decimalDigits: 1, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
401 var Spin2pH = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 1, max: 14, decimalDigits: 2, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
402 var YeastT = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 40, decimalDigits: 1, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
403 var PosInt = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 0, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
404 var Perc1dec = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 1, spinButtons: true };
3649c3d31d15 Fixed the mousewheel, spinner buttons to use the full min/max ranges. The 1.002 SG block to be precise.
Michiel Broek <mbroek@mbse.eu>
parents: 241
diff changeset
405 var Perc0 = { inputMode: 'simple', theme: theme, width: 110, height: 23, min: 0, max: 100, decimalDigits: 0, spinButtons: true };
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
406 var Dateopts = {
209
dc30801e6961 Import set tun_material from the specifix heat value. Equipment database uses POST instead of GET. Equipment editor screen in style with other inventory screens. In stock print now uses the type indexes to translate to text. Also show the correct unit and values of the yeast.
Michiel Broek <mbroek@mbse.eu>
parents: 207
diff changeset
407 theme: theme, width: 150, height: 23, allowNullDate: true, todayString: 'Vandaag', clearString: 'Wissen', showFooter: true,
dc30801e6961 Import set tun_material from the specifix heat value. Equipment database uses POST instead of GET. Equipment editor screen in style with other inventory screens. In stock print now uses the type indexes to translate to text. Also show the correct unit and values of the yeast.
Michiel Broek <mbroek@mbse.eu>
parents: 207
diff changeset
408 formatString: 'yyyy-MM-dd', enableBrowserBoundsDetection: true
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
409 };
241
e95d2886f49f Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents: 232
diff changeset
410 var DateTimeopts = {
e95d2886f49f Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents: 232
diff changeset
411 theme: theme, width: 230, height: 23, allowNullDate: true, todayString: 'Vandaag', clearString: 'Wissen', showFooter: true,
e95d2886f49f Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents: 232
diff changeset
412 formatString: 'yyyy-MM-dd HH:mm:ss', enableBrowserBoundsDetection: true, showTimeButton: true
e95d2886f49f Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents: 232
diff changeset
413 };
195
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
414
2ac491548d8d Fermentables database bool to int types. Dropdown lists are using tables with indexes. Dropdown lists display in Dutch. Save and delete in the database now use POST instead of GET. Added the added and dissolved_protein fields. Removed the ibu_gal_per_lb field. Redesigned the web page. Code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents: 186
diff changeset
415
121
875aeb365e1c Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
416 var sugardensity = 1.611; //kg/l in solution
875aeb365e1c Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
417
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
418 // Styles dropdown list
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
419 var stylesUrl = "includes/db_profile_styles.php";
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
420 var stylesSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
421 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
422 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
423 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
424 { name: 'name', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
425 { name: 'category', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
426 { name: 'category_number', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
427 { name: 'style_letter', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
428 { name: 'style_guide', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
429 { name: 'type', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
430 { name: 'og_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
431 { name: 'og_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
432 { name: 'fg_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
433 { name: 'fg_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
434 { name: 'ibu_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
435 { name: 'ibu_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
436 { name: 'color_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
437 { name: 'color_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
438 { name: 'carb_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
439 { name: 'carb_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
440 { name: 'abv_min', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
441 { name: 'abv_max', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
442 { name: 'notes', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
443 { name: 'profile', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
444 { name: 'ingredients', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
445 { name: 'examples', type: 'string' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
446 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
447 url: stylesUrl
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
448 };
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
449 var styleslist = new $.jqx.dataAdapter(stylesSource);
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
450
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: 164
diff changeset
451 // Equipemnt dropdown list
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: 164
diff changeset
452 var equipmentUrl = "includes/db_inventory_equipments.php";
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: 164
diff changeset
453 var equipmentSource = {
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: 164
diff changeset
454 datatype: "json",
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: 164
diff changeset
455 datafields: [
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: 164
diff changeset
456 { name: 'name', type: 'string' },
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: 164
diff changeset
457 { name: 'boil_size', type: 'float' },
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: 164
diff changeset
458 { name: 'batch_size', type: 'float' },
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: 164
diff changeset
459 { name: 'tun_volume', type: 'float' },
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: 164
diff changeset
460 { name: 'tun_weight', type: 'float' },
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: 164
diff changeset
461 { name: 'tun_specific_heat', type: 'float' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
462 { name: 'tun_material', type: 'int' },
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: 164
diff changeset
463 { name: 'tun_height', type: 'float' },
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: 164
diff changeset
464 { name: 'top_up_water', type: 'float' },
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: 164
diff changeset
465 { name: 'trub_chiller_loss', type: 'float' },
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: 164
diff changeset
466 { name: 'evap_rate', type: 'float' },
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: 164
diff changeset
467 { name: 'boil_time', type: 'float' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
468 { name: 'calc_boil_volume', type: 'int' },
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: 164
diff changeset
469 { name: 'top_up_kettle', type: 'float' },
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: 164
diff changeset
470 { name: 'hop_utilization', type: 'float' },
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: 164
diff changeset
471 { name: 'notes', type: 'string' },
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: 164
diff changeset
472 { name: 'lauter_volume', type: 'float' },
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: 164
diff changeset
473 { name: 'lauter_height', type: 'float' },
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: 164
diff changeset
474 { name: 'lauter_deadspace', type: 'float' },
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: 164
diff changeset
475 { name: 'kettle_volume', type: 'float' },
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: 164
diff changeset
476 { name: 'kettle_height', type: 'float' },
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: 164
diff changeset
477 { name: 'mash_volume', type: 'float' },
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: 164
diff changeset
478 { name: 'mash_max', type: 'float' },
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: 164
diff changeset
479 { name: 'efficiency', type: 'float' }
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: 164
diff changeset
480 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
481 url: equipmentUrl
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: 164
diff changeset
482 };
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: 164
diff changeset
483 var equipmentlist = new $.jqx.dataAdapter(equipmentSource);
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: 164
diff changeset
484
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
485 // dropdownlist datasource from inventory_fermentables
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
486 var fermentableInvSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
487 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
488 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
489 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
490 { name: 'name', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
491 { name: 'type', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
492 { name: 'yield', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
493 { name: 'color', type: 'float' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
494 { name: 'add_after_boil', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
495 { name: 'origin', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
496 { name: 'supplier', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
497 { name: 'coarse_fine_diff', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
498 { name: 'moisture', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
499 { name: 'diastatic_power', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
500 { name: 'protein', type: 'float' },
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
501 { name: 'dissolved_protein', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
502 { name: 'max_in_batch', type: 'float' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
503 { name: 'recommend_mash', type: 'int' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
504 { name: 'graintype', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
505 { name: 'di_ph', type: 'float' },
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
506 { name: 'acid_to_ph_57', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
507 { name: 'inventory', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
508 { name: 'cost', type: 'float' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
509 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
510 url: "getfermentablesources.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
511 };
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
512 var fermentableinstock = false;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
513 var fermentablelist = new $.jqx.dataAdapter(fermentableInvSource, {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
514 beforeLoadComplete: function (records) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
515 var data = new Array();
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
516 for (var i = 0; i < records.length; i++) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
517 var row = records[i];
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
518 if (row.inventory || ! fermentableinstock)
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
519 data.push(row);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
520 }
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
521 return data;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
522 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
523 loadError: function(jqXHR, status, error) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
524 $('#err').text(status + ' ' + error);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
525 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
526 });
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
527
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
528 // dropdownlist datasource from inventory_hops
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
529 var hopInvSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
530 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
531 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
532 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
533 { name: 'name', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
534 { name: 'origin', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
535 { name: 'type', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
536 { name: 'alpha', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
537 { name: 'beta', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
538 { name: 'humulene', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
539 { name: 'caryophyllene', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
540 { name: 'cohumulone', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
541 { name: 'myrcene', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
542 { name: 'hsi', type: 'float' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
543 { name: 'useat', type: 'int' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
544 { name: 'form', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
545 { name: 'total_oil', type: 'float' },
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
546 { name: 'inventory', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
547 { name: 'cost', type: 'float' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
548 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
549 url: "gethopsources.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
550 };
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
551 var hopinstock = false;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
552 var hoplist = new $.jqx.dataAdapter(hopInvSource, {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
553 beforeLoadComplete: function (records) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
554 var data = new Array();
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
555 for (var i = 0; i < records.length; i++) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
556 var row = records[i];
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
557 if (row.inventory || ! hopinstock)
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
558 data.push(row);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
559 }
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
560 return data;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
561 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
562 loadError: function(jqXHR, status, error) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
563 $('#err').text(status + ' ' + error);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
564 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
565 });
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
566
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
567 // dropdownlist datasource from inventory_miscs
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
568 var miscInvSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
569 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
570 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
571 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
572 { name: 'name', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
573 { name: 'type', type: 'int' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
574 { name: 'use_use', type: 'int' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
575 { name: 'amount_is_weight', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
576 { name: 'time', type: 'float' },
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
577 { name: 'inventory', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
578 { name: 'cost', type: 'float' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
579 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
580 url: "getmiscsources.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
581 };
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
582 var miscinstock = false;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
583 var misclist = new $.jqx.dataAdapter(miscInvSource, {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
584 beforeLoadComplete: function (records) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
585 var data = new Array();
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
586 for (var i = 0; i < records.length; i++) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
587 var row = records[i];
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
588 if (row.inventory || ! miscinstock)
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
589 data.push(row);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
590 }
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
591 return data;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
592 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
593 loadError: function(jqXHR, status, error) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
594 $('#err').text(status + ' ' + error);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
595 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
596 });
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
597
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
598 // dropdownlist datasource from inventory_yeasts
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
599 var yeastInvSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
600 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
601 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
602 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
603 { name: 'name', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
604 { name: 'type', type: 'int' },
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
605 { name: 'form', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
606 { name: 'laboratory', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
607 { name: 'product_id', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
608 { name: 'min_temperature', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
609 { name: 'max_temperature', type: 'float' },
232
daf2d9d6fa18 When adding yeast the flocculation and cells fields were not added. Possible fix for double water agents in the miscs grid. Better efforts to set the initial water infuse amount. The new recipe wizzard now uses indexed fields. In recipe print fixed the yeast amount and cost.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
610 { name: 'flocculation', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
611 { name: 'attenuation', type: 'float' },
232
daf2d9d6fa18 When adding yeast the flocculation and cells fields were not added. Possible fix for double water agents in the miscs grid. Better efforts to set the initial water infuse amount. The new recipe wizzard now uses indexed fields. In recipe print fixed the yeast amount and cost.
Michiel Broek <mbroek@mbse.eu>
parents: 230
diff changeset
612 { name: 'cells', type: 'float' },
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
613 { name: 'inventory', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
614 { name: 'cost', type: 'float' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
615 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
616 url: "getyeastsources.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
617 };
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
618 var yeastinstock = false;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
619 var yeastlist = new $.jqx.dataAdapter(yeastInvSource, {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
620 beforeLoadComplete: function (records) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
621 var data = new Array();
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
622 for (var i = 0; i < records.length; i++) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
623 var row = records[i];
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
624 if (row.inventory || ! yeastinstock)
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
625 data.push(row);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
626 }
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
627 return data;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
628 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
629 loadError: function(jqXHR, status, error) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
630 $('#err').text(status + ' ' + error);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
631 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
632 });
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
633
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
634 // dropdownlist datasource from inventory_waters
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
635 var waterInvSource = {
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
636 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
637 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
638 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
639 { name: 'name', type: 'string' },
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
640 { name: 'unlimited_stock', type: 'int' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
641 { name: 'calcium', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
642 { name: 'sulfate', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
643 { name: 'chloride', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
644 { name: 'sodium', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
645 { name: 'magnesium', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
646 { name: 'ph', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
647 { name: 'total_alkalinity', type: 'float' },
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
648 { name: 'inventory', type: 'float' },
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
649 { name: 'cost', type: 'float' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
650 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
651 url: "getwatersources.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
652 };
146
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
653 var waterinstock = false;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
654 var waterlist = new $.jqx.dataAdapter(waterInvSource, {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
655 beforeLoadComplete: function (records) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
656 var data = new Array();
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
657 for (var i = 0; i < records.length; i++) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
658 var row = records[i];
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
659 if (row.inventory || row.unlimited_stock || ! waterinstock)
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
660 data.push(row);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
661 }
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
662 return data;
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
663 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
664 loadError: function(jqXHR, status, error) {
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
665 $('#err').text(status + ' ' + error);
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
666 },
2a6c00d325b2 In dropdown inventory lists you can now choose to display only ingredients that rae on stock or all. Fix the hops amount editor that loses the decimal digits.
Michiel Broek <mbroek@mbse.eu>
parents: 144
diff changeset
667 });
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
668
149
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
669 // dropdownlist datasource from profile_water
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
670 var waterProfileSource = {
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
671 datatype: "json",
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
672 datafields: [
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
673 { name: 'record', type: 'number' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
674 { name: 'name', type: 'string' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
675 { name: 'calcium', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
676 { name: 'bicarbonate', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
677 { name: 'sulfate', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
678 { name: 'chloride', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
679 { name: 'sodium', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
680 { name: 'magnesium', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
681 { name: 'ph', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
682 { name: 'total_alkalinity', type: 'float' },
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
683 ],
221
a8aabb63fbcc Added two missing fields in getfermentablesources.php. When getting a single recipe from the database, update the fermentables json data with available inventory and ingredient. Added inventory column in the fermentable grid. Added ingredient selection in the fermentable popup window to replace ingredient.
Michiel Broek <mbroek@mbse.eu>
parents: 220
diff changeset
684 url: "includes/db_profile_water.php"
149
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
685 };
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
686 var waterprofiles = new $.jqx.dataAdapter(waterProfileSource);
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
687
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
688 // dropdownlist datasource from profile_mash
228
98536f6539ee The mash grid now uses a popup editor. There is now a dropdown mash selector to replace the mash scheme.
Michiel Broek <mbroek@mbse.eu>
parents: 221
diff changeset
689 var mashProfileSource = {
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
690 datatype: "json",
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
691 datafields: [
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
692 { name: 'record', type: 'number' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
693 { name: 'name', type: 'string' },
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
694 { name: 'steps', type: 'array' }
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
695 ],
228
98536f6539ee The mash grid now uses a popup editor. There is now a dropdown mash selector to replace the mash scheme.
Michiel Broek <mbroek@mbse.eu>
parents: 221
diff changeset
696 url: "includes/db_profile_mash.php"
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
697 };
228
98536f6539ee The mash grid now uses a popup editor. There is now a dropdown mash selector to replace the mash scheme.
Michiel Broek <mbroek@mbse.eu>
parents: 221
diff changeset
698 var mashlist = new $.jqx.dataAdapter(mashProfileSource);
144
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
699
ae15cfe5f008 Moved inventory dropdown lists to global.js
Michiel Broek <mbroek@mbse.eu>
parents: 139
diff changeset
700
286
124af734af68 Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents: 282
diff changeset
701 /*
13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
702 function getLocalization() {
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
703 var localizationobj = {};
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
704 localizationobj.pagerGoToPageString = "Gehe zu:";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
705 localizationobj.pagerShowRowsString = "Zeige Zeile:";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
706 localizationobj.pagerRangeString = " von ";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
707 localizationobj.pagerNextButtonString = "voriger";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
708 localizationobj.pagerFirstButtonString = "first";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
709 localizationobj.pagerLastButtonString = "last";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
710 localizationobj.pagerPreviousButtonString = "nächster";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
711 localizationobj.sortAscendingString = "Sortiere aufsteigend";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
712 localizationobj.sortDescendingString = "Sortiere absteigend";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
713 localizationobj.sortRemoveString = "Entferne Sortierung";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
714 localizationobj.firstDay = 1;
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
715 localizationobj.percentSymbol = "%";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
716 localizationobj.currencySymbol = "€";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
717 localizationobj.currencySymbolPosition = "after";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
718 localizationobj.decimalSeparator = ",";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
719 localizationobj.thousandsSeparator = ".";
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
720 var days = {
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
721 // full day names
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
722 names: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"],
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
723 // abbreviated day names
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
724 namesAbbr: ["Sonn", "Mon", "Dien", "Mitt", "Donn", "Fre", "Sams"],
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
725 // shortest day names
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
726 namesShort: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
727 };
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
728 localizationobj.days = days;
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
729 var months = {
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
730 // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar)
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
731 names: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember", ""],
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
732 // abbreviated month names
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
733 namesAbbr: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dez", ""]
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
734 };
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
735 var patterns = {
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
736 d: "dd.MM.yyyy",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
737 D: "dddd, d. MMMM yyyy",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
738 t: "HH:mm",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
739 T: "HH:mm:ss",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
740 f: "dddd, d. MMMM yyyy HH:mm",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
741 F: "dddd, d. MMMM yyyy HH:mm:ss",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
742 M: "dd MMMM",
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
743 Y: "MMMM yyyy"
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
744 }
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
745 localizationobj.patterns = patterns;
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
746 localizationobj.months = months;
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
747 return localizationobj;
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
748 }
286
124af734af68 Version 0.1.0. Removed localization because it was messy, parts were localized and others not. In production and recipes ingredients not in stock are marked in red.
Michiel Broek <mbroek@mbse.eu>
parents: 282
diff changeset
749 */
13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
750
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
751
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
752 $(document).ready(function () {
34
a720353fada9 Formatting and measurements
Michiel Broek <mbroek@mbse.eu>
parents: 13
diff changeset
753
13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
754 $("#jqxMenu").jqxMenu({
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
755 width: 1280,
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
756 height: '30px',
186
a7c2c61a01ad Added profile fermentation editor.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
757 autoOpen: false,
a7c2c61a01ad Added profile fermentation editor.
Michiel Broek <mbroek@mbse.eu>
parents: 170
diff changeset
758 clickToOpen: true,
13
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
759 theme: theme
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
760 });
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
761 $("#jqxWidget").css('visibility', 'visible');
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
762 });
b8c3ca152984 Added hops inventory
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
763
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
764
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
765
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
766 function ebc_to_srm(ebc) {
100
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
767 var srm = -1.32303E-12 * Math.pow(ebc, 4) - 0.00000000291515 * Math.pow(ebc, 3) + 0.00000818515 * Math.pow(ebc, 2) + 0.372038 * ebc + 0.596351;
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
768 if ((ebc < 0) || (srm < 0))
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
769 console.log("ebc_to_srm("+ebc+") = "+srm);
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
770 return srm
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
771 }
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
772
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
773
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
774
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
775 function srm_to_ebc(srm)
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
776 {
100
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
777 var ebc = Math.round(0.000000000176506 * Math.pow(srm, 4) + 0.000000154529 * Math.pow(srm, 3) - 0.000159428 * Math.pow(srm, 2) + 2.68837 * srm - 1.6004);
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
778 if ((ebc < 0) || (srm < 0))
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
779 console.log("srm_to_ebc("+srm+") = "+ebc);
08c92cb740b9 Fix for missing coor info on fermentables during recipes import. Log when srm or ebc values are negatie during conversions. Load setup record in global.inc.php and make some variables available for PHP and JS.
Michiel Broek <mbroek@mbse.eu>
parents: 98
diff changeset
780 return ebc;
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
781 }
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
782
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
783
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
784
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
785 /*
133
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
786 * Alcohol By Volume
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
787 */
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
788 function abvol(og, fg) {
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
789
282
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
790 if ((og - fg) < 0)
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
791 return 0;
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
792
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
793 return (76.08 * (og-fg) / (1.775-og)) * (fg / 0.794); // Daniels
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
794 // brouwhulp
133
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
795 if ((4.749804 - fg) != 0)
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
796 return 486.8693 * (og - fg) / (4.749804 - fg);
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
797 return 0;
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
798 }
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
799
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
800
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
801
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
802 /*
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
803 * Kleurwerking naar SRM
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
804 */
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
805 function kw_to_srm(colormethod, c) {
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
806
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
807 if (colormethod == 0) // Morey
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
808 return 1.4922 * Math.pow(c, 0.6859);
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
809 if (colormethod == 1) // Mosher
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
810 return 0.3 * c + 4.7;
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
811 if (colormethod == 2) // Daniels
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
812 return 0.2 * c + 8.4;
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
813 }
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
814
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
815
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
816
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
817 function kw_to_ebc(colormethod, c) {
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
818 return srm_to_ebc(kw_to_srm(colormethod, c));
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
819 }
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
820
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
821
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
822
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
823 /*
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
824 * Berekeningen uit https://www.hobbybrouwen.nl/forum/index.php/topic,6079.msg69464.html#msg69464
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
825 */
101
5b6bb99bc52a IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents: 100
diff changeset
826 function toIBU(Use, Form, SG, Volume, Amount, Boiltime, Alpha, Method)
5b6bb99bc52a IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents: 100
diff changeset
827 {
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
828 var gravity = parseFloat(SG);
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
829 var liters = parseFloat(Volume);
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
830 var alpha = parseFloat(Alpha)/100;
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
831 var mass = parseFloat(Amount) * 1000;
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
832 var time = parseFloat(Boiltime);
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
833 var fmoment = 1.0;
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
834 var pfactor = 1.0;
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
835 var ibu = 0;
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
836
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
837 if ((Use == 3) || (Use == 4) || (Use == 5)) { // Aroma, Whirlpool or Dry hop.
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
838 fmoment = 0.0;
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
839 } else if (Use == 0) { // Mash
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
840 fmoment += my_factor_mashhop / 100; // Brouwhulp
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
841 } else if (Use == 1) { // First wort
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
842 fmoment += my_factor_fwh / 100; // Brouwhulp, Louis, Ozzie
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
843 }
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
844
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
845 if (Form == 0) { // Pellet
101
5b6bb99bc52a IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents: 100
diff changeset
846 pfactor += my_factor_pellet / 100;
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
847 }
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
848 if (Form == 1 ) { // Plug
101
5b6bb99bc52a IBU calculations now use the setup values. All setup values are now global available.
Michiel Broek <mbroek@mbse.eu>
parents: 100
diff changeset
849 pfactor += my_factor_plug / 100;
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
850 }
282
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
851 // if (Form == 3) { // Wet leaf
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
852 // pfactor += 5.5; // From https://github.com/chrisgilmerproj/brewday/blob/master/brew/constants.py
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
853 // }
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
854
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
855 if (Method == 0) { // Tinseth
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
856 /* http://realbeer.com/hops/research.html */
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
857 var AddedAlphaAcids = (alpha * mass * 1000) / liters;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
858 var Bigness_factor = 1.65 * Math.pow( 0.000125, gravity - 1);
98
92d6bc8a4cdd Added javascript formulas for color calculations. Added IBU total calculation. Better IBI calculation for the hop entries. Blocked selection of IBU calculation for Garetz, Mosher and Noonan. Better sg calculation in the recipe print.
Michiel Broek <mbroek@mbse.eu>
parents: 96
diff changeset
859 var BoilTime_factor = ((1 - Math.exp(-0.04 * time)) / 4.15);
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
860 var utiisation = Bigness_factor * BoilTime_factor;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
861 ibu = Math.round(utiisation * AddedAlphaAcids * fmoment * pfactor * 10) / 10.0;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
862 }
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
863 if (Method == 2) { // Daniels
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
864 var boilfactor;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
865 var sgfactor;
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
866 if (Form == 2) // Leaf
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
867 boilfactor = -(0.0041*time*time)+(0.6162*time)+1.5779;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
868 else
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
869 boilfactor = -(0.0051*time*time)+(0.7835*time)+1.9348;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
870 if (gravity < 1050)
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
871 sgfactor = 0;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
872 else
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
873 sgfactor = (gravity - 1050) / 200;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
874 ibu = Math.round(fmoment * ((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor))) * 10) / 10;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
875 }
220
14e349ff2a10 Recipes import uses indexes instead of strings. Started rebuilding the recipes editor using indexes and standard formats. Rebuild the fermentable editor from grid editing to popup editing. Most calculations are using indexes for dropdown values.
Michiel Broek <mbroek@mbse.eu>
parents: 217
diff changeset
876 if (Method == 1) { // Rager
92
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
877 var boilfactor;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
878 var sgfactor;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
879 boilfactor = fmoment * 18.11 + 13.86 * Math.tanh((time * 31.32) / 18.27);
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
880 if (gravity < 1050)
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
881 sgfactor = 0;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
882 else
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
883 sgfactor = (gravity - 1050) / 200;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
884 ibu = Math.round((mass * (alpha * 100) * boilfactor * 0.1) / (liters * (1 + sgfactor)) * 10) / 10;
fab98e5c86fc Added Rager and Daniels IBU calculations to javascript formula.
Michiel Broek <mbroek@mbse.eu>
parents: 70
diff changeset
885 }
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
886
133
22d28dd9c041 Added ABV calculation. Added calculate fermentables from OG calculation. Scale fermentables when the OG changes.
Michiel Broek <mbroek@mbse.eu>
parents: 121
diff changeset
887 // console.log("toIBU("+Use+","+Form+","+SG+","+Volume+","+Amount+","+Boiltime+","+Alpha+","+Method+"):"+ibu+" fm:"+fmoment+" pf:"+pfactor);
59
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
888 return ibu;
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
889 }
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
890
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
891
ad28e09e3abd Added Tinseth IBU calculation.
Michiel Broek <mbroek@mbse.eu>
parents: 34
diff changeset
892
139
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
893 function ebc_to_color(ebc) {
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
894 return srm_to_color(ebc_to_srm(ebc));
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
895 }
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
896
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
897
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
898
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
899 function srm_to_color(srm) {
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
900
170
71850ebe5a1c Made a lot of variables local in functions.
Michiel Broek <mbroek@mbse.eu>
parents: 167
diff changeset
901 var i = Math.round(srm * 10);
139
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
902 if (i < 0) {
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
903 i = 0;
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
904 }
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
905 if (i > 299) {
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
906 i = 299;
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
907 }
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
908
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
909 /* Table copied from Brouwhulp/BrewBuddy */
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
910 var R = [ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, // 0
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
911 250, 250, 250, 250, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, // 2
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
912 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, // 4
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
913 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 200, 199, 199, 198, 198, // 6
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
914 197, 197, 196, 196, 195, 195, 194, 194, 193, 193, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 8
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
915 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, // 10
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
916 192, 192, 192, 192, 192, 192, 192, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, // 12
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
917 179, 178, 177, 175, 174, 172, 171, 169, 168, 167, 195, 164, 162, 161, 159, 158, 157, 155, 154, 152, // 14
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
918 151, 149, 148, 147, 145, 144, 142, 141, 139, 138, 137, 135, 134, 132, 131, 129, 128, 127, 125, 124, // 16
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
919 122, 121, 119, 118, 117, 115, 114, 112, 111, 109, 108, 107, 105, 104, 102, 101, 99, 98, 97, 95, // 18
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
920 94, 92, 91, 89, 88, 87, 85, 84, 82, 81, 79, 78, 77, 75, 74, 72, 71, 69, 68, 67, // 20
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
921 65, 64, 62, 61, 59, 58, 57, 55, 54, 52, 51, 49, 48, 47, 45, 44, 43, 41, 39, 38, // 22
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
922 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 32, 32, 31, 31, 30, 30, 29, 29, 28, 28, // 24
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
923 27, 27, 26, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 20, 20, 19, 19, 18, 18, // 26
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
924 17, 17, 16, 16, 15, 15, 14, 14, 13, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8 ];
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
925
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
926 var G = [ 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
927 250, 250, 250, 250, 250, 250, 249, 248, 247, 246, 245, 244, 242, 240, 238, 236, 234, 232, 230, 228,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
928 226, 224, 222, 220, 218, 216, 214, 212, 210, 208, 206, 204, 202, 200, 198, 196, 194, 192, 190, 188,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
929 186, 184, 182, 180, 178, 176, 174, 172, 170, 168, 166, 164, 162, 160, 158, 156, 154, 152, 150, 148,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
930 146, 144, 142, 141, 140, 139, 139, 138, 137, 136, 136, 135, 134, 133, 133, 132, 131, 130, 130, 129,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
931 128, 127, 127, 126, 125, 124, 124, 123, 122, 121, 121, 120, 119, 118, 118, 117, 116, 115, 115, 114,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
932 113, 112, 112, 111, 110, 109, 109, 108, 107, 106, 106, 105, 104, 103, 103, 102, 101, 100, 100, 99,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
933 98, 97, 97, 96, 95, 94, 94, 93, 92, 91, 91, 90, 89, 88, 88, 87, 86, 85, 85, 84,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
934 83, 82, 82, 81, 80, 79, 78, 77, 76, 75, 75, 74, 73, 72, 72, 71, 70, 69, 69, 68,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
935 67, 66, 66, 65, 64, 63, 63, 62, 61, 60, 60, 59, 58, 57, 57, 56, 55, 54, 54, 53,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
936 52, 51, 51, 50, 49, 48, 48, 47, 46, 45, 45, 44, 43, 42, 42, 41, 40, 39, 39, 38,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
937 37, 36, 36, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 27, 27, 26, 25, 24, 24, 23,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
938 22, 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 16, 16,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
939 16, 15, 15, 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
940 9, 9, 8, 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3 ];
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
941
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
942 var B = [ 210, 204, 199, 193, 188, 182, 177, 171, 166, 160, 155, 149, 144, 138, 133, 127, 122, 116, 111, 105,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
943 100, 94, 89, 83, 78, 72, 67, 61, 56, 50, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
944 47, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
945 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, 56,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
946 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
947 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
948 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
949 56, 56, 56, 55, 55, 55, 55, 54, 54, 54, 54, 53, 53, 53, 53, 52, 52, 52, 52, 51,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
950 51, 51, 51, 50, 50, 50, 50, 49, 49, 48, 47, 47, 46, 45, 45, 44, 43, 43, 42, 41,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
951 41, 40, 39, 39, 38, 37, 37, 36, 35, 34, 33, 32, 31, 29, 28, 27, 26, 25, 24, 23,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
952 21, 20, 19, 18, 17, 16, 15, 13, 12, 11, 10, 9, 8, 9, 9, 10, 10, 11, 11, 12,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
953 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
954 21, 21, 21, 20, 20, 20, 19, 19, 19, 18, 18, 18, 17, 17, 17, 17, 16, 16, 15, 15,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
955 15, 14, 14, 14, 13, 13, 13, 12, 12, 12, 11, 11, 11, 10, 10, 10, 9, 9, 9, 8,
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
956 8, 8, 7, 7, 7, 6, 6, 6, 5, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2 ];
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
957
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
958 var color = R[i] * 65536 + G[i] * 256 + B[i];
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
959 var result = color.toString(16).toUpperCase();
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
960 if (result.length < 6) {
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
961 result = '0' + result;
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
962 }
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
963 result = '#' + result;
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
964 return result;
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
965 }
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
966
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
967
eb1ac7487710 Added EBC color examples. Added simple progessbars for hop flavour and aroma contribution. We need something better. In the fermentables tab, above the grid display the malt color and OG estimates. Display supplier as well in the fermentables grid.
Michiel Broek <mbroek@mbse.eu>
parents: 136
diff changeset
968
96
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
969 function sg_to_plato(sg) {
282
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
970 // http://www.brewersfriend.com/2012/10/31/on-the-relationship-between-plato-and-specific-gravity/
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
971 return ((135.997 * sg - 630.272) * sg + 1111.14) * sg - 616.868;
96
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
972 }
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
973
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
974
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
975
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
976 function plato_to_sg(plato) {
282
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
977 return 1 + (plato / (258.6 - ((plato / 258.2) * 227.1)));
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
978 }
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
979
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
980
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
981
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
982 function brix_to_sg(brix) {
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
983 return plato_to_sg(brix / my_brix_correction);
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
984 }
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
985
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
986
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
987
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
988 function sg_to_brix(sg) {
f765249d57d7 ABV calculation uses Daniels method. sg_to_plato and plato_to_sg functions use brewersfriend calculation. Added sg_to_brix and brix_to_sg functions. Make brewdate tab read only when the primary fermentation is ready. Brix aid input functions for primary end sg and final sg fields. Added tooltips on the fermentation tab. Changes in the layout of the fermentation tab.
Michiel Broek <mbroek@mbse.eu>
parents: 278
diff changeset
989 return sg_to_plato(sg) * my_brix_correction;
96
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
990 }
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
991
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
992
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
993
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
994 function estimate_sg(sugars, batch_size) {
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
995 var plato = 100 * sugars / batch_size;
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
996
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
997 var sg = plato_to_sg(plato);
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
998 for (var i = 0; i < 20; i++) {
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
999 if (sg > 0)
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1000 plato = 100 * sugars / (batch_size * sg);
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1001 sg = plato_to_sg(plato);
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1002 }
121
875aeb365e1c Added sparge pH during import. Added several calculations. Added calculated estimates to the brewday screen.
Michiel Broek <mbroek@mbse.eu>
parents: 101
diff changeset
1003 // console.log("estimate_sg(" + sugars + "," + batch_size + ") : " + sg);
96
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1004 return sg;
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1005 }
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1006
107c12c3e49d Renamed estimate_og() to estimate_sg() formula. Updated the formulas in javascript. The calcFermenter() function now only calculates the gravities. The colors still need to be added. When a recept is loaded in the editor, all tabs are selected once to load all subgrid data. Ugly and slow but it at least it works.
Michiel Broek <mbroek@mbse.eu>
parents: 94
diff changeset
1007
136
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1008
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1009 function estimate_fg(percSugar, percCara, WGratio, TotTme, Temp, attenuation, og) {
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1010
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1011 var BD;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1012
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1013 if (percSugar > 40)
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1014 percSugar = 0;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1015 if (percCara > 50)
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1016 percCara = 0;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1017 if ((WGratio > 0) && (TotTme > 0)) {
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1018 BD = WGratio;
258
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1019 if (BD < 2)
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1020 BD = 2;
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1021 if (BD > 5.5)
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1022 BD = 5.5;
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1023 if (Temp < 60)
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1024 Temp = 60;
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1025 if (Temp > 72)
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1026 Temp = 72;
136
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1027 } else {
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1028 BD = 3.5;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1029 Temp = 67;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1030 TotTme = 75;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1031 }
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1032 if (attenuation < 30)
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1033 attenuation = 77;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1034
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1035 var AttBeer = 0.00825 * attenuation + 0.00817 * BD - 0.00684 * Temp + 0.00026 * TotTme - 0.00356 * percCara + 0.00553 * percSugar + 0.547;
258
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1036 var fg = Math.round((1 + (1 - AttBeer) * (og - 1)) * 10000) / 10000;
241
e95d2886f49f Added soe extra debug logging in db_product.php. Automatic stage increment in the product editor. On the brewday tab added tooltips.
Michiel Broek <mbroek@mbse.eu>
parents: 232
diff changeset
1037
258
943fbe0e9fd6 Fixed estimate_fg formula. Estimate neede sparge water displayed on the brewday tab. Moved calcSVG, calcFG and calcABV functions into calcFermentables. Calc FG now uses mash data if available. Show estimated fg on the fermentation tab. Cosmetic changes on the brewday tab.
Michiel Broek <mbroek@mbse.eu>
parents: 256
diff changeset
1038 //console.log("estimate_fg("+percSugar+","+percCara+","+BD+","+TotTme+","+Temp+","+attenuation+","+og+") :"+fg);
136
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1039 return fg;
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1040 }
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1041
bcc4583fd013 Fixed estimate FG calculation during recipes import. Added estimate FG calculation in the recipe editor but do not yet update the recipe. Added SVG calculation to the recipes editor. Added calculations for hop aroma and flavour contribution.
Michiel Broek <mbroek@mbse.eu>
parents: 133
diff changeset
1042
149
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1043 function CalcFrac(TpH, pK1, pK2, pK3) {
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1044
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1045 var r1d = Math.pow(10, TpH - pK1);
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1046 var r2d = Math.pow(10, TpH - pK2);
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1047 var r3d = Math.pow(10, TpH - pK3);
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1048 var dd = 1/(1 + r1d + r1d*r2d + r1d*r2d*r3d);
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1049 var f1d = dd;
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1050 var f2d = r1d*dd;
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1051 var f3d = r1d*r2d*dd;
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1052 var f4d = r1d*r2d*r3d*dd;
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1053 return f2d + 2*f3d + 3*f4d;
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1054 }
ff45488d480e Added some icons from Brewersfriend. They should be replaced someday. Added maximum mash weight setting to the equipment database. Usefull for brew automate and RIMS systems. During recipes import acid and base additions are translated. Brews and recipes now have 2 water sources. Added water mixer. Added basic water treatment, but not for pH yet. Redesigned the fermentables and water tabs.
Michiel Broek <mbroek@mbse.eu>
parents: 148
diff changeset
1055

mercurial