www/js/inv_yeasts.js

Fri, 13 Sep 2019 20:24:31 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Fri, 13 Sep 2019 20:24:31 +0200
changeset 488
77f1617b6994
parent 481
fc21dcfbe51d
child 512
4451af8b6295
permissions
-rw-r--r--

Fixed inventory databases race conditions

14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
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: 37
diff changeset
2 * Copyright (C) 2014-2019
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 * This file is part of BrewCloud
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * BrewCloud is distributed in the hope that it will be useful, but
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 function createDelElements() {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
25 $('#eventWindow').jqxWindow({
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
26 theme: theme,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
27 position: { x: 490, y: 210 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
28 width: 300,
34
a720353fada9 Formatting and measurements
Michiel Broek <mbroek@mbse.eu>
parents: 33
diff changeset
29 height: 175,
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
30 resizable: false,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
31 isModal: true,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
32 modalOpacity: 0.4,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
33 okButton: $('#delOk'),
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
34 cancelButton: $('#delCancel'),
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
35 initContent: function () {
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
36 $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme });
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
37 $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
38 $('#delCancel').focus();
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
39 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
40 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
41 $('#eventWindow').jqxWindow('hide');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
45 $(document).ready(function() {
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: 37
diff changeset
46
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
47 function calcTotal() {
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: 37
diff changeset
48
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
49 $('#totval').val(dataRecord.cost * dataRecord.inventory);
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
50 if (dataRecord.form == 0) { // Liquid
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
51 $("#pmpt_cost").html('Prijs per pak:');
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
52 $("#pmpt_inventory").html('Voorraad pak(ken):');
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: 269
diff changeset
53 $("#pmpt_cells").html('Miljard cellen per pak:');
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: 269
diff changeset
54 $("#inventory").jqxNumberInput({ decimalDigits: 0 });
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
55 } else if (dataRecord.form == 1) { // Dry
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
56 $("#pmpt_cost").html('Prijs per kg:');
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
57 $("#pmpt_inventory").html('Voorraad gram:');
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: 269
diff changeset
58 $("#pmpt_cells").html('Miljard cellen per gram:');
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: 269
diff changeset
59 $("#inventory").jqxNumberInput({ decimalDigits: 1 });
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
60 } else {
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
61 $("#pmpt_cost").html('Prijs per liter:');
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
62 $("#pmpt_inventory").html('Voorraad ml:');
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: 269
diff changeset
63 $("#pmpt_cells").html('Miljard cellen per ml:');
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: 269
diff changeset
64 $("#inventory").jqxNumberInput({ decimalDigits: 1 });
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
65 }
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: 37
diff changeset
66 }
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: 37
diff changeset
67
488
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
68 var dataRecord = {},
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
69 url = 'includes/db_inventory_yeasts.php',
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
70 source = {
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
71 datatype: 'json',
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
72 cache: false,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
73 datafields: [
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
74 { name: 'record', type: 'number' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
75 { name: 'name', type: 'string' },
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: 37
diff changeset
76 { name: 'type', type: 'int' },
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: 37
diff changeset
77 { name: 'form', type: 'int' },
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
78 { name: 'laboratory', type: 'string' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
79 { name: 'product_id', type: 'string' },
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: 37
diff changeset
80 { name: 'min_temperature', type: 'float' },
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: 37
diff changeset
81 { name: 'max_temperature', type: 'float' },
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: 37
diff changeset
82 { name: 'flocculation', type: 'int' },
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
83 { name: 'attenuation', type: 'float' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
84 { name: 'notes', type: 'string' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
85 { name: 'best_for', type: 'string' },
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: 37
diff changeset
86 { name: 'max_reuse', type: 'int' },
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
87 { name: 'inventory', type: 'float' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
88 { name: 'cost', type: 'float' },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
89 { name: 'production_date', type: 'string' },
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
90 { name: 'tht_date', type: 'string' },
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
91 { name: 'cells', type: 'float' },
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
92 { name: 'tolerance', type: 'float' }
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
93 ],
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
94 id: 'record',
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
95 url: url,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
96 deleterow: function (rowid, commit) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
97 // synchronize with the server - send delete command
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
98 var data = "delete=true&" + $.param({ record: rowid });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
99 $.ajax({
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
100 dataType: 'json',
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
101 url: url,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
102 cache: false,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
103 data: data,
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: 37
diff changeset
104 type: "POST",
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
105 success: function (data, status, xhr) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
106 commit(true);
488
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
107 location.reload( true );
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
108 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
109 error: function (jqXHR, textStatus, errorThrown) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
110 commit(false);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
111 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
112 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
113 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
114 addrow: function (rowid, rowdata, position, commit) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
115 var data = "insert=true&" + $.param(rowdata);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
116 $.ajax({
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
117 dataType: 'json',
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
118 url: url,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
119 cache: false,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
120 data: data,
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: 37
diff changeset
121 type: "POST",
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
122 success: function (data, status, xhr) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
123 commit(true);
488
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
124 location.reload( true );
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
125 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
126 error: function(jqXHR, textStatus, errorThrown) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
127 commit(false);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
128 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
129 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
130 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
131 updaterow: function (rowid, rowdata, commit) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
132 var data = "update=true&" + $.param(rowdata);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
133 $.ajax({
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
134 dataType: 'json',
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
135 url: url,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
136 cache: false,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
137 data: data,
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: 37
diff changeset
138 type: "POST",
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
139 success: function (data, status, xhr) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
140 commit(true);
488
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
141 location.reload( true );
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
142 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
143 error: function(jqXHR, textStatus, errorThrown) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
144 commit(false);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
145 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
146 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
147 }
488
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
148 },
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
149 dataAdapter = new $.jqx.dataAdapter(source),
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
150 editrow = -1;
77f1617b6994 Fixed inventory databases race conditions
Michiel Broek <mbroek@mbse.eu>
parents: 481
diff changeset
151
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
152 // initialize the input fields.
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: 37
diff changeset
153 $("#name").jqxInput({ theme: theme, width: 640, height: 23 });
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: 37
diff changeset
154 $("#laboratory").jqxInput({ theme: theme, width: 320, height: 23 });
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: 37
diff changeset
155 $("#product_id").jqxInput({ theme: theme, width: 320, height: 23 });
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: 37
diff changeset
156 $("#type").jqxDropDownList({
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: 37
diff changeset
157 theme: theme,
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: 37
diff changeset
158 source: YeastTypeAdapter,
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: 37
diff changeset
159 valueMember: 'id',
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: 37
diff changeset
160 displayMember: '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: 37
diff changeset
161 width: 180,
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: 37
diff changeset
162 height: 23,
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: 37
diff changeset
163 autoDropDownHeight: true
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: 37
diff changeset
164 });
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: 37
diff changeset
165 $("#form").jqxDropDownList({
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: 37
diff changeset
166 theme: theme,
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: 37
diff changeset
167 source: YeastFormAdapter,
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: 37
diff changeset
168 valueMember: 'id',
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: 37
diff changeset
169 displayMember: '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: 37
diff changeset
170 selectedIndex: 0,
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: 37
diff changeset
171 width: 180,
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: 37
diff changeset
172 height: 23,
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: 37
diff changeset
173 autoDropDownHeight: true
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: 37
diff changeset
174 });
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: 37
diff changeset
175 $("#notes").jqxInput({ theme: theme, width: 800, height: 120 });
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
176 $("#best_for").jqxInput({ theme: theme, width: 320, 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: 201
diff changeset
177 $("#inventory").jqxNumberInput( Spin1dec );
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: 37
diff changeset
178 $("#production_date").jqxDateTimeInput( Dateopts );
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: 37
diff changeset
179 $("#min_temperature").jqxNumberInput( YeastT );
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: 37
diff changeset
180 $("#max_temperature").jqxNumberInput( YeastT );
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: 37
diff changeset
181 $("#flocculation").jqxDropDownList({
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: 37
diff changeset
182 theme: theme,
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: 37
diff changeset
183 source: FlocculationAdapter,
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: 37
diff changeset
184 valueMember: 'id',
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: 37
diff changeset
185 displayMember: '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: 37
diff changeset
186 width: 180,
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: 37
diff changeset
187 height: 23,
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: 37
diff changeset
188 autoDropDownHeight: true
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: 37
diff changeset
189 });
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: 201
diff changeset
190 $("#attenuation").jqxNumberInput( Perc1dec );
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: 37
diff changeset
191 $("#max_reuse").jqxNumberInput( PosInt );
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: 37
diff changeset
192 $("#max_reuse").jqxNumberInput({ max: 10 });
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: 201
diff changeset
193 $("#cost").jqxNumberInput( Spin2dec );
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: 37
diff changeset
194 $("#tht_date").jqxDateTimeInput( Dateopts );
269
25696a91b395 Code cleanup
Michiel Broek <mbroek@mbse.eu>
parents: 245
diff changeset
195 $("#totval").jqxNumberInput( Show2dec );
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: 201
diff changeset
196 $("#cells").jqxNumberInput( Spin1dec );
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
197 $("#tolerance").jqxNumberInput( Perc1dec );
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
198 $("#tolerance").jqxNumberInput({ max: 25 });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
199
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
200 // initialize jqxGrid
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
201 $("#jqxgrid").jqxGrid({
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
202 width: 1280,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
203 height: 630,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
204 source: dataAdapter,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
205 theme: theme,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
206 showstatusbar: true,
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
207 renderstatusbar: function(statusbar) {
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
208 var container, addButton, impButton;
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
209 container = $("<div style='overflow: hidden; position: relative; margin: 5px;'></div>");
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
210 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>");
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
211 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>");
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
212 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
213 container.append(impButton);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
214 statusbar.append(container);
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: 37
diff changeset
215 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
216 impButton.jqxButton({ theme: theme, width: 90, height: 20 });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
217 // add new row.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
218 addButton.click(function (event) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
219 editrow = -1;
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: 37
diff changeset
220 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
221 $("#name").val('');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
222 $("#laboratory").val('');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
223 $("#product_id").val('');
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: 37
diff changeset
224 $("#type").val(0);
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: 37
diff changeset
225 $("#form").val(0);
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: 37
diff changeset
226 $("#min_temperature").val(18);
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: 37
diff changeset
227 $("#max_temperature").val(22);
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: 37
diff changeset
228 $("#flocculation").val(0);
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: 37
diff changeset
229 $("#attenuation").val(77);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
230 $("#notes").val('');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
231 $("#best_for").val('');
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: 37
diff changeset
232 $("#max_reuse").val(10);
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: 37
diff changeset
233 $("#inventory").val(0);
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: 37
diff changeset
234 $("#cost").val(0);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
235 $("#production_date").val('');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
236 $("#tht_date").val('');
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
237 $("#cells").val(1);
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
238 $("#tolerance").val(0);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
239 $("#popupWindow").jqxWindow('open');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
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) {
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
242 window.location.href = 'import_ingredients.php?select=yeasts';
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 });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
244 },
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
245 filterable: true,
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
246 filtermode: 'excel',
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
247 columns: [
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
248 { text: 'Laboratorium', datafield: 'laboratory', width: 150 },
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
249 { text: 'Product ID', datafield: 'product_id', width: 120, menu: false },
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
250 { text: 'Gist naam', datafield: 'name', menu: false },
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
251 { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', menu: false, width: 110,
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: 37
diff changeset
252 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
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: 37
diff changeset
253 return "<div style='margin: 4px;' class='jqx-center-align'>" + YeastTypeData[value].nl + "</div>";
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: 37
diff changeset
254 }
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: 37
diff changeset
255 },
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
256 { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', menu: false, width: 110,
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: 37
diff changeset
257 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
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: 37
diff changeset
258 return "<div style='margin: 4px;' class='jqx-center-align'>" + YeastFormData[value].nl + "</div>";
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: 37
diff changeset
259 }
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: 37
diff changeset
260 },
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
261 { text: 'SVG', datafield: 'attenuation', width: 70, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' },
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
262 { text: 'Tol%', datafield: 'tolerance', width: 60, align: 'right', cellsalign: 'right', menu: false,
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
263 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
264 var amount = "";
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
265 if (value > 0)
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
266 amount = dataAdapter.formatNumber(value, "p0");
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
267 return '<span style="margin: 4px; margin-top: 6px; float: right;">' + amount + '</span>';
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
268 }
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
269 },
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: 278
diff changeset
270 { text: 'Voorraad', datafield: 'inventory', width: 100, align: 'right', menu: false,
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
271 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: 278
diff changeset
272 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: 278
diff changeset
273 if (value > 0) {
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: 278
diff changeset
274 if ((rowdata.form == 0) && (value > 1))
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: 278
diff changeset
275 amount = dataAdapter.formatNumber(value,"f0")+" pakken";
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: 278
diff changeset
276 else if (rowdata.form == 0)
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: 278
diff changeset
277 amount = dataAdapter.formatNumber(value,"f0")+" pak";
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: 278
diff changeset
278 else if (rowdata.form == 1)
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: 278
diff changeset
279 amount = dataAdapter.formatNumber(value * 1000,"f1")+" gram";
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: 278
diff changeset
280 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: 278
diff changeset
281 amount = dataAdapter.formatNumber(value * 1000,"f1")+" ml";
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: 278
diff changeset
282 }
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: 278
diff changeset
283 return "<span style='margin: 3px; margin-top: 6px; float: right;'>" + amount + "</span>";
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
284 }
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
285 },
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: 278
diff changeset
286 { text: '', datafield: 'Edit', columntype: 'button', width: 100, align: 'center', menu: false, cellsrenderer: function () {
34
a720353fada9 Formatting and measurements
Michiel Broek <mbroek@mbse.eu>
parents: 33
diff changeset
287 return "Wijzig";
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
288 }, buttonclick: function (row) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
289 // open the popup window when the user clicks a button.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
290 editrow = row;
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: 37
diff changeset
291 $("#popupWindow").jqxWindow({ position: { x: 110, y: 30 } });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
292 // get the clicked row's data and initialize the input fields.
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: 37
diff changeset
293 dataRecord = $("#jqxgrid").jqxGrid('getrowdata', editrow);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
294 $("#name").val(dataRecord.name);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
295 $("#laboratory").val(dataRecord.laboratory);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
296 $("#product_id").val(dataRecord.product_id);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
297 $("#type").val(dataRecord.type);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
298 $("#form").val(dataRecord.form);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
299 $("#min_temperature").val(dataRecord.min_temperature);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
300 $("#max_temperature").val(dataRecord.max_temperature);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
301 $("#flocculation").val(dataRecord.flocculation);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
302 $("#attenuation").val(dataRecord.attenuation);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
303 $("#notes").val(dataRecord.notes);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
304 $("#best_for").val(dataRecord.best_for);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
305 $("#max_reuse").val(dataRecord.max_reuse);
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
306 if (dataRecord.form == 0)
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
307 $("#inventory").val(dataRecord.inventory);
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
308 else
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
309 $("#inventory").val(dataRecord.inventory * 1000);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
310 $("#cost").val(dataRecord.cost);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
311 $("#production_date").val(dataRecord.production_date);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
312 $("#tht_date").val(dataRecord.tht_date);
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
313 $("#cells").val(dataRecord.cells);
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
314 $("#tolerance").val(dataRecord.tolerance);
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
315 calcTotal();
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
316 // show the popup window.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
317 $("#popupWindow").jqxWindow('open');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
318 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
319 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
320 ]
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
321 });
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: 37
diff changeset
322
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
323 $('#popupWindow').on('open', function (event) { calcTotal(); });
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: 37
diff changeset
324 $("#cost").on('change', function (event) {
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: 37
diff changeset
325 dataRecord.cost = parseFloat(event.args.value);
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
326 calcTotal();
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: 37
diff changeset
327 });
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: 37
diff changeset
328 $("#inventory").on('change', function (event) {
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
329 if (dataRecord.form == 0)
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
330 dataRecord.inventory = parseFloat(event.args.value);
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
331 else
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
332 dataRecord.inventory = parseFloat(event.args.value) / 1000.0;
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
333 calcTotal();
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
334 });
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
335 $("#form").on('select', function (event) {
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
336 if (event.args) {
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
337 dataRecord.form = event.args.index;
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
338 calcTotal();
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
339 }
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: 37
diff changeset
340 });
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: 37
diff changeset
341
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
342 // initialize the popup window and buttons.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
343 $("#popupWindow").jqxWindow({
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: 37
diff changeset
344 width: 1050,
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
345 height: 575,
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: 37
diff changeset
346 resizable: false,
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: 37
diff changeset
347 theme: theme,
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: 37
diff changeset
348 isModal: true,
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: 37
diff changeset
349 autoOpen: false,
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: 37
diff changeset
350 cancelButton: $("#Cancel"),
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: 37
diff changeset
351 modalOpacity: 0.40
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
352 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
353 $("#popupWindow").on('open', function () {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
354 $("#name").jqxInput('selectAll');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
355 });
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: 37
diff changeset
356 $("#Delete").jqxButton({ template: "danger", width: '90px', theme: theme });
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
357 $("#Delete").click(function() {
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
358 if (editrow >= 0) {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
359 // Open a popup to confirm this action.
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
360 $('#eventWindow').jqxWindow('open');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
361 $("#delOk").click(function () {
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
362 var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
363 $("#jqxgrid").jqxGrid('deleterow', rowID);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
364 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
365 }
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
366 $("#popupWindow").jqxWindow('hide');
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
367 });
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: 37
diff changeset
368 $("#Cancel").jqxButton({ template: "primary", width: '90px', theme: theme });
314
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
369 $("#Clone").jqxButton({ template: "warning", width: '90px', theme: theme });
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
370 $("#Clone").click(function() {
314
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
371 var row = {
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
372 record: -1,
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
373 name: $("#name").val()+" kopie",
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
374 type: $("#type").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
375 form: $("#form").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
376 laboratory: $("#laboratory").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
377 product_id: $("#product_id").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
378 min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
379 max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
380 flocculation: $("#flocculation").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
381 attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
382 notes: $("#notes").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
383 best_for: $("#best_for").val(),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
384 max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
385 inventory: 0,
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
386 cost: parseFloat($("#cost").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
387 production_date: '',
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
388 tht_date: '',
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
389 cells: parseFloat($("#cells").jqxNumberInput('decimal')),
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
390 tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal'))
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
391 };
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
392 $('#jqxgrid').jqxGrid('addrow', null, row);
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
393 $("#popupWindow").jqxWindow('hide');
f943efa07d9f Added yeast duplicate button
Michiel Broek <mbroek@mbse.eu>
parents: 313
diff changeset
394 });
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: 37
diff changeset
395 $("#Save").jqxButton({ template: "success", width: '90px', theme: theme });
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
396 // update the edited row when the user clicks the 'Save' button.
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
397 $("#Save").click(function() {
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
398 var n_inventory, row, rowID = -1;
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
399 if (editrow >= 0) {
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: 37
diff changeset
400 rowID = $('#jqxgrid').jqxGrid('getrowid', editrow);
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: 37
diff changeset
401 }
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
402 if (dataRecord.form == 0)
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
403 n_inventory = parseFloat($("#inventory").jqxNumberInput('decimal'));
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
404 else
481
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
405 n_inventory = parseFloat($("#inventory").jqxNumberInput('decimal')) / 1000.0;
fc21dcfbe51d Small code optimize for yeast inventory.
Michiel Broek <mbroek@mbse.eu>
parents: 395
diff changeset
406 row = {
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: 37
diff changeset
407 record: rowID,
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: 37
diff changeset
408 name: $("#name").val(),
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: 37
diff changeset
409 type: $("#type").val(),
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: 37
diff changeset
410 form: $("#form").val(),
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: 37
diff changeset
411 laboratory: $("#laboratory").val(),
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: 37
diff changeset
412 product_id: $("#product_id").val(),
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: 37
diff changeset
413 min_temperature: parseInt($("#min_temperature").jqxNumberInput('decimal')),
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: 37
diff changeset
414 max_temperature: parseInt($("#max_temperature").jqxNumberInput('decimal')),
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: 37
diff changeset
415 flocculation: $("#flocculation").val(),
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: 37
diff changeset
416 attenuation: parseFloat($("#attenuation").jqxNumberInput('decimal')),
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: 37
diff changeset
417 notes: $("#notes").val(),
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: 37
diff changeset
418 best_for: $("#best_for").val(),
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: 37
diff changeset
419 max_reuse: parseInt($("#max_reuse").jqxNumberInput('decimal')),
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
420 inventory: n_inventory,
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: 37
diff changeset
421 cost: parseFloat($("#cost").jqxNumberInput('decimal')),
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: 37
diff changeset
422 production_date: $("#production_date").val(),
201
f9b7e3f6be7c Fixed yeast database import differences between grams, ml and packs. Added cells field filled with defaults. Some edit screen improvements. Dynamic prompts depending on the yeast type. Disable men and filter of most columns in the yeasts list. Friendlier display of inverntory.
Michiel Broek <mbroek@mbse.eu>
parents: 200
diff changeset
423 tht_date: $("#tht_date").val(),
313
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
424 cells: parseFloat($("#cells").jqxNumberInput('decimal')),
9f45d09c2071 Added alcohol tolerance field in the yeasts database.
Michiel Broek <mbroek@mbse.eu>
parents: 311
diff changeset
425 tolerance: parseFloat($("#tolerance").jqxNumberInput('decimal'))
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: 37
diff changeset
426 };
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: 37
diff changeset
427 if (editrow >= 0) {
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
428 $('#jqxgrid').jqxGrid('updaterow', rowID, row);
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
429 } else {
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: 37
diff changeset
430 $('#jqxgrid').jqxGrid('addrow', null, row);
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
431 }
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: 37
diff changeset
432 $("#popupWindow").jqxWindow('hide');
14
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
433 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
434 createDelElements();
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
435 });
d9dfd703df83 Added yeast inventory screens
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
436

mercurial