125 } |
124 } |
126 }); |
125 }); |
127 } |
126 } |
128 }; |
127 }; |
129 var srcType = [ "Grain", "Sugar", "Extract", "Dry Extract", "Adjunct" ]; |
128 var srcType = [ "Grain", "Sugar", "Extract", "Dry Extract", "Adjunct" ]; |
|
129 var srcGraintype = [ "Base", "Crystal", "Special", "Roast", "Kilned", "No malt" ]; |
130 // initialize the input fields. |
130 // initialize the input fields. |
131 $("#name").jqxInput({ theme: theme, width: 250, height: 23 }); |
131 $("#name").jqxInput({ theme: theme, width: 250, height: 23 }); |
132 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 90, height: 23, dropDownHeight: 130 }); |
132 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 100, height: 23, dropDownHeight: 156 }); |
133 $("#yield").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
133 $("#yield").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
134 $("#color").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
134 $("#color").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
135 $("#add_after_boil").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
135 $("#add_after_boil").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
136 $("#origin").jqxInput({ theme: theme, width: 250, height: 23 }); |
136 $("#origin").jqxInput({ theme: theme, width: 250, height: 23 }); |
137 $("#supplier").jqxInput({ theme: theme, width: 250, height: 23 }); |
137 $("#supplier").jqxInput({ theme: theme, width: 250, height: 23 }); |
138 $("#notes").jqxInput({ theme: theme, width: 640, height: 48 }); |
138 $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); |
139 $("#coarse_fine_diff").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
139 $("#coarse_fine_diff").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
140 $("#moisture").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
140 $("#moisture").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
141 $("#diastatic_power").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
141 $("#diastatic_power").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
142 $("#protein").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
142 $("#protein").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
143 $("#max_in_batch").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
143 $("#max_in_batch").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
144 $("#recommend_mash").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
144 $("#recommend_mash").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
145 $("#ibu_gal_per_lb").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
145 $("#ibu_gal_per_lb").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
146 $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
146 $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
147 $("#di_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
147 $("#di_ph").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
148 $("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
148 $("#acid_to_ph_57").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
149 |
149 $("#graintype").jqxDropDownList({ theme: theme, source: srcGraintype, width: 100, height: 23, dropDownHeight: 185 }); |
150 $("#graintype").jqxInput({ theme: theme, width: 250, height: 23 }); |
|
151 |
150 |
152 $("#inventory").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
151 $("#inventory").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
153 $("#production_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
152 $("#production_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
154 |
153 |
155 $("#cost").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 2, spinButtons: true }); |
154 $("#cost").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 2, spinButtons: true }); |
156 $("#tht_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
155 $("#tht_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
157 $("#supplier_rec").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
|
158 // supplier_rec |
|
159 var dataAdapter = new $.jqx.dataAdapter(source); |
156 var dataAdapter = new $.jqx.dataAdapter(source); |
160 var editrow = -1; |
157 var editrow = -1; |
161 // initialize jqxGrid |
158 // initialize jqxGrid |
162 $("#jqxgrid").jqxGrid({ |
159 $("#jqxgrid").jqxGrid({ |
163 width: 1280, |
160 width: 1280, |
194 $("#graintype").val(''); |
191 $("#graintype").val(''); |
195 $("#inventory").val(''); |
192 $("#inventory").val(''); |
196 $("#cost").val(''); |
193 $("#cost").val(''); |
197 $("#production_date").val(''); |
194 $("#production_date").val(''); |
198 $("#tht_date").val(''); |
195 $("#tht_date").val(''); |
199 $("#supplier_rec").val(''); |
|
200 $("#popupWindow").jqxWindow('open'); |
196 $("#popupWindow").jqxWindow('open'); |
201 }); |
197 }); |
202 }, |
198 }, |
203 filterable: true, |
199 filterable: true, |
204 filtermode: 'excel', |
200 filtermode: 'excel', |
205 columns: [ |
201 columns: [ |
206 { text: 'Vergistbaar product', datafield: 'name', width: 250 }, |
202 { text: 'Vergistbaar product', datafield: 'name', width: 250 }, |
207 { text: 'Soort', datafield: 'type', width: 90 }, |
203 { text: 'Soort', datafield: 'type', width: 90 }, |
|
204 { text: 'Mout type', datafield: 'graintype', width: 90 }, |
208 { text: 'Herkomst', datafield: 'origin', width: 150 }, |
205 { text: 'Herkomst', datafield: 'origin', width: 150 }, |
209 { text: 'Producent', datafield: 'supplier', width: 150 }, |
206 { text: 'Producent', datafield: 'supplier', width: 150 }, |
210 { text: 'Kleur', datafield: 'color', width: 70, cellsalign: 'right' }, |
207 { text: 'Kleur', datafield: 'color', width: 70, cellsalign: 'right' }, |
211 { text: 'Opbrengst', datafield: 'yield', width: 70, cellsalign: 'right' }, |
208 { text: 'Opbrengst', datafield: 'yield', width: 70, cellsalign: 'right' }, |
212 { text: 'Inv.', datafield: 'inventory', width: 70, cellsalign: 'right' }, |
209 { text: 'Inv.', datafield: 'inventory', width: 70, cellsalign: 'right' }, |