MSFN Forum: How can i have some items selected - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How can i have some items selected when i choose none from drop down menu Rate Topic: -----

#1 User is offline   colornokia 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 30-July 04

Posted 31 July 2006 - 04:39 AM

I always need to have two items selected for installation, so is it possible that they can stay always selected even when i change the default installation selection to none. Regards


#2 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,756
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 31 July 2006 - 04:57 AM

That is what the "Force" option is for...

#3 User is offline   colornokia 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 30-July 04

Posted 31 July 2006 - 05:18 AM

Hmmm,I think that i made this long time ago. The syntax is forc[pn]=['yes'], is it OK? I just cut off my config so i left only the 2 items which I need to be selected always and a dummy one (MS office). Here it is the config.

Attached File(s)



#4 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,756
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 31 July 2006 - 05:52 AM

Yup you got it right...

#5 User is offline   colornokia 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 30-July 04

Posted 31 July 2006 - 06:14 AM

However I can't make it working. I just added my config to a non touched wpi 5.2 and i get the result on the screenshot below

Posted Image
Is this my fault or something else?

#6 User is offline   Kelsenellenelvian 

  • WPI Guru
  • Group: Developers
  • Posts: 7,756
  • Joined: 18-September 03
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 31 July 2006 - 06:29 AM

As long as you have selected force installation on exit in the menu it will install them, it may not show them checked but it will install them...

#7 User is offline   colornokia 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 30-July 04

Posted 31 July 2006 - 06:42 AM

It's just exiting... very strange indeed
Just tried mritter's config (there are 2 forced installations there) and when i select none and press install there is no installation windows. Now i don't know what to think...

#8 User is offline   sadicq 

  • noob
  • PipPip
  • Group: Members
  • Posts: 273
  • Joined: 17-August 05

Posted 31 July 2006 - 06:56 AM

Make sure the force checkbox is cheked in options.
Posted Image

#9 User is offline   colornokia 

  • Newbie
  • Group: Members
  • Posts: 38
  • Joined: 30-July 04

Posted 31 July 2006 - 08:27 AM

View Postsadicq, on Jul 31 2006, 03:56 PM, said:

Make sure the force checkbox is cheked in options.
Posted Image

Thanks, that made it! I hope that i didn't take much your time.

#10 User is offline   zorphnog 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 427
  • Joined: 25-July 06

Posted 31 July 2006 - 03:47 PM

Please look at http://www.msfn.org/...showtopic=80015 for updated enhancement
Ok. This was really bothering me that it was unchecking the programs that were going to install by default anyway. In my opinion this is a bug, the user should not be able to uncheck an item that is going to install no matter what. So I made a fix that will not uncheck the programs that have the FORCE option set. Additionally, it will not uncheck the FORCED programs when Select None is clicked. This way the user KNOWS that these programs are going to be installed. This would also help out with the overall interface. Now there is no need for the Force installations on exit option, because the FORCED programs will never become unchecked. I hope this is useful. I haven't tested it extensively, so let me know if there are any problems. The two files changed are Check.js and Boxes.js. If you want to know what I changed let me know and I'll post the individual changes.



edit: Well actually the installation on exit is still useful so disregard that comment.

Changes:

In boxes.js modify lines 139 and 144 from the original 5.2 boxes.js file to:
txt += 'onclick="checkDeps(' + i + '); checkCategory(' + i + '); checkForce(' + i + ')"';


In check.js make the following changes:

1. In the setUnchecked function add
if (forc[i]!=null && forc[i]=='yes')
	return;

in the else clause after
if (elem==null) 
	return;


2. Add the following function:
function checkForce(i)
{
	position="check.js";	
	whatfunc="checkForce()";

	var elem = document.getElementById("chkbox"+i);

	if(forc[i]!=null && forc[i]=='yes')
		elem.checked='yes';
}

This post has been edited by zorphnog: 03 August 2006 - 12:06 PM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy