external/qunit/qunit.js
function selectionChange( evt ) {
		var i,
			checkbox = evt && evt.target || allCheckbox,
			modulesList = dropDownList.getElementsByTagName( "input" ),
			selectedNames = [];

		toggleClass( checkbox.parentNode, "checked", checkbox.checked );

		dirty = false;
		if ( checkbox.checked && checkbox !== allCheckbox ) {
		   allCheckbox.checked = false;
		   removeClass( allCheckbox.parentNode, "checked" );
		}
		for ( i = 0; i < modulesList.length; i++ )  {
			if ( !evt ) {
				toggleClass( modulesList[ i ].parentNode, "checked", modulesList[ i ].checked );
			} else if ( checkbox === allCheckbox && checkbox.checked ) {
				modulesList[ i ].checked = false;
				removeClass( modulesList[ i ].parentNode, "checked" );
			}
			dirty = dirty || ( checkbox.checked !== checkbox.defaultChecked );
			if ( modulesList[ i ].checked ) {
				selectedNames.push( modulesList[ i ].parentNode.textContent );
			}
		}

		commit.style.display = reset.style.display = dirty ? "" : "none";
		moduleSearch.placeholder = selectedNames.join( ", " ) || allCheckbox.parentNode.textContent;
		moduleSearch.title = "Type to filter list. Current selection:\n" +
			( selectedNames.join( "\n" ) || allCheckbox.parentNode.textContent );
	}
function selectionChange( evt ) {
		var i,
			checkbox = evt && evt.target || allCheckbox,
			modulesList = dropDownList.getElementsByTagName( "input" ),
			selectedNames = [];

		toggleClass( checkbox.parentNode, "checked", checkbox.checked );

		dirty = false;
		if ( checkbox.checked && checkbox !== allCheckbox ) {
		   allCheckbox.checked = false;
		   removeClass( allCheckbox.parentNode, "checked" );
		}
		for ( i = 0; i < modulesList.length; i++ )  {
			if ( !evt ) {
				toggleClass( modulesList[ i ].parentNode, "checked", modulesList[ i ].checked );
			} else if ( checkbox === allCheckbox && checkbox.checked ) {
				modulesList[ i ].checked = false;
				removeClass( modulesList[ i ].parentNode, "checked" );
			}
			dirty = dirty || ( checkbox.checked !== checkbox.defaultChecked );
			if ( modulesList[ i ].checked ) {
				selectedNames.push( modulesList[ i ].parentNode.textContent );
			}
		}

		commit.style.display = reset.style.display = dirty ? "" : "none";
		moduleSearch.placeholder = selectedNames.join( ", " ) || allCheckbox.parentNode.textContent;
		moduleSearch.title = "Type to filter list. Current selection:\n" +
			( selectedNames.join( "\n" ) || allCheckbox.parentNode.textContent );
	}
function selectionChange ( evt ) { var i , checkbox = evt && evt . target || allCheckbox , modulesList = dropDownList . getElementsByTagName ( "input" ) , selectedNames = [ ] ; toggleClass ( checkbox . parentNode , "checked" , checkbox . checked ) ; dirty = false ; if ( checkbox . checked && checkbox !== allCheckbox ) { allCheckbox . checked = false ; removeClass ( allCheckbox . parentNode , "checked" ) ; } for ( i = 0 ; i < modulesList . length ; i ++ ) { if ( ! evt ) { toggleClass ( modulesList [ i ] . parentNode , "checked" , modulesList [ i ] . checked ) ; } else if ( checkbox === allCheckbox && checkbox . checked ) { modulesList [ i ] . checked = false ; removeClass ( modulesList [ i ] . parentNode , "checked" ) ; } dirty = dirty || ( checkbox . checked !== checkbox . defaultChecked ) ; if ( modulesList [ i ] . checked ) { selectedNames . push ( modulesList [ i ] . parentNode . textContent ) ; } } commit . style . display = reset . style . display = dirty ? "" : "none" ; moduleSearch . placeholder = selectedNames . join ( ", " ) || allCheckbox . parentNode . textContent ; moduleSearch . title = "Type to filter list. Current selection:\n" + ( selectedNames . join ( "\n" ) || allCheckbox . parentNode . textContent ) ; }
Processes selection changes
Processes selection changes