187 }, |
187 }, |
188 columns: [ |
188 columns: [ |
189 { text: 'Stap naam', datafield: 'name' }, |
189 { text: 'Stap naam', datafield: 'name' }, |
190 { text: 'Min. °C', datafield: 'target_lo', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
190 { text: 'Min. °C', datafield: 'target_lo', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
191 validation: function(cell, value) { |
191 validation: function(cell, value) { |
192 if (value < 0 || value > 50) { |
192 if (value < 0 || value > 45) { |
193 return { result: false, message: 'De temperatuur moet tussen 0 en 50 zijn.' }; |
193 return { result: false, message: 'De temperatuur moet tussen 0 en 45 zijn.' }; |
194 } |
194 } |
195 return true; |
195 return true; |
196 } |
196 } |
197 }, |
197 }, |
198 { text: 'Max. °C', datafield: 'target_hi', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
198 { text: 'Max. °C', datafield: 'target_hi', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1', |
199 validation: function(cell, value) { |
199 validation: function(cell, value) { |
200 if (value < 0 || value > 50) { |
200 if (value < 0 || value > 45) { |
201 return { result: false, message: 'De temperatuur moet tussen 0 en 50 zijn.' }; |
201 return { result: false, message: 'De temperatuur moet tussen 0 en 45 zijn.' }; |
202 } |
202 } |
203 return true; |
203 return true; |
204 } |
204 } |
205 }, |
205 }, |
206 { text: 'Koelkast', datafield: 'fridgemode', columntype: 'checkbox', width: 80 }, |
206 { text: 'Koelkast', datafield: 'fridgemode', columntype: 'checkbox', width: 80 }, |
225 }; |
225 }; |
226 |
226 |
227 // initialize the input fields. |
227 // initialize the input fields. |
228 $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); |
228 $('#name').jqxInput({ theme: theme, width: 640, height: 23 }); |
229 $('#inittemp_lo').jqxNumberInput(Spin1dec); |
229 $('#inittemp_lo').jqxNumberInput(Spin1dec); |
230 $('#inittemp_lo').jqxNumberInput({ max: 40 }); |
230 $('#inittemp_lo').jqxNumberInput({ max: 45 }); |
231 $('#inittemp_hi').jqxNumberInput(Spin1dec); |
231 $('#inittemp_hi').jqxNumberInput(Spin1dec); |
232 $('#inittemp_hi').jqxNumberInput({ max: 40 }); |
232 $('#inittemp_hi').jqxNumberInput({ max: 45 }); |
233 $('#fridgemode').jqxCheckBox({ theme: theme, height: 23, enableContainerClick: false }); |
233 $('#fridgemode').jqxCheckBox({ theme: theme, height: 23, enableContainerClick: false }); |
234 |
234 |
235 // initialize jqxGrid |
235 // initialize jqxGrid |
236 $('#jqxgrid').jqxGrid({ |
236 $('#jqxgrid').jqxGrid({ |
237 width: 1280, |
237 width: 1280, |