Jump to content

gCond Check box


Recommended Posts

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


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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...