132 }); |
132 }); |
133 } |
133 } |
134 }; |
134 }; |
135 // initialize the input fields. |
135 // initialize the input fields. |
136 $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); |
136 $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); |
137 $("#alpha").jqxNumberInput( Perc1dec1 ); |
137 $("#alpha").jqxNumberInput( Perc1dec ); |
138 $("#beta").jqxNumberInput( Perc1dec1 ); |
138 $("#beta").jqxNumberInput( Perc1dec ); |
139 $("#humulene").jqxNumberInput( Perc1dec1 ); |
139 $("#humulene").jqxNumberInput( Perc1dec ); |
140 $("#caryophyllene").jqxNumberInput( Perc1dec1 ); |
140 $("#caryophyllene").jqxNumberInput( Perc1dec ); |
141 $("#cohumulone").jqxNumberInput( Perc1dec1 ); |
141 $("#cohumulone").jqxNumberInput( Perc1dec ); |
142 $("#myrcene").jqxNumberInput( Perc1dec1 ); |
142 $("#myrcene").jqxNumberInput( Perc1dec ); |
143 $("#hsi").jqxNumberInput( Perc1dec5 ); |
143 $("#hsi").jqxNumberInput( Perc1dec ); |
144 |
144 |
145 $("#type").jqxDropDownList({ |
145 $("#type").jqxDropDownList({ |
146 theme: theme, |
146 theme: theme, |
147 source: HopTypeAdapter, |
147 source: HopTypeAdapter, |
148 valueMember: 'id', |
148 valueMember: 'id', |
162 }); |
162 }); |
163 $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); |
163 $("#notes").jqxInput({ theme: theme, width: 640, height: 100 }); |
164 $("#origin").jqxInput({ theme: theme, width: 320, height: 23 }); |
164 $("#origin").jqxInput({ theme: theme, width: 320, height: 23 }); |
165 $("#substitutes").jqxInput({ theme: theme, width: 320, height: 23 }); |
165 $("#substitutes").jqxInput({ theme: theme, width: 320, height: 23 }); |
166 $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
166 $("#always_on_stock").jqxCheckBox({ theme: theme, width: 120, height: 23 }); |
167 $("#inventory").jqxNumberInput( Spin1dec1 ); |
167 $("#inventory").jqxNumberInput( Spin1dec ); |
168 $("#production_date").jqxDateTimeInput( Dateopts ); |
168 $("#production_date").jqxDateTimeInput( Dateopts ); |
169 $("#cost").jqxNumberInput( Spin2dec1 ); |
169 $("#cost").jqxNumberInput( Spin2dec ); |
170 $("#tht_date").jqxDateTimeInput( Dateopts ); |
170 $("#tht_date").jqxDateTimeInput( Dateopts ); |
171 $("#total_oil").jqxNumberInput( Perc1dec1 ); |
171 $("#total_oil").jqxNumberInput( Perc1dec ); |
172 $("#totval").jqxNumberInput( Spin2dec1 ); |
172 $("#totval").jqxNumberInput( Spin2dec ); |
173 $("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false }); |
173 $("#totval").jqxNumberInput({ width: 90, readOnly: true, spinButtons: false }); |
174 |
174 |
175 var dataAdapter = new $.jqx.dataAdapter(source); |
175 var dataAdapter = new $.jqx.dataAdapter(source); |
176 var editrow = -1; |
176 var editrow = -1; |
177 // initialize jqxGrid |
177 // initialize jqxGrid |