127 $("#product_id").jqxInput({ theme: theme, width: 120, height: 23 }); |
127 $("#product_id").jqxInput({ theme: theme, width: 120, height: 23 }); |
128 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 90, height: 23, dropDownHeight: 170 }); |
128 $("#type").jqxDropDownList({ theme: theme, source: srcType, width: 90, height: 23, dropDownHeight: 170 }); |
129 $("#form").jqxDropDownList({ theme: theme, source: srcForm, selectedIndex: 0, width: 90, height: 23, dropDownHeight: 195 }); |
129 $("#form").jqxDropDownList({ theme: theme, source: srcForm, selectedIndex: 0, width: 90, height: 23, dropDownHeight: 195 }); |
130 $("#notes").jqxInput({ theme: theme, width: 640, height: 120 }); |
130 $("#notes").jqxInput({ theme: theme, width: 640, height: 120 }); |
131 $("#best_for").jqxInput({ theme: theme, width: 640, height: 23 }); |
131 $("#best_for").jqxInput({ theme: theme, width: 640, height: 23 }); |
132 $("#inventory").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
132 $("#inventory").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 1, spinButtons: true }); |
133 $("#production_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
133 $("#production_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
134 |
134 |
135 $("#min_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 35, decimalDigits: 0, spinButtons: true }); |
135 $("#min_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 35, decimalDigits: 0, spinButtons: true }); |
136 $("#max_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 35, decimalDigits: 0, spinButtons: true }); |
136 $("#max_temperature").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 35, decimalDigits: 0, spinButtons: true }); |
137 $("#flocculation").jqxDropDownList({ theme: theme, source: srcFlocculation, width: 90, height: 23, dropDownHeight: 130 }); |
137 $("#flocculation").jqxDropDownList({ theme: theme, source: srcFlocculation, width: 90, height: 23, dropDownHeight: 130 }); |
138 $("#attenuation").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 50, max: 100, decimalDigits: 1, spinButtons: true }); |
138 $("#attenuation").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 50, max: 100, decimalDigits: 1, spinButtons: true }); |
139 |
139 |
140 $("#max_reuse").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 10, decimalDigits: 0, spinButtons: true }); |
140 $("#max_reuse").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, max: 10, decimalDigits: 0, spinButtons: true }); |
141 $("#cost").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 70, height: 23, min: 0, decimalDigits: 2, spinButtons: true }); |
141 $("#cost").jqxNumberInput({ inputMode: 'simple', spinMode: 'simple', theme: theme, width: 110, height: 23, min: 0, decimalDigits: 2, spinButtons: true }); |
142 $("#tht_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
142 $("#tht_date").jqxDateTimeInput({ theme: theme, width: 100, height: 23, formatString: 'yyyy-MM-dd' }); |
143 |
143 |
144 var dataAdapter = new $.jqx.dataAdapter(source); |
144 var dataAdapter = new $.jqx.dataAdapter(source); |
145 var editrow = -1; |
145 var editrow = -1; |
146 // initialize jqxGrid |
146 // initialize jqxGrid |
181 }); |
181 }); |
182 }, |
182 }, |
183 filterable: true, |
183 filterable: true, |
184 filtermode: 'excel', |
184 filtermode: 'excel', |
185 columns: [ |
185 columns: [ |
186 { text: 'Gist naam', datafield: 'name', width: 250 }, |
186 { text: 'Gist naam', datafield: 'name', width: 350 }, |
187 { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, |
187 { text: 'Laboratorium', datafield: 'laboratory', width: 150 }, |
188 { text: 'Product ID', datafield: 'product_id', width: 120 }, |
188 { text: 'Product ID', datafield: 'product_id', width: 120 }, |
189 { text: 'Type', datafield: 'type', width: 90 }, |
189 { text: 'Type', datafield: 'type', align: 'center', cellsalign: 'center', width: 90 }, |
190 { text: 'Vorm', datafield: 'form', width: 90 }, |
190 { text: 'Vorm', datafield: 'form', align: 'center', cellsalign: 'center', width: 90 }, |
191 { text: 'Voorraad', datafield: 'inventory', width: 70, cellsalign: 'right' }, |
191 { text: 'Vergistingsgraad', datafield: 'attenuation', width: 120, align: 'right', cellsalign: 'right', cellsformat: 'p0' }, |
192 { text: 'Prijs', datafield: 'cost', width: 70, cellsalign: 'right', cellsformat: 'c2' }, |
192 { text: 'Voor. gr/ml', datafield: 'inventory', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'f1' }, |
193 { text: 'Edit', datafield: 'Edit', columntype: 'button', cellsrenderer: function () { |
193 { text: 'Prijs kg/l', datafield: 'cost', width: 100, align: 'right', cellsalign: 'right', cellsformat: 'c2' }, |
|
194 { text: 'Edit', datafield: 'Edit', columntype: 'button', align: 'center', cellsrenderer: function () { |
194 return "Edit"; |
195 return "Edit"; |
195 }, buttonclick: function (row) { |
196 }, buttonclick: function (row) { |
196 // open the popup window when the user clicks a button. |
197 // open the popup window when the user clicks a button. |
197 editrow = row; |
198 editrow = row; |
198 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |
199 $("#popupWindow").jqxWindow({ position: { x: 230, y: 30 } }); |