www/js/profile_water.js

Thu, 10 Feb 2022 22:15:10 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Thu, 10 Feb 2022 22:15:10 +0100
changeset 785
aa79acfdf8a9
parent 768
ae1195153fa2
permissions
-rw-r--r--

Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.

22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 /*****************************************************************************
785
aa79acfdf8a9 Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents: 768
diff changeset
2 * Copyright (C) 2014-2022
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 *
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4 * Michiel Broek <mbroek at mbse dot eu>
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 *
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
6 * This file is part of Brewery Management System
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 *
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8 * This is free software; you can redistribute it and/or modify it
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 * under the terms of the GNU General Public License as published by the
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 * Free Software Foundation; either version 2, or (at your option) any
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11 * later version.
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 *
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 * BrewCloud is distributed in the hope that it will be useful, but
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
16 * General Public License for more details.
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
17 *
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
19 * along with ThermFerm; see the file COPYING. If not, write to the Free
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
20 * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
21 *****************************************************************************/
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
23
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
24 function createDelElements() {
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
25 $('#eventWindow').jqxWindow({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
26 theme: theme,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
27 position: { x: 490, y: 210 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
28 width: 300,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
29 height: 175,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
30 resizable: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
31 isModal: true,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
32 modalOpacity: 0.4,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
33 okButton: $('#delOk'),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
34 cancelButton: $('#delCancel'),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
35 initContent: function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
36 $('#delOk').jqxButton({ template: 'danger', width: '65px', theme: theme });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
37 $('#delCancel').jqxButton({ template: 'success', width: '65px', theme: theme });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
38 $('#delCancel').focus();
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
39 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
40 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
41 $('#eventWindow').jqxWindow('hide');
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
42 }
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
43
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
44
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
45 $(document).ready(function() {
211
63d0e40c58b9 Water profile uses POST instead of GET. Added tooltips to the editor screen. Updated the editor screen. Total alkalinity and Bicarbonate update each other. More and smaller columns in the listing screen. Rearranged the editor screen.
Michiel Broek <mbroek@mbse.eu>
parents: 45
diff changeset
46
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
47 var dataRecord = {},
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
48 url = 'includes/db_profile_water.php',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
49 source = {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
50 datatype: 'json',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
51 cache: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
52 datafields: [
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
53 { name: 'record', type: 'number' },
785
aa79acfdf8a9 Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents: 768
diff changeset
54 { name: 'uuid', type: 'string' },
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
55 { name: 'name', type: 'string' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
56 { name: 'calcium', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
57 { name: 'bicarbonate', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
58 { name: 'sulfate', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
59 { name: 'chloride', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
60 { name: 'sodium', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
61 { name: 'magnesium', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
62 { name: 'ph', type: 'float' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
63 { name: 'notes', type: 'string' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
64 { name: 'total_alkalinity', type: 'float' }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
65 ],
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
66 id: 'record',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
67 url: url,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
68 deleterow: function(rowid, commit) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
69 // synchronize with the server - send delete command
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
70 var data = 'delete=true&' + $.param({ record: rowid });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
71 $.ajax({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
72 dataType: 'json',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
73 url: url,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
74 cache: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
75 data: data,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
76 type: 'POST',
768
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
77 success: function(data) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
78 if (data.error) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
79 console.log('delete: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
80 alert('Fout: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
81 } else {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
82 console.log('delete: success');
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
83 }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
84 location.reload(true);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
85 },
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
86 error: function(jqXHR, textStatus, errorThrown) { commit(false); }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
87 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
88 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
89 addrow: function(rowid, rowdata, position, commit) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
90 var data = 'insert=true&' + $.param(rowdata);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
91 $.ajax({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
92 dataType: 'json',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
93 url: url,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
94 cache: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
95 data: data,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
96 type: 'POST',
768
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
97 success: function(data) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
98 if (data.error) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
99 console.log('insert: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
100 alert('Fout: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
101 } else {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
102 console.log('insert: success');
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
103 }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
104 location.reload(true);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
105 },
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
106 error: function(jqXHR, textStatus, errorThrown) { commit(false); }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
107 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
108 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
109 updaterow: function(rowid, rowdata, commit) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
110 var data = 'update=true&' + $.param(rowdata);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
111 $.ajax({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
112 dataType: 'json',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
113 url: url,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
114 cache: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
115 data: data,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
116 type: 'POST',
768
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
117 success: function(data) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
118 if (data.error) {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
119 console.log('updaterow: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
120 alert('Fout: ' + data.msg);
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
121 } else {
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
122 console.log('updaterow: success');
ae1195153fa2 Better error reporting in profiles fermentation steps, mash profiles, beer styles, water profiles and general setup.
Michiel Broek <mbroek@mbse.eu>
parents: 702
diff changeset
123 }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
124 location.reload(true);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
125 },
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
126 error: function(jqXHR, textStatus, errorThrown) { commit(false); }
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
127 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
128 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
129 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
130 dataAdapter = new $.jqx.dataAdapter(source),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
131 editrow = -1;
494
af28ebe4a779 Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents: 485
diff changeset
132
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
133 // tooltips
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
134 $('#name').jqxTooltip({ content: 'De unieke naam van dit water profiel.' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
135 $('#notes').jqxTooltip({ content: 'Extra opmerkingen over dit water.' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
136 $('#calcium').jqxTooltip({ content: 'Calcium (Ca).' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
137 $('#bicarbonate').jqxTooltip({ content: 'Bicarbonaat (HCO3). Berekend meteen de Totale alkaliteit.' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
138 $('#sulfate').jqxTooltip({ content: 'Calcium Sulfaat (CaSO4).' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
139 $('#chloride').jqxTooltip({ content: 'Chloride (Cl).' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
140 $('#sodium').jqxTooltip({ content: 'Natrium, oftewel keukenzout (Na). In berekeningen ook vaak als Sodium.' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
141 $('#magnesium').jqxTooltip({ content: 'Magnesium (Mg).' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
142 $('#ph').jqxTooltip({ content: 'De zuurgraad (pH).' });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
143 $('#total_alkalinity').jqxTooltip({ content: 'Totale alkaliniteit. Berekend meteen de Bicarbonaat.' });
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
144 $('#balance').jqxTooltip({ content: 'De ionen balans van het water. Ideaal minder dan 0.1 verschil tussen kationen en anionen. Meer dan 0.5 is een fout in het waterraport.' });
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
145
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
146 // initialize the input fields.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
147 $('#name').jqxInput({ theme: theme, width: 640, height: 23 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
148 $('#notes').jqxInput({ theme: theme, width: 800, height: 100 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
149 $('#calcium').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
150 $('#bicarbonate').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
151 $('#sulfate').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
152 $('#chloride').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
153 $('#sodium').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
154 $('#magnesium').jqxNumberInput(Spin1dec);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
155 $('#ph').jqxNumberInput(Spin2pH);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
156 $('#total_alkalinity').jqxNumberInput(Spin1dec);
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
157 $('#balance').jqxNumberInput(Show2dec);
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
158
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
159 // initialize jqxGrid
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
160 $('#jqxgrid').jqxGrid({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
161 width: 1280,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
162 height: 630,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
163 source: dataAdapter,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
164 theme: theme,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
165 showstatusbar: true,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
166 renderstatusbar: function(statusbar) {
702
f0896a6f9b64 Add total count in the statusbar for inventory and profile databases.
Michiel Broek <mbroek@mbse.eu>
parents: 701
diff changeset
167 var rowCount = $("#jqxgrid").jqxGrid('getrows').length;
f0896a6f9b64 Add total count in the statusbar for inventory and profile databases.
Michiel Broek <mbroek@mbse.eu>
parents: 701
diff changeset
168 statusbar.append('<div style="float: left; margin: 8px; color: orange !important;">Aantal items: ' + rowCount + '</div>');
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
169 var container = $('<div style="overflow: hidden; position: relative; margin: 5px;"></div>'),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
170 addButton = $('<div style="float: right; margin-right: 15px;"><img style="position: relative; margin-top: 2px;" ' +
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
171 'src="images/add.png"/><span style="margin-left: 4px; position: relative; top: -4px;">Nieuw</span></div>');
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
172 container.append(addButton);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
173 statusbar.append(container);
701
3ce3df681be0 Changed inventory and profile databases filtering.
Michiel Broek <mbroek@mbse.eu>
parents: 662
diff changeset
174 addButton.jqxButton({ theme: theme, width: 90, height: 17 });
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
175 // add new row.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
176 addButton.click(function(event) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
177 editrow = -1;
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
178 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } });
785
aa79acfdf8a9 Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents: 768
diff changeset
179 dataRecord.uuid = '';
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
180 $('#name').val('');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
181 $('#calcium').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
182 $('#bicarbonate').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
183 $('#sulfate').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
184 $('#chloride').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
185 $('#sodium').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
186 $('#magnesium').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
187 $('#ph').val(7);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
188 $('#notes').val('');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
189 $('#total_alkalinity').val(0);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
190 $('#popupWindow').jqxWindow('open');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
191 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
192 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
193 filterable: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
194 filtermode: 'excel',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
195 columns: [
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
196 { text: 'Water Profiel', datafield: 'name', width: 225 },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
197 { text: 'Opmerkingen', datafield: 'notes' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
198 { text: 'Ca', datafield: 'calcium', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
199 { text: 'Mg', datafield: 'magnesium', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
200 { text: 'Na', datafield: 'sodium', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
201 { text: 'CaCO3', datafield: 'total_alkalinity', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
202 { text: 'Cl', datafield: 'chloride', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
203 { text: 'SO4', datafield: 'sulfate', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
204 { text: 'pH', datafield: 'ph', width: 60, align: 'right', cellsalign: 'right', cellsformat: 'f1' },
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
205 { text: '', datafield: 'Edit', width: 100, columntype: 'button',
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
206 cellsrenderer: function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
207 return 'Wijzig';
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
208 }, buttonclick: function(row) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
209 // open the popup window when the user clicks a button.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
210 editrow = row;
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
211 $('#popupWindow').jqxWindow({ position: { x: 110, y: 30 } });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
212 // get the clicked row's data and initialize the input fields.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
213 dataRecord = $('#jqxgrid').jqxGrid('getrowdata', editrow);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
214 $('#name').val(dataRecord.name);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
215 $('#calcium').val(dataRecord.calcium);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
216 $('#bicarbonate').val(dataRecord.bicarbonate);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
217 $('#sulfate').val(dataRecord.sulfate);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
218 $('#chloride').val(dataRecord.chloride);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
219 $('#sodium').val(dataRecord.sodium);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
220 $('#magnesium').val(dataRecord.magnesium);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
221 $('#ph').val(dataRecord.ph);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
222 $('#notes').val(dataRecord.notes);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
223 $('#total_alkalinity').val(dataRecord.total_alkalinity);
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
224 calcBalance();
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
225 // show the popup window.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
226 $('#popupWindow').jqxWindow('open');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
227 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
228 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
229 ]
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
230 });
211
63d0e40c58b9 Water profile uses POST instead of GET. Added tooltips to the editor screen. Updated the editor screen. Total alkalinity and Bicarbonate update each other. More and smaller columns in the listing screen. Rearranged the editor screen.
Michiel Broek <mbroek@mbse.eu>
parents: 45
diff changeset
231
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
232 function calcBalance() {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
233 var cations = (dataRecord.calcium / 20.039) + (dataRecord.magnesium / 12.1525) + (dataRecord.sodium / 22.989);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
234 var anions = (dataRecord.bicarbonate / 61.016) + (dataRecord.sulfate / 48.031) + (dataRecord.chloride / 35.4527);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
235 var balance = Round(cations - anions, 2);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
236 $('#balance').val(balance);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
237 if (balance <= 0.1 && balance >= -0.1)
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
238 $('#wr_balance').html("<img src='images/dialog-ok-apply.png'>");
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
239 else if (balance <= 0.5 && balance >= -0.5)
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
240 $('#wr_balance').html("<img src='images/dialog-ok.png'>");
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
241 else
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
242 $('#wr_balance').html("<img src='images/dialog-error.png'>");
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
243 }
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
244
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
245 $('#calcium').on('change', function(event) {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
246 dataRecord.calcium = parseFloat(event.args.value);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
247 calcBalance();
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
248 });
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
249 $('#magnesium').on('change', function(event) {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
250 dataRecord.magnesium = parseFloat(event.args.value);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
251 calcBalance();
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
252 });
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
253 $('#sodium').on('change', function(event) {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
254 dataRecord.sodium = parseFloat(event.args.value);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
255 calcBalance();
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
256 });
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
257 $('#total_alkalinity').on('change', function(event) {
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
258 dataRecord.total_alkalinity = parseFloat(event.args.value);
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
259 dataRecord.bicarbonate = parseFloat(event.args.value) * 1.22;
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
260 $('#bicarbonate').val(dataRecord.bicarbonate);
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
261 calcBalance();
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
262 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
263 $('#bicarbonate').on('change', function(event) {
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
264 dataRecord.bicarbonate = parseFloat(event.args.value);
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
265 dataRecord.total_alkalinity = parseFloat(event.args.value) * 50 / 61;
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
266 $('#total_alkalinity').val(dataRecord.total_alkalinity);
662
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
267 calcBalance();
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
268 });
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
269 $('#sulfate').on('change', function(event) {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
270 dataRecord.sulfate = parseFloat(event.args.value);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
271 calcBalance();
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
272 });
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
273 $('#chloride').on('change', function(event) {
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
274 dataRecord.chloride = parseFloat(event.args.value);
4bb005694ce7 Version 0.3.32 Inventory water and profile water edit screens updated and added ion balance fields. Moved acid specs to global.js. In prod_edit and rec_edit changed the water calculations, eliminated the double percentage calculation. The pH values in the water tab have now 2 decimal digits. The mash pH field is only shown in auto calculate mode. The calculated acid addition results are now a bit better and compare with several famous spreadsheets.
Michiel Broek <mbroek@mbse.eu>
parents: 522
diff changeset
275 calcBalance();
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
276 });
211
63d0e40c58b9 Water profile uses POST instead of GET. Added tooltips to the editor screen. Updated the editor screen. Total alkalinity and Bicarbonate update each other. More and smaller columns in the listing screen. Rearranged the editor screen.
Michiel Broek <mbroek@mbse.eu>
parents: 45
diff changeset
277
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
278 // initialize the popup window and buttons.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
279 $('#popupWindow').jqxWindow({
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
280 width: 1050,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
281 height: 550,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
282 resizable: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
283 theme: theme,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
284 isModal: true,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
285 autoOpen: false,
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
286 cancelButton: $('#Cancel'),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
287 modalOpacity: 0.40
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
288 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
289 $('#popupWindow').on('open', function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
290 $('#name').jqxInput('selectAll');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
291 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
292 $('#Delete').jqxButton({ template: 'danger', width: '90px', theme: theme });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
293 $('#Delete').click(function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
294 if (editrow >= 0) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
295 // Open a popup to confirm this action.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
296 $('#eventWindow').jqxWindow('open');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
297 $('#delOk').click(function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
298 var rowID = $('#jqxgrid').jqxGrid('getrowid', editrow);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
299 $('#jqxgrid').jqxGrid('deleterow', rowID);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
300 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
301 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
302 $('#popupWindow').jqxWindow('hide');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
303 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
304 $('#Cancel').jqxButton({ template: 'primary', width: '90px', theme: theme });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
305 $('#Save').jqxButton({ template: 'success', width: '90px', theme: theme });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
306 // update the edited row when the user clicks the 'Save' button.
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
307 $('#Save').click(function() {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
308 var row, rowID = -1;
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
309 if (editrow >= 0) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
310 rowID = $('#jqxgrid').jqxGrid('getrowid', editrow);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
311 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
312 row = {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
313 record: rowID,
785
aa79acfdf8a9 Added uuid field in inventory equipments, fermentables, hops, miscs, suppliers, water and yeasts. Added uuid field in profiles mash, styles and water.
Michiel Broek <mbroek@mbse.eu>
parents: 768
diff changeset
314 uuid: dataRecord.uuid,
522
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
315 name: $('#name').val(),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
316 calcium: parseFloat($('#calcium').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
317 bicarbonate: parseFloat($('#bicarbonate').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
318 sulfate: parseFloat($('#sulfate').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
319 chloride: parseFloat($('#chloride').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
320 sodium: parseFloat($('#sodium').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
321 magnesium: parseFloat($('#magnesium').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
322 ph: parseFloat($('#ph').jqxNumberInput('decimal')),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
323 notes: $('#notes').val(),
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
324 total_alkalinity: parseFloat($('#total_alkalinity').jqxNumberInput('decimal'))
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
325 };
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
326 if (editrow >= 0) {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
327 $('#jqxgrid').jqxGrid('updaterow', rowID, row);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
328 } else {
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
329 $('#jqxgrid').jqxGrid('addrow', null, row);
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
330 }
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
331 $('#popupWindow').jqxWindow('hide');
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
332 });
35675eadc655 Removed yui-compressor on javascript files.
Michiel Broek <mbroek@mbse.eu>
parents: 494
diff changeset
333 createDelElements();
22
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
334 });
99c02fa797f9 Added inventory water profiles
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
335

mercurial