www/js/inv_hops.js

changeset 514
3c680d1dea35
parent 488
77f1617b6994
child 528
202272a28052
equal deleted inserted replaced
513:217ba4596c4d 514:3c680d1dea35
63 { name: 'humulene', type: 'float' }, 63 { name: 'humulene', type: 'float' },
64 { name: 'caryophyllene', type: 'float' }, 64 { name: 'caryophyllene', type: 'float' },
65 { name: 'cohumulone', type: 'float' }, 65 { name: 'cohumulone', type: 'float' },
66 { name: 'myrcene', type: 'float' }, 66 { name: 'myrcene', type: 'float' },
67 { name: 'hsi', type: 'float' }, 67 { name: 'hsi', type: 'float' },
68 { name: 'type', type: 'int' }, 68 { name: 'type', type: 'string' },
69 { name: 'form', type: 'int' }, 69 { name: 'form', type: 'string' },
70 { name: 'notes', type: 'string' }, 70 { name: 'notes', type: 'string' },
71 { name: 'origin', type: 'string' }, 71 { name: 'origin', type: 'string' },
72 { name: 'substitutes', type: 'string' }, 72 { name: 'substitutes', type: 'string' },
73 { name: 'always_on_stock', type: 'int' }, 73 { name: 'always_on_stock', type: 'int' },
74 { name: 'inventory', type: 'float' }, 74 { name: 'inventory', type: 'float' },
146 $("#hsi").jqxNumberInput( Perc1dec ); 146 $("#hsi").jqxNumberInput( Perc1dec );
147 147
148 $("#type").jqxDropDownList({ 148 $("#type").jqxDropDownList({
149 theme: theme, 149 theme: theme,
150 source: HopTypeAdapter, 150 source: HopTypeAdapter,
151 valueMember: 'id', 151 valueMember: 'nl',
152 displayMember: 'nl', 152 displayMember: 'nl',
153 width: 150, 153 width: 150,
154 height: 23, 154 height: 23,
155 autoDropDownHeight: true 155 autoDropDownHeight: true
156 }); 156 });
157 $("#form").jqxDropDownList({ 157 $("#form").jqxDropDownList({
158 theme: theme, 158 theme: theme,
159 source: HopFormAdapter, 159 source: HopFormAdapter,
160 valueMember: 'id', 160 valueMember: 'nl',
161 displayMember: 'nl', 161 displayMember: 'nl',
162 width: 150, 162 width: 150,
163 height: 23, 163 height: 23,
164 autoDropDownHeight: true 164 autoDropDownHeight: true
165 }); 165 });
201 $("#humulene").val(0); 201 $("#humulene").val(0);
202 $("#caryophyllene").val(0); 202 $("#caryophyllene").val(0);
203 $("#cohumulone").val(0); 203 $("#cohumulone").val(0);
204 $("#myrcene").val(0); 204 $("#myrcene").val(0);
205 $("#hsi").val(0); 205 $("#hsi").val(0);
206 $("#type").val(0); 206 $("#type").val('Bitterhop');
207 $("#form").val(0); 207 $("#form").val('Pellets');
208 $("#notes").val(''); 208 $("#notes").val('');
209 $("#origin").val(''); 209 $("#origin").val('');
210 $("#substitutes").val(''); 210 $("#substitutes").val('');
211 $("#always_on_stock").val(0); 211 $("#always_on_stock").val(0);
212 $("#inventory").val(0); 212 $("#inventory").val(0);
223 filterable: true, 223 filterable: true,
224 filtermode: 'excel', 224 filtermode: 'excel',
225 columns: [ 225 columns: [
226 { text: 'Herkomst', datafield: 'origin', width: 150 }, 226 { text: 'Herkomst', datafield: 'origin', width: 150 },
227 { text: 'Hop Naam', datafield: 'name', menu: false }, 227 { text: 'Hop Naam', datafield: 'name', menu: false },
228 { text: 'Soort', datafield: 'type', align: 'left', menu: false, width: 90, 228 { text: 'Soort', datafield: 'type', align: 'left', width: 90 },
229 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) { 229 { text: 'Vorm', datafield: 'form', align: 'left', width: 90 },
230 return '<span style="margin: 4px; margin-top: 6px; float: left;">' + HopTypeData[value].nl + '</span>';
231 }
232 },
233 { text: 'Vorm', datafield: 'form', align: 'left', menu: false, width: 90,
234 cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
235 return '<span style="margin: 4px; margin-top: 6px; float: left;">' + HopFormData[value].nl + '</span>';
236 }
237 },
238 { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, 230 { text: 'Alpha %', datafield: 'alpha', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' },
239 { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, 231 { text: 'Beta %', datafield: 'beta', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' },
240 { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' }, 232 { text: 'Cohumuloon %%', datafield: 'cohumulone', width: 80, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'p1' },
241 { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1' }, 233 { text: 'HSI', datafield: 'hsi', width: 60, align: 'right', cellsalign: 'right', menu: false, cellsformat: 'f1' },
242 { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', menu: false, width: 110 }, 234 { text: 'Oogst datum', datafield: 'production_date', align: 'center', cellsalign: 'center', menu: false, width: 110 },

mercurial