July 11, 200719 yr All, I recently upgraded to the latest version. In my older version the check box would not show up if the gCond was met. In the latest version if the gray condition is met only the text is grayed and the check box still appears. How do I hide the check box if gCond is true?Thanx,Tom
July 11, 200719 yr try this cubs:go to your wpiscripts folder. open up your boxes.js file and edit it in notepad.search for this portion of the script. //insert checkbox and label // -- checkbox -- txt += '<input type="checkbox" id="chkbox' + i + '"'; if (uid==null || uid=="") txt += 'name="chkbox' + i + '" '; else txt += 'name="' + uid + '" '; txt += 'onclick="checkDeps(' + i + '); checkCategory(' + i + ');"'; txt += 'onMouseOver="qdh(prog[' + i + '],desc[' + i + '],Style[0]);" '; txt += 'onMouseOut="htm();"'; if (forc !=null && forc=='yes') txt += ' checked'; if ((DoGray && DisableIfDoGray) || (forc != null && forc=='yes')) txt += ' disabled'; txt += (' />\n');and modify it to this: //insert checkbox and label // -- checkbox -- if (!DoGray) {txt += '<input type="checkbox" id="chkbox' + i + '"'; if (uid==null || uid=="") txt += 'name="chkbox' + i + '" '; else txt += 'name="' + uid + '" '; txt += 'onclick="checkDeps(' + i + '); checkCategory(' + i + ');"'; txt += 'onMouseOver="qdh(prog[' + i + '],desc[' + i + '],Style[0]);" '; txt += 'onMouseOut="htm();"'; if (forc !=null && forc=='yes') txt += ' checked'; if ((DoGray && DisableIfDoGray) || (forc != null && forc=='yes')) txt += ' disabled'; txt += (' />\n');}This should give you the desired effect.
July 12, 200719 yr Isn't there an easier way by just going into the options and enabling 'If grayed condition is use, disable the checkbox' ??
July 13, 200719 yr Author Faaip565,Thanx for the fix, worked great! It did however cause a dependency issue with the category check boxes. When an app is already installed there is no check box for the app. When you click on the category check box the rest of the apps become checked but the category check box reamins unchecked and goes into an excluded state (cannot be checked). To remedy, this I changed the following code in the check.js, checkCategory(thisChk) function on line #602...From this if (state && allChked) setChecked(thisCat);To This if (state) setChecked(thisCat);Category problem solved!I also didn't like the reverse dependency which puts a check in the category check box if a child app is selected. I changed the following code in the check.js, checkCategory(thisChk) function on line #580...From this... else //If program checkbox was checked { if (!prog[thisChk]) return; //Ensure checkbox exists thisCat = cat[thisChk].toString(); }To this... else //If program checkbox was checked { if (!prog[thisChk]) return; //Ensure checkbox exists thisCat = false; }Thanx again!!
Create an account or sign in to comment