Thu, 10 Oct 2019 20:42:39 +0200
Added CO2 meter units to the daemon.
11 | 1 | /***************************************************************************** |
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:
51
diff
changeset
|
2 | * Copyright (C) 2014-2019 |
11 | 3 | * |
4 | * Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
6 | * This file is part of BrewCloud | |
7 | * | |
8 | * This is free software; you can redistribute it and/or modify it | |
9 | * under the terms of the GNU General Public License as published by the | |
10 | * Free Software Foundation; either version 2, or (at your option) any | |
11 | * later version. | |
12 | * | |
13 | * BrewCloud is distributed in the hope that it will be useful, but | |
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
16 | * General Public License for more details. | |
17 | * | |
18 | * You should have received a copy of the GNU General Public License | |
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
21 | *****************************************************************************/ | |
22 | ||
23 | ||
24 | function createDelElements() { | |
25 | $('#eventWindow').jqxWindow({ | |
26 | theme: theme, | |
27 | position: { x: 490, y: 210 }, | |
28 | width: 300, | |
34 | 29 | height: 175, |
11 | 30 | resizable: false, |
31 | isModal: true, | |
32 | modalOpacity: 0.4, | |
33 | okButton: $('#delOk'), | |
34 | cancelButton: $('#delCancel'), | |
35 | initContent: function () { | |
51 | 36 | $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); |
37 | $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); | |
11 | 38 | $('#delCancel').focus(); |
39 | } | |
40 | }); | |
41 | $('#eventWindow').jqxWindow('hide'); | |
42 | } | |
43 | ||
44 | ||
45 | $(document).ready(function () { | |
199
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
46 | |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
47 | function calcTotal(cost, inventory) { |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
48 | |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
49 | $('#totval').val(cost * inventory); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
50 | } |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
51 | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
52 | var dataRecord = {}, |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
53 | url = 'includes/db_inventory_fermentables.php', |
11 | 54 | // prepare the data |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
55 | source = { |
11 | 56 | datatype: "json", |
57 | cache: false, | |
58 | datafields: [ | |
59 | { name: 'record', type: 'number' }, | |
60 | { name: 'name', type: 'string' }, | |
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:
51
diff
changeset
|
61 | { name: 'type', type: 'int' }, |
11 | 62 | { name: 'yield', type: 'float' }, |
63 | { name: 'color', type: 'float' }, | |
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:
51
diff
changeset
|
64 | { name: 'add_after_boil', type: 'int' }, |
11 | 65 | { name: 'origin', type: 'string' }, |
66 | { name: 'supplier', type: 'string' }, | |
67 | { name: 'notes', type: 'string' }, | |
68 | { name: 'coarse_fine_diff', type: 'float' }, | |
69 | { name: 'moisture', type: 'float' }, | |
70 | { name: 'diastatic_power', type: 'float' }, | |
71 | { name: 'protein', type: 'float' }, | |
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:
51
diff
changeset
|
72 | { name: 'dissolved_protein', type: 'float' }, |
11 | 73 | { name: 'max_in_batch', type: 'float' }, |
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:
51
diff
changeset
|
74 | { name: 'recommend_mash', type: 'int' }, |
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:
51
diff
changeset
|
75 | { name: 'added', type: 'int' }, |
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:
51
diff
changeset
|
76 | { name: 'always_on_stock', type: 'int' }, |
11 | 77 | { name: 'di_ph', type: 'float' }, |
78 | { name: 'acid_to_ph_57', type: 'float' }, | |
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:
51
diff
changeset
|
79 | { name: 'graintype', type: 'int' }, |
11 | 80 | { name: 'inventory', type: 'float' }, |
81 | { name: 'cost', type: 'float' }, | |
82 | { name: 'production_date', type: 'string' }, | |
18
395833e20f88
Better error messages in syslog
Michiel Broek <mbroek@mbse.eu>
parents:
11
diff
changeset
|
83 | { name: 'tht_date', type: 'string' } |
11 | 84 | ], |
85 | id: 'record', | |
86 | url: url, | |
87 | deleterow: function (rowid, commit) { | |
88 | // synchronize with the server - send delete command | |
89 | var data = "delete=true&" + $.param({ record: rowid }); | |
90 | $.ajax({ | |
91 | dataType: 'json', | |
92 | url: url, | |
93 | cache: false, | |
94 | data: data, | |
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:
51
diff
changeset
|
95 | type: "POST", |
11 | 96 | success: function (data, status, xhr) { |
97 | commit(true); | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
98 | location.reload( true ); |
11 | 99 | }, |
100 | error: function (jqXHR, textStatus, errorThrown) { | |
101 | commit(false); | |
102 | } | |
103 | }); | |
104 | }, | |
105 | addrow: function (rowid, rowdata, position, commit) { | |
106 | var data = "insert=true&" + $.param(rowdata); | |
107 | $.ajax({ | |
108 | dataType: 'json', | |
109 | url: url, | |
110 | cache: false, | |
111 | data: data, | |
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:
51
diff
changeset
|
112 | type: "POST", |
11 | 113 | success: function (data, status, xhr) { |
114 | commit(true); | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
115 | location.reload( true ); |
11 | 116 | }, |
117 | error: function(jqXHR, textStatus, errorThrown) { | |
118 | commit(false); | |
119 | } | |
120 | }); | |
121 | }, | |
122 | updaterow: function (rowid, rowdata, commit) { | |
123 | var data = "update=true&" + $.param(rowdata); | |
124 | $.ajax({ | |
125 | dataType: 'json', | |
126 | url: url, | |
127 | cache: false, | |
128 | data: data, | |
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:
51
diff
changeset
|
129 | type: "POST", |
11 | 130 | success: function (data, status, xhr) { |
131 | commit(true); | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
132 | location.reload( true ); |
11 | 133 | }, |
134 | error: function(jqXHR, textStatus, errorThrown) { | |
135 | commit(false); | |
136 | } | |
137 | }); | |
138 | } | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
139 | }, |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
140 | dataAdapter = new $.jqx.dataAdapter(source), |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
141 | editrow = -1; |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
142 | |
11 | 143 | // initialize the input fields. |
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:
51
diff
changeset
|
144 | $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); |
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:
51
diff
changeset
|
145 | $("#type").jqxDropDownList({ |
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:
51
diff
changeset
|
146 | theme: theme, |
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:
51
diff
changeset
|
147 | source: FermentableTypeAdapter, |
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:
51
diff
changeset
|
148 | valueMember: 'id', |
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:
51
diff
changeset
|
149 | displayMember: '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:
51
diff
changeset
|
150 | width: 180, |
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:
51
diff
changeset
|
151 | height: 23, |
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:
51
diff
changeset
|
152 | autoDropDownHeight: true |
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:
51
diff
changeset
|
153 | }); |
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:
202
diff
changeset
|
154 | $("#yield").jqxNumberInput( Spin1dec ); |
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:
202
diff
changeset
|
155 | $("#color").jqxNumberInput( Spin1dec ); |
11 | 156 | $("#add_after_boil").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
157 | $("#origin").jqxInput({ theme: theme, width: 250, height: 23 }); | |
158 | $("#supplier").jqxInput({ theme: theme, width: 250, height: 23 }); | |
18
395833e20f88
Better error messages in syslog
Michiel Broek <mbroek@mbse.eu>
parents:
11
diff
changeset
|
159 | $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); |
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:
202
diff
changeset
|
160 | $("#coarse_fine_diff").jqxNumberInput( Spin1dec ); |
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:
202
diff
changeset
|
161 | $("#moisture").jqxNumberInput( Spin1dec ); |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
324
diff
changeset
|
162 | $("#diastatic_power").jqxNumberInput( PosInt ); |
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:
202
diff
changeset
|
163 | $("#protein").jqxNumberInput( Spin1dec ); |
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:
202
diff
changeset
|
164 | $("#dissolved_protein").jqxNumberInput( Spin1dec ); |
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:
202
diff
changeset
|
165 | $("#max_in_batch").jqxNumberInput( Perc1dec ); |
11 | 166 | $("#recommend_mash").jqxCheckBox({ theme: theme, width: 120, height: 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:
51
diff
changeset
|
167 | $("#added").jqxDropDownList({ |
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:
51
diff
changeset
|
168 | theme: theme, |
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:
51
diff
changeset
|
169 | source: AddedAdapter, |
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:
51
diff
changeset
|
170 | valueMember: 'id', |
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:
51
diff
changeset
|
171 | displayMember: '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:
51
diff
changeset
|
172 | width: 180, |
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:
51
diff
changeset
|
173 | height: 23, |
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:
51
diff
changeset
|
174 | autoDropDownHeight: true |
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:
51
diff
changeset
|
175 | }); |
11 | 176 | $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 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:
51
diff
changeset
|
177 | $("#di_ph").jqxNumberInput( Spin2pH ); |
269 | 178 | $("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', theme: theme, width: 110, height: 23, min: -1000, max: 1000, decimalDigits: 4, 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:
51
diff
changeset
|
179 | $("#graintype").jqxDropDownList({ |
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:
51
diff
changeset
|
180 | theme: theme, |
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:
51
diff
changeset
|
181 | source: GrainTypeAdapter, |
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:
51
diff
changeset
|
182 | valueMember: 'id', |
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:
51
diff
changeset
|
183 | displayMember: '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:
51
diff
changeset
|
184 | width: 180, |
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:
51
diff
changeset
|
185 | height: 23, |
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:
51
diff
changeset
|
186 | autoDropDownHeight: true |
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:
51
diff
changeset
|
187 | }); |
274
65ca75fc4af8
Added prod_reduce.php to the Makefile. Inventory fermentables uses 3 decimals in stead of 1.
Michiel Broek <mbroek@mbse.eu>
parents:
269
diff
changeset
|
188 | $("#inventory").jqxNumberInput( Spin3dec ); |
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:
51
diff
changeset
|
189 | $("#production_date").jqxDateTimeInput( Dateopts ); |
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:
202
diff
changeset
|
190 | $("#cost").jqxNumberInput( Spin2dec ); |
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:
51
diff
changeset
|
191 | $("#tht_date").jqxDateTimeInput( Dateopts ); |
269 | 192 | $("#totval").jqxNumberInput( Show2dec ); |
199
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
193 | |
11 | 194 | // initialize jqxGrid |
195 | $("#jqxgrid").jqxGrid({ | |
196 | width: 1280, | |
197 | height: 630, | |
198 | source: dataAdapter, | |
199 | theme: theme, | |
200 | showstatusbar: true, | |
201 | renderstatusbar: function (statusbar) { | |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
202 | var container, addButton, impButton; |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
203 | container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>"); |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
204 | addButton = $("<div style='float: right; margin-right: 15px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Nieuw</span></div>"); |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
205 | impButton = $("<div style='float: right; margin-right: 50px;'><img style='position: relative; margin-top: 2px;' src='images/add.png'/><span style='margin-left: 4px; position: relative; top: -3px;'>Import</span></div>"); |
11 | 206 | container.append(addButton); |
311
f6fafccd8a6d
Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
207 | container.append(impButton); |
11 | 208 | statusbar.append(container); |
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:
51
diff
changeset
|
209 | addButton.jqxButton({ theme: theme, width: 90, height: 20 }); |
311
f6fafccd8a6d
Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
210 | impButton.jqxButton({ theme: theme, width: 90, height: 20 }); |
11 | 211 | // add new row. |
212 | addButton.click(function (event) { | |
213 | editrow = -1; | |
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:
51
diff
changeset
|
214 | $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); |
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:
51
diff
changeset
|
215 | $("#name").val('Nieuw product'); |
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:
51
diff
changeset
|
216 | $("#type").val(0); |
11 | 217 | $("#origin").val(''); |
218 | $("#supplier").val(''); | |
219 | $("#notes").val(''); | |
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:
51
diff
changeset
|
220 | $("#yield").val(80); |
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:
51
diff
changeset
|
221 | $("#color").val(3); |
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:
51
diff
changeset
|
222 | $("#coarse_fine_diff").val(3); |
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:
51
diff
changeset
|
223 | $("#moisture").val(4); |
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:
51
diff
changeset
|
224 | $("#diastatic_power").val(0); |
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:
51
diff
changeset
|
225 | $("#protein").val(0); |
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:
51
diff
changeset
|
226 | $("#dissolved_protein").val(0); |
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:
51
diff
changeset
|
227 | $("#max_in_batch").val(100); |
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:
51
diff
changeset
|
228 | $("#recommend_mash").val(1); |
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:
51
diff
changeset
|
229 | $("#always_on_stock").val(0); |
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:
51
diff
changeset
|
230 | $("#di_ph").val(0); |
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:
51
diff
changeset
|
231 | $("#acid_to_ph_57").val(0); |
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:
51
diff
changeset
|
232 | $("#graintype").val(0); |
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:
51
diff
changeset
|
233 | $("#add_after_boil").val(0); |
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:
51
diff
changeset
|
234 | $("#added").val(0); |
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:
51
diff
changeset
|
235 | $("#inventory").val(0); |
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:
51
diff
changeset
|
236 | $("#cost").val(0); |
11 | 237 | $("#production_date").val(''); |
238 | $("#tht_date").val(''); | |
239 | $("#popupWindow").jqxWindow('open'); | |
240 | }); | |
311
f6fafccd8a6d
Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
241 | impButton.click(function (event) { |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
242 | window.location.href = 'import_ingredients.php?select=fermentables'; |
311
f6fafccd8a6d
Added xml import for fermentables, hops, miscs, yeasts and styles. Fixed update IBU calculation in the editor hop popups.
Michiel Broek <mbroek@mbse.eu>
parents:
286
diff
changeset
|
243 | }); |
11 | 244 | }, |
245 | filterable: true, | |
246 | filtermode: 'excel', | |
247 | columns: [ | |
202
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
248 | { text: 'Herkomst', datafield: 'origin', width: 150 }, |
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:
51
diff
changeset
|
249 | { text: 'Producent', datafield: 'supplier', width: 140 }, |
202
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
250 | { text: 'Vergistbaar product', datafield: 'name', menu: false }, |
269 | 251 | { text: 'Soort', width: 135, filtertype: 'list', datafield: 'type', |
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:
51
diff
changeset
|
252 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
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:
274
diff
changeset
|
253 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + FermentableTypeData[value].nl + "</span>"; |
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:
274
diff
changeset
|
254 | } |
197
63174cff2cc1
Failed attempt to get the filterbox right. Saved as a reference.
Michiel Broek <mbroek@mbse.eu>
parents:
195
diff
changeset
|
255 | }, |
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:
51
diff
changeset
|
256 | { text: 'Graan type', datafield: 'graintype', align: 'center', cellsalign: 'center', width: 125, |
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:
51
diff
changeset
|
257 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
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:
274
diff
changeset
|
258 | return "<span style='margin: 3px; margin-top: 6px; float: left;'>" + GrainTypeData[value].nl + "</span>"; |
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:
51
diff
changeset
|
259 | } |
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:
51
diff
changeset
|
260 | }, |
202
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
261 | { text: 'EBC', datafield: 'color', width: 60, align: 'right', menu: false, cellsalign: 'right' }, |
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
262 | { text: 'Opbrengst', datafield: 'yield', width: 70, align: 'right', menu: false, cellsalign: 'right', cellsformat: 'p1' }, |
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
263 | { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false, |
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
264 | cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { |
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:
274
diff
changeset
|
265 | var amount = ""; |
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:
274
diff
changeset
|
266 | if (value > 0) { |
324
d49da6d0b451
Fix for ugly fermentables in stock notation below 1 kg. Don't show days for in production list on the package day.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
267 | if (value < 1.000) |
d49da6d0b451
Fix for ugly fermentables in stock notation below 1 kg. Don't show days for in production list on the package day.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
268 | amount = dataAdapter.formatNumber(value * 1000,"f0")+" gr"; |
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:
274
diff
changeset
|
269 | else |
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:
274
diff
changeset
|
270 | amount = dataAdapter.formatNumber(value,"f1")+" kg"; |
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:
274
diff
changeset
|
271 | } |
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:
274
diff
changeset
|
272 | return "<span style='margin: 3px; margin-top: 6px; float: right;'>" + amount + "</span>"; |
202
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
273 | } |
64a9c935a66b
Yeast import Imperial Yeast packs are 200 billion cells/pack. Inventory fermentables the origin country column first. Disable filter menu on some fields. Friendy display of stock inventory.
Michiel Broek <mbroek@mbse.eu>
parents:
199
diff
changeset
|
274 | }, |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
275 | { text: '', datafield: 'Edit', width: 100, align: 'center', menu: false, columntype: 'button', |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
276 | cellsrenderer: function () { |
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
277 | return "Wijzig"; |
11 | 278 | }, buttonclick: function (row) { |
279 | // open the popup window when the user clicks a button. | |
280 | editrow = row; | |
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:
51
diff
changeset
|
281 | $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } }); |
11 | 282 | // get the clicked row's data and initialize the input fields. |
199
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
283 | dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow); |
11 | 284 | $("#name").val(dataRecord.name); |
285 | $("#type").val(dataRecord.type); | |
286 | $("#yield").val(dataRecord.yield); | |
287 | $("#color").val(dataRecord.color); | |
288 | $("#add_after_boil").val(dataRecord.add_after_boil); | |
289 | $("#origin").val(dataRecord.origin); | |
290 | $("#supplier").val(dataRecord.supplier); | |
291 | $("#notes").val(dataRecord.notes); | |
292 | $("#coarse_fine_diff").val(dataRecord.coarse_fine_diff); | |
293 | $("#moisture").val(dataRecord.moisture); | |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
324
diff
changeset
|
294 | $("#diastatic_power").val(lintner_to_kolbach(dataRecord.diastatic_power)); |
11 | 295 | $("#protein").val(dataRecord.protein); |
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:
51
diff
changeset
|
296 | $("#dissolved_protein").val(dataRecord.dissolved_protein); |
11 | 297 | $("#max_in_batch").val(dataRecord.max_in_batch); |
298 | $("#recommend_mash").val(dataRecord.recommend_mash); | |
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:
51
diff
changeset
|
299 | $("#added").val(dataRecord.added); |
11 | 300 | $("#always_on_stock").val(dataRecord.always_on_stock); |
301 | $("#di_ph").val(dataRecord.di_ph); | |
302 | $("#acid_to_ph_57").val(dataRecord.acid_to_ph_57); | |
303 | $("#graintype").val(dataRecord.graintype); | |
304 | $("#inventory").val(dataRecord.inventory); | |
305 | $("#cost").val(dataRecord.cost); | |
306 | $("#production_date").val(dataRecord.production_date); | |
307 | $("#tht_date").val(dataRecord.tht_date); | |
199
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
308 | calcTotal(dataRecord.cost, dataRecord.inventory); |
11 | 309 | // show the popup window. |
310 | $("#popupWindow").jqxWindow('open'); | |
311 | } | |
312 | } | |
313 | ] | |
314 | }); | |
199
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
315 | |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
316 | $("#cost").on('change', function (event) { |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
317 | dataRecord.cost = parseFloat(event.args.value); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
318 | calcTotal(dataRecord.cost, dataRecord.inventory); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
319 | }); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
320 | $("#inventory").on('change', function (event) { |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
321 | dataRecord.inventory = parseFloat(event.args.value); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
322 | calcTotal(dataRecord.cost, dataRecord.inventory); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
323 | }); |
dad62ec9af18
Added total cost values to the fermenter and hop editor screens.
Michiel Broek <mbroek@mbse.eu>
parents:
197
diff
changeset
|
324 | |
11 | 325 | // initialize the popup window and buttons. |
326 | $("#popupWindow").jqxWindow({ | |
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:
51
diff
changeset
|
327 | width: 1050, |
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:
51
diff
changeset
|
328 | height: 550, |
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:
51
diff
changeset
|
329 | resizable: false, |
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:
51
diff
changeset
|
330 | theme: theme, |
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:
51
diff
changeset
|
331 | isModal: true, |
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:
51
diff
changeset
|
332 | autoOpen: false, |
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:
51
diff
changeset
|
333 | cancelButton: $("#Cancel"), |
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:
51
diff
changeset
|
334 | modalOpacity: 0.40 |
11 | 335 | }); |
336 | $("#popupWindow").on('open', function () { | |
337 | $("#name").jqxInput('selectAll'); | |
338 | }); | |
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:
51
diff
changeset
|
339 | $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme }); |
477 | 340 | $("#Delete").click(function() { |
11 | 341 | if (editrow >= 0) { |
342 | // Open a popup to confirm this action. | |
343 | $('#eventWindow').jqxWindow('open'); | |
344 | $("#delOk").click(function () { | |
345 | var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); | |
346 | $("#jqxgrid").jqxGrid('deleterow', rowID); | |
347 | }); | |
348 | } | |
349 | $("#popupWindow").jqxWindow('hide'); | |
350 | }); | |
477 | 351 | $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme }); |
352 | $('#Clone').jqxButton({ template: 'warning', width: '90px', theme: theme }); | |
353 | $('#Clone').click(function() { | |
354 | var row = { | |
355 | record: -1, | |
356 | name: $('#name').val() + ' kopie', | |
357 | type: $('#type').val(), | |
358 | yield: parseFloat($('#yield').jqxNumberInput('decimal')), | |
359 | color: parseFloat($('#color').jqxNumberInput('decimal')), | |
360 | add_after_boil: $('#add_after_boil').val(), | |
361 | origin: $('#origin').val(), | |
362 | supplier: $('#supplier').val(), | |
363 | notes: $('#notes').val(), | |
364 | coarse_fine_diff: parseFloat($('#coarse_fine_diff').jqxNumberInput('decimal')), | |
365 | moisture: parseFloat($('#moisture').jqxNumberInput('decimal')), | |
366 | diastatic_power: kolbach_to_lintner(parseFloat($('#diastatic_power').jqxNumberInput('decimal'))), | |
367 | protein: parseFloat($('#protein').jqxNumberInput('decimal')), | |
368 | dissolved_protein: parseFloat($('#dissolved_protein').jqxNumberInput('decimal')), | |
369 | max_in_batch: parseFloat($('#max_in_batch').jqxNumberInput('decimal')), | |
370 | recommend_mash: $('#recommend_mash').val(), | |
371 | added: $('#added').val(), | |
372 | always_on_stock: $('#always_on_stock').val(), | |
373 | di_ph: parseFloat($('#di_ph').jqxNumberInput('decimal')), | |
374 | acid_to_ph_57: parseFloat($('#acid_to_ph_57').jqxNumberInput('decimal')), | |
375 | graintype: $('#graintype').val(), | |
376 | inventory: 0, | |
377 | cost: parseFloat($('#cost').jqxNumberInput('decimal')), | |
378 | production_date: '', | |
379 | tht_date: '' | |
380 | }; | |
381 | $('#jqxgrid').jqxGrid('addrow', null, row); | |
382 | $('#popupWindow').jqxWindow('hide'); | |
383 | }); | |
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:
51
diff
changeset
|
384 | $("#Save").jqxButton({ template: "success", width: '90px', theme: theme }); |
11 | 385 | // update the edited row when the user clicks the 'Save' button. |
477 | 386 | $("#Save").click(function() { |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
387 | var row, rowID = -1; |
11 | 388 | if (editrow >= 0) { |
477 | 389 | rowID = $('#jqxgrid').jqxGrid('getrowid', editrow); |
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:
51
diff
changeset
|
390 | } |
488
77f1617b6994
Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents:
477
diff
changeset
|
391 | row = { |
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:
51
diff
changeset
|
392 | record: rowID, |
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:
51
diff
changeset
|
393 | name: $("#name").val(), |
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:
51
diff
changeset
|
394 | type: $("#type").val(), |
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:
51
diff
changeset
|
395 | yield: parseFloat($("#yield").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
396 | color: parseFloat($("#color").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
397 | add_after_boil: $("#add_after_boil").val(), |
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:
51
diff
changeset
|
398 | origin: $("#origin").val(), |
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:
51
diff
changeset
|
399 | supplier: $("#supplier").val(), |
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:
51
diff
changeset
|
400 | notes: $("#notes").val(), |
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:
51
diff
changeset
|
401 | coarse_fine_diff: parseFloat($("#coarse_fine_diff").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
402 | moisture: parseFloat($("#moisture").jqxNumberInput('decimal')), |
376
1de1623e1760
Inventory fermentables convert diastatic power between kolbach and lintner. In recipe and product editors calculate the recipe lintner value. For now a raw presentation of the outcome.
Michiel Broek <mbroek@mbse.eu>
parents:
324
diff
changeset
|
403 | diastatic_power: kolbach_to_lintner(parseFloat($("#diastatic_power").jqxNumberInput('decimal'))), |
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:
51
diff
changeset
|
404 | protein: parseFloat($("#protein").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
405 | dissolved_protein: parseFloat($("#dissolved_protein").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
406 | max_in_batch: parseFloat($("#max_in_batch").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
407 | recommend_mash: $("#recommend_mash").val(), |
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:
51
diff
changeset
|
408 | added: $("#added").val(), |
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:
51
diff
changeset
|
409 | always_on_stock: $("#always_on_stock").val(), |
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:
51
diff
changeset
|
410 | di_ph: parseFloat($("#di_ph").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
411 | acid_to_ph_57: parseFloat($("#acid_to_ph_57").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
412 | graintype: $("#graintype").val(), |
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:
51
diff
changeset
|
413 | inventory: parseFloat($("#inventory").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
414 | cost: parseFloat($("#cost").jqxNumberInput('decimal')), |
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:
51
diff
changeset
|
415 | production_date: $("#production_date").val(), |
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:
51
diff
changeset
|
416 | tht_date: $("#tht_date").val(), |
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:
51
diff
changeset
|
417 | }; |
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:
51
diff
changeset
|
418 | if (editrow >= 0) { |
11 | 419 | $('#jqxgrid').jqxGrid('updaterow', rowID, row); |
420 | } else { | |
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:
51
diff
changeset
|
421 | $('#jqxgrid').jqxGrid('addrow', null, row); |
11 | 422 | } |
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:
51
diff
changeset
|
423 | $("#popupWindow").jqxWindow('hide'); |
11 | 424 | }); |
425 | createDelElements(); | |
426 | }); | |
427 |