cubs4vr Posted July 11, 2007 Share Posted July 11, 2007 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 Link to comment Share on other sites More sharing options...
faaip565 Posted July 11, 2007 Share Posted July 11, 2007 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. Link to comment Share on other sites More sharing options...
JuMz Posted July 12, 2007 Share Posted July 12, 2007 Isn't there an easier way by just going into the options and enabling 'If grayed condition is use, disable the checkbox' ?? Link to comment Share on other sites More sharing options...
faaip565 Posted July 12, 2007 Share Posted July 12, 2007 that doesn't make the checkbox disappear it just fades out a bit i believe. Link to comment Share on other sites More sharing options...
JuMz Posted July 12, 2007 Share Posted July 12, 2007 Correct. But its not clickable...I guess making it disappear is a good idea... Link to comment Share on other sites More sharing options...
cubs4vr Posted July 13, 2007 Author Share Posted July 13, 2007 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!! Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now