<commit_before><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQuery Mobile Button Markup Tester</title>
	<link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />
	<link rel="stylesheet" href="../../docs/_assets/css/jqm-docs.css" />
	<script src="../../js/jquery.tag.inserter.js"></script>
	<script src="../../js"></script>
	<script>
( function( $, undefined ) {
	var counter = 0;
	$( document ).bind( "pageinit", function( e ) {
		$( "#prepend,#append", e.target ).bind( "click", function( e ) {
			counter++;
			var widgetType = $( "[name='radio-widget']:checked" ).attr( "id" ),
				grp = $( "#controlgroup" ),
				op = $( "[name='radio-op']:checked" ).attr( "id" ),
				$el;

			if ( widgetType === "link" ) {
				$el = $( "<a href='#'>Remove " + counter + "</a>" ).bind( "click", function( e ) { $el[op](); grp.controlgroup( "refresh" ); } );
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$el.buttonMarkup();
			} else if ( widgetType === "select" ) {
				$el = $( "<label for='widget" + counter + "'>Select " + counter + "</label><select id='widget" + counter + "'><option id='widget" + counter + "' value='default'>Select " + counter + "</option><option value='remove'>Remove</option></select>" );
				$( $el[ 1 ] ).bind( "change", function( e ) { $el[op](); grp.controlgroup( "refresh" ); });
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$( $el[ 1 ] ).selectmenu();
			} else {
				$el = $( "<label for='widget" + counter + "'>Remove " + counter + "</label><input type='checkbox' id='widget" + counter + "'></input>" );
				$( $el[ 1 ] ).bind( "change", function( e ) { $el[op](); grp.controlgroup( "refresh" ); });
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$( $el[ 1 ] ).checkboxradio();
			}

			grp.controlgroup( "refresh" );
		});
		$( "#isHorizontal" ).bind( "change", function( e ) {
			$( "#controlgroup" ).controlgroup( "option", "type", ( $( "#isHorizontal" ).is( ":checked" ) ? "horizontal" : "vertical" ) );
		});
	});
})( jQuery );
	</script>
</head>

<body>
	<div data-role="page">
		<div data-role="header">
			<h1>Controlroup Dynamic Modification</h1>
		</div>
		<div data-role="contents">
			<div class="ui-grid-a">
				<div class="ui-block-a">
					<div data-role="controlgroup" id="controlgroup">
					</div>
				</div>
				<div class="ui-block-b">
					<a href="#" id="prepend" data-role="button" data-corners="true" data-inline="true">Prepend</a>
					<a href="#" id="append" data-role="button" data-corners="true" data-inline="true">Append</a>
					<form action="#" method="get">
	  				<fieldset data-role="controlgroup" data-type="horizontal">
	    				<legend>Widget type</legend>
	        				<input type="radio" name="radio-widget" id="link" value="link" checked="checked"  />
	        				<label for="link">Link</label>

	        				<input type="radio" name="radio-widget" id="select" value="select"  />
	        				<label for="select">Select</label>

	        				<input type="radio" name="radio-widget" id="checkbox" value="checkbox"  />
	        				<label for="checkbox">Checkbox</label>
	  				</fieldset>
	  				<fieldset data-role="controlgroup" data-type="horizontal">
	    				<legend>Operation</legend>
	        				<input type="radio" name="radio-op" id="remove" value="remove" checked="checked"  />
	        				<label for="remove">Remove</label>

	        				<input type="radio" name="radio-op" id="hide" value="hide"  />
	        				<label for="hide">Hide</label>
	  				</fieldset>
					<div data-role="fieldcontain">
						<input id="isHorizontal" data-inline="true" type="checkbox"></input>
						<label for="isHorizontal">Horizontal</label>
					</div>
					</form>
				</div>
			</div>
		</div>
	</div><commit_msg>[controlgroup functional test] Add "Nothing" option to "Remove" and "Hide" to prevent grouped items from disappearing so that checkbox behaviour may be studied<commit_after><!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQuery Mobile Button Markup Tester</title>
	<link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />
	<link rel="stylesheet" href="../../docs/_assets/css/jqm-docs.css" />
	<script src="../../js/jquery.tag.inserter.js"></script>
	<script src="../../js"></script>
	<script>
( function( $, undefined ) {
	var counter = 0;
	$( document ).bind( "pageinit", function( e ) {
		$( "#prepend,#append", e.target ).bind( "click", function( e ) {
			counter++;
			var widgetType = $( "[name='radio-widget']:checked" ).attr( "id" ),
				grp = $( "#controlgroup" ), $el,
				action = function() {
					var op = $( "[name='radio-op']:checked" ).attr( "id" );
					$el[ op ](); grp.controlgroup( "refresh" );
				};

			if ( widgetType === "link" ) {
				$el = $( "<a href='#'>Remove " + counter + "</a>" ).bind( "click", action );
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$el.buttonMarkup();
			} else if ( widgetType === "select" ) {
				$el = $( "<label for='widget" + counter + "'>Select " + counter + "</label><select id='widget" + counter + "'><option id='widget" + counter + "' value='default'>Select " + counter + "</option><option value='remove'>Remove</option></select>" );
				$( $el[ 1 ] ).bind( "change", action);
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$( $el[ 1 ] ).selectmenu();
			} else {
				$el = $( "<label for='widget" + counter + "'>Remove " + counter + "</label><input type='checkbox' id='widget" + counter + "'></input>" );
				$( $el[ 1 ] ).bind( "change", action );
				$( "#controlgroup" ).controlgroup( "container" )[ $( this ).attr( "id" ) ]( $el );
				$( $el[ 1 ] ).checkboxradio();
			}

			grp.controlgroup( "refresh" );
		});
		$( "#isHorizontal" ).bind( "change", function( e ) {
			$( "#controlgroup" ).controlgroup( "option", "type", ( $( "#isHorizontal" ).is( ":checked" ) ? "horizontal" : "vertical" ) );
		});
	});
})( jQuery );
	</script>
</head>

<body>
	<div data-role="page">
		<div data-role="header">
			<h1>Controlroup Dynamic Modification</h1>
		</div>
		<div data-role="contents">
			<div class="ui-grid-a">
				<div class="ui-block-a">
					<div data-role="controlgroup" id="controlgroup">
					</div>
				</div>
				<div class="ui-block-b">
					<a href="#" id="prepend" data-role="button" data-corners="true" data-inline="true">Prepend</a>
					<a href="#" id="append" data-role="button" data-corners="true" data-inline="true">Append</a>
					<form action="#" method="get">
	  				<fieldset data-role="controlgroup" data-type="horizontal">
	    				<legend>Widget type</legend>
	        				<input type="radio" name="radio-widget" id="link" value="link" checked="checked"  />
	        				<label for="link">Link</label>

	        				<input type="radio" name="radio-widget" id="select" value="select"  />
	        				<label for="select">Select</label>

	        				<input type="radio" name="radio-widget" id="checkbox" value="checkbox"  />
	        				<label for="checkbox">Checkbox</label>
	  				</fieldset>
	  				<fieldset data-role="controlgroup" data-type="horizontal">
	    				<legend>Operation</legend>
	        				<input type="radio" name="radio-op" id="remove" value="remove" checked="checked"  />
	        				<label for="remove">Remove</label>

	        				<input type="radio" name="radio-op" id="hide" value="hide"  />
	        				<label for="hide">Hide</label>

	        				<input type="radio" name="radio-op" id="width" value="width"  />
	        				<label for="width">Nothing</label>
	  				</fieldset>
					<div data-role="fieldcontain">
						<input id="isHorizontal" data-inline="true" type="checkbox"></input>
						<label for="isHorizontal">Horizontal</label>
					</div>
					</form>
				</div>
			</div>
		</div>
	</div>
{'fraction_non_alphanumeric': 0.23071179691388752, 'fraction_numerical': 0.002239920358387257, 'mean_word_length': 3.304767005891805, 'pattern_counts': {'":': 2, '<': 170, '<?xml version=': 0, '>': 170, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2213167', 'n_tokens_mistral': 3075, 'n_tokens_neox': 2657, 'n_words': 555}