www/js/prod_edit.js

changeset 167
dabcd35f8f92
parent 164
0a5abea575a9
child 169
9a685ee91537
equal deleted inserted replaced
166:635033a29c48 167:dabcd35f8f92
1307 $("#st_abv_max").val(datarecord.abv_max); 1307 $("#st_abv_max").val(datarecord.abv_max);
1308 } 1308 }
1309 }); 1309 });
1310 1310
1311 // Equipemnt dropdown list 1311 // Equipemnt dropdown list
1312 var equipmentUrl = "includes/db_inventory_equipments.php";
1313 var equipmentSource = {
1314 datatype: "json",
1315 datafields: [
1316 { name: 'name', type: 'string' },
1317 { name: 'boil_size', type: 'float' },
1318 { name: 'batch_size', type: 'float' },
1319 { name: 'tun_volume', type: 'float' },
1320 { name: 'tun_weight', type: 'float' },
1321 { name: 'tun_specific_heat', type: 'float' },
1322 { name: 'tun_material', type: 'string' },
1323 { name: 'tun_height', type: 'float' },
1324 { name: 'top_up_water', type: 'float' },
1325 { name: 'trub_chiller_loss', type: 'float' },
1326 { name: 'evap_rate', type: 'float' },
1327 { name: 'boil_time', type: 'float' },
1328 { name: 'calc_boil_volume', type: 'bool' },
1329 { name: 'top_up_kettle', type: 'float' },
1330 { name: 'hop_utilization', type: 'float' },
1331 { name: 'notes', type: 'string' },
1332 { name: 'lauter_volume', type: 'float' },
1333 { name: 'lauter_height', type: 'float' },
1334 { name: 'lauter_deadspace', type: 'float' },
1335 { name: 'kettle_volume', type: 'float' },
1336 { name: 'kettle_height', type: 'float' },
1337 { name: 'mash_volume', type: 'float' },
1338 { name: 'mash_max', type: 'float' },
1339 { name: 'efficiency', type: 'float' }
1340 ],
1341 url: equipmentUrl,
1342 async: true
1343 };
1344 var equipmentlist = new $.jqx.dataAdapter(equipmentSource);
1345 $("#equipmentSelect").jqxDropDownList({ 1312 $("#equipmentSelect").jqxDropDownList({
1346 placeHolder: "Kies apparatuur:", 1313 placeHolder: "Kies apparatuur:",
1347 theme: theme, 1314 theme: theme,
1348 source: equipmentlist, 1315 source: equipmentlist,
1349 displayMember: "name", 1316 displayMember: "name",
1781 // Enable or Disable settings depending on the stage. 1748 // Enable or Disable settings depending on the stage.
1782 if (brewstage > 1) 1749 if (brewstage > 1)
1783 $("#equipmentSelect").jqxDropDownList({ disabled: true }); 1750 $("#equipmentSelect").jqxDropDownList({ disabled: true });
1784 if (brewstage > 0) { 1751 if (brewstage > 0) {
1785 $("#Delete").jqxButton({ disabled: true }); 1752 $("#Delete").jqxButton({ disabled: true });
1786 $("#birth").jqxDateTimeInput({ disabled: true });
1787 } 1753 }
1788 if (brewstage < 3) { 1754 if (brewstage < 3) {
1789 $('#jqxTabs').jqxTabs('disableAt', 9); 1755 $('#jqxTabs').jqxTabs('disableAt', 9);
1790 // If recipe not complete, disable 8 too. 1756 // If recipe not complete, disable 8 too.
1791 // $("#brew_log").jqxButton({ disabled: true }); 1757 // $("#brew_log").jqxButton({ disabled: true });
2910 $("#name").jqxTooltip({ content: 'De naam voor dit product.' }); 2876 $("#name").jqxTooltip({ content: 'De naam voor dit product.' });
2911 $("#name").jqxInput({ theme: theme, width: 640, height: 23 }); 2877 $("#name").jqxInput({ theme: theme, width: 640, height: 23 });
2912 $("#code").jqxTooltip({ content: 'Product code nummer.' }); 2878 $("#code").jqxTooltip({ content: 'Product code nummer.' });
2913 $("#code").jqxInput({ theme: theme, width: 100, height: 23 }); 2879 $("#code").jqxInput({ theme: theme, width: 100, height: 23 });
2914 $("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' }); 2880 $("#birth").jqxTooltip({ content: 'De ontwerp datum van dit product.' });
2915 $("#birth").jqxDateTimeInput({ theme: theme, width: 150, height: 23, formatString: 'yyyy-MM-dd' }); 2881 $("#birth").jqxInput({ theme: theme, width: 120, height: 23 });
2916 $("#stage").jqxTooltip({ content: 'De productie fase van dit product.' }); 2882 $("#stage").jqxTooltip({ content: 'De productie fase van dit product.' });
2917 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 }); 2883 $("#stage").jqxInput({ theme: theme, width: 100, height: 23 });
2918 $("#log_brew").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); 2884 $("#log_brew").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true });
2919 $("#log_fermentation").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true }); 2885 $("#log_fermentation").jqxCheckBox({ theme: theme, width: 120, height: 23, disabled : true });
2920 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 }); 2886 $("#inventory_reduced").jqxCheckBox({ theme: theme, width: 120, height: 23 });

mercurial