Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,243 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Theme inheritance - jQuery Mobile Tests</title>
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="shortcut icon" href="../../favicon.ico">
<script src="../../../js/jquery.js"></script>
<script src="../../../js/"></script>
<script>
$( document ).on( "pagecreate", function() {
$( "#theme-selector input" ).on( "change", function( event ) {
var themeClass = $( "#theme-selector input:checked" ).attr( "id" );
$( "#testpage" ).removeClass( "ui-page-theme-a ui-page-theme-b ui-page-theme-c" ).addClass( "ui-page-theme-" + themeClass );
$( "#ui-body-test" ).removeClass( "ui-body-a ui-body-b ui-body-c" ).addClass( "ui-body-" + themeClass );
$( "#ui-bar-test, #ui-bar-form" ).removeClass( "ui-bar-a ui-bar-b ui-bar-c" ).addClass( "ui-bar-" + themeClass );
$( ".ui-collapsible-content" ).removeClass( "ui-body-a ui-body-b ui-body-c" ).addClass( "ui-body-" + themeClass );
$( ".theme" ).text( themeClass );
});
$( "#opt-shadow input" ).on( "change", function( event ) {
if ( $( "#on" ).prop( "checked" ) ) {
$( "#testpage" ).removeClass( "noshadow" );
} else if ( $( "#off" ).prop( "checked" ) ) {
$( "#testpage" ).addClass( "noshadow" );
}
});
});
</script>
<style>
.noshadow * {
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important;
}
</style>
</head>
<body>
<div data-role="page" id="testpage">
<div data-role="header">
<h1>Theme inheritance</h1>
<a href="../../" data-role="button" data-rel="back" data-icon="back" data-iconpos="notext">Back</a>
<a href="#" data-role="button" data-icon="gear">Button</a>
</div><!-- /header -->
<div data-role="content">
<form class="ui-mini">
<div data-role="fieldcontain" id="theme-selector">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Theme:</legend>
<label for="a">A</label>
<input type="radio" name="theme" id="a" checked>
<label for="b">B</label>
<input type="radio" name="theme" id="b">
<label for="c">C</label>
<input type="radio" name="theme" id="c">
</fieldset>
</div>
<div data-role="fieldcontain" id="opt-shadow">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Shadow:</legend>
<label for="on">On</label>
<input type="radio" name="shadow" id="on" checked>
<label for="off">Off</label>
<input type="radio" name="shadow" id="off">
</fieldset>
</div>
</form>
<div id="ui-body-test" class="ui-body ui-body-a ui-corner-all" style="margin-bottom:1em;">
<p>I am a div with classes ui-body, ui-body-<span class="theme">a</span> and ui-corner-all.</p>
<p><a href="#">I am a link</a></p>
</div>
<div id="ui-bar-test" class="ui-bar ui-bar-a ui-corner-all" style="margin-bottom:1em;">
<p>I am a div with classes ui-bar, ui-bar-<span class="theme">a</span> and ui-corner-all. <a href="#">I am a link</a></p>
</div>
<a href="#" data-role="button" data-inline="true" data-icon="arrow-r" data-iconpos="right">We</a>
<button data-inline="true" data-icon="arrow-r" data-iconpos="right">are</button>
<input type="button" value="buttons" data-inline="true" data-icon="arrow-r" data-iconpos="right">
<ul data-role="listview" data-inset="true">
<li>I</li>
<li data-role="list-divider">Divider<span class="ui-li-count">3</span></li>
<li>am</li>
<li>static<span class="ui-li-count">6</span></li>
</ul>
<ul data-role="listview" data-inset="true">
<li><a href="#">We</a></li>
<li data-role="list-divider">Divider</li>
<li><a href="#">have<span class="ui-li-count">4</span></a></li>
<li><a href="#">links</a></li>
</ul>
<ul data-role="listview" data-split-icon="gear" data-inset="true">
<li><a href="#">
<img src="../../_assets/img/album-bb.jpg" />
<h2>Broken Bells</h2>
<p>Broken Bells</p></a>
<a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">Purchase album</a>
</li>
<li><a href="#">
<img src="../../_assets/img/album-hc.jpg" />
<h2>Warning</h2>
<p>Hot Chip</p></a>
<a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">Purchase album</a>
</li>
<li><a href="#">
<img src="../../_assets/img/album-bb.jpg" />
<h2>Wolfgang Amadeus Phoenix</h2>
<p>Phoenix</p></a>
<a href="#purchase" data-rel="popup" data-position-to="window" data-transition="pop">Purchase album</a>
</li>
</ul>
<form>
<div data-role="fieldcontain">
<label for="name2">Text Input:</label>
<input type="text" name="name2" id="name2" value="" data-clear-btn="true">
</div>
<div data-role="fieldcontain">
<label for="textarea2">Textarea:</label>
<textarea cols="40" rows="8" name="textarea2" id="textarea2"></textarea>
</div>
<div data-role="fieldcontain">
<label for="flip2">Flip switch:</label>
<select name="flip2" id="flip2" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="slider2">Slider:</label>
<input type="range" name="slider2" id="slider2" value="0" min="0" max="100" data-highlight="true">
</div>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup">
<legend>Checkbox:</legend>
<input type="checkbox" name="checkbox-v-1a" id="checkbox-v-1a">
<label for="checkbox-v-1a">One</label>
<input type="checkbox" name="checkbox-v-1b" id="checkbox-v-1b">
<label for="checkbox-v-1b">Two</label>
<input type="checkbox" name="checkbox-v-1c" id="checkbox-v-1c">
<label for="checkbox-v-1c">Three</label>
</fieldset>
</div>
<div data-role="fieldcontain">
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>Controlgroup:</legend>
<button data-icon="home" data-iconpos="right">One</button>
<input type="button" data-icon="back" data-iconpos="right" value="Two">
<a href="#" data-role="button" data-icon="grid" data-iconpos="right">Three</a>
</fieldset>
</div>
<div data-role="fieldcontain">
<label for="select-choice-1" class="select">Custom select:</label>
<select name="select-choice-1" id="select-choice-1" data-native-menu="false" multiple="multiple">
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="submit-1">Send form:</label>
<input type="submit" id="submit-1" value="Send">
</div>
</form>
<a href="#" data-role="button" data-icon="gear" class="ui-btn-active">Active button</a>
<p>Form inside static list:</p>
<form>
<ul data-role="listview" data-inset="true">
<li data-role="fieldcontain">
<label for="name3">Text Input:</label>
<input type="text" name="name3" id="name3" value="" data-clear-btn="true">
</li>
<li data-role="fieldcontain">
<label for="flip3">Flip switch:</label>
<select name="flip3" id="flip3" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</li>
<li data-role="fieldcontain">
<label for="slider3">Slider:</label>
<input type="range" name="slider3" id="slider3" value="0" min="0" max="100" data-highlight="true">
</li>
</ul>
</form>
<div id="ui-bar-form" class="ui-bar ui-bar-a">
<p>ui-bar-<span class="theme">a</span></p>
<div data-role="fieldcontain">
<label for="name4">Text Input:</label>
<input type="text" name="name4" id="name4" value="" data-clear-btn="true">
</div>
<div data-role="fieldcontain">
<label for="flip4">Flip switch:</label>
<select name="flip4" id="flip4" data-role="slider">
<option value="off">Off</option>
<option value="on">On</option>
</select>
</div>
<div data-role="fieldcontain">
<label for="slider4">Slider:</label>
<input type="range" name="slider4" id="slider4" value="0" min="0" max="100" data-highlight="true">
</div>
</div>
<div data-role="collapsible" data-content-theme="a">
<h4>Heading</h4>
<p>I'm the collapsible content with a themed content block set to "<span class="theme">a</span>".</p>
</div>
<div data-role="collapsible-set" data-content-theme="a">
<div data-role="collapsible">
<h3>Section 1</h3>
<p>I'm the collapsible content for section 1</p>
</div>
<div data-role="collapsible">
<h3>Section 2</h3>
<p>I'm the collapsible content for section 2</p>
</div>
<div data-role="collapsible">
<h3>Section 3</h3>
<p>I'm the collapsible content for section 3</p>
</div>
</div>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>
@@ -12,7 +12,7 @@
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
<style id="negateDoubleBorder">
#demo-borders .ui-collapsible .ui-collapsible-heading .ui-btn { border-top-width: 1px !important; }
#demo-borders .ui-collapsible .ui-collapsible-heading { border-top-width: 1px !important; }
</style>
</head>
<body>
@@ -49,12 +49,12 @@

<div data-demo-html="true">
<div data-role="controlgroup" data-mini="true">
<a href="#" data-role="button" data-mini="true">No icon</a>
<a href="#" data-role="button" data-icon="delete" data-mini="true" data-iconpos="left">Left</a>
<a href="#" data-role="button" data-icon="delete" data-mini="true" data-iconpos="right">Right</a>
<a href="#" data-role="button" data-icon="delete" data-mini="true" data-iconpos="top">Top</a>
<a href="#" data-role="button" data-icon="delete" data-mini="true" data-iconpos="bottom">Bottom</a>
<a href="#" data-role="button" data-icon="delete" data-mini="true" data-iconpos="notext">Icon only</a>
<a href="#" data-role="button">No icon</a>
<a href="#" data-role="button" data-icon="delete" data-iconpos="left">Left</a>
<a href="#" data-role="button" data-icon="delete" data-iconpos="right">Right</a>
<a href="#" data-role="button" data-icon="delete" data-iconpos="top">Top</a>
<a href="#" data-role="button" data-icon="delete" data-iconpos="bottom">Bottom</a>
<a href="#" data-role="button" data-icon="delete" data-iconpos="notext">Icon only</a>
</div>
</div><!--/demo-html -->

@@ -11,8 +11,14 @@
<script src="../../../js/jquery.js"></script>
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
<style>
.my-grid > div {
<style id="wrap">
.button-wrap {
margin-left: 5px;
margin-right: 5px;
}
</style>
<style id="center">
.center {
text-align: center;
}
</style>
@@ -36,63 +42,80 @@

<h2>Basic</h2>

<p>Buttons in grids get a bit margin left and right.</p>

<div data-demo-html="true">
<div class="ui-grid-a">
<div class="ui-block-a"><button data-theme="b">Confirm</button></div>
<div class="ui-block-b"><button data-theme="d">Cancel</button></div>
</div>
</div><!--/demo-html -->


<h2>Icon only, centered</h2>

<p>Inline buttons can be centered by adding <code>text-align: center;</code> to your custom CSS.</p>
<p>Buttons in grids get a bit margin left and right. There is one exception; fullwidth <code>button</code> elements (i.e. not inline or icon-only). Because of the 100% width the margin can't be applied to the element directly. You can wrap them in a <code>div</code> and give this the same margin as other buttons as we do in this example:</p>

<div data-demo-html="true" data-demo-css="true">
<div class="ui-grid-d my-grid">
<div class="ui-block-a"><button data-icon="home" data-iconpos="notext" data-inline="true">Button</button></div>
<div class="ui-block-b"><button data-icon="arrow-l" data-iconpos="notext" data-inline="true">Button</button></div>
<div class="ui-block-c"><button data-icon="grid" data-iconpos="notext" data-inline="true">Button</button></div>
<div class="ui-block-d"><button data-icon="arrow-r" data-iconpos="notext" data-inline="true">Button</button></div>
<div class="ui-block-e"><button data-icon="gear" data-iconpos="notext" data-inline="true">Button</button></div>
<div data-demo-html="true" data-demo-css="#wrap">
<div class="ui-grid-b">
<div class="ui-block-a"><a href="#" data-role="button">Anchor</a></div>
<div class="ui-block-b"><div class="button-wrap"><button>Button</button></div></div>
<div class="ui-block-c"><input type="button" value="Input"></div>
<form>
<div class="ui-block-a">
<label for="grid-select-1" class="ui-hidden-accessible">Select</label>
<select id="grid-select-1" name="grid-select-1" data-shadow="false">
<option>Select</option>
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
<div class="ui-block-b">
<label for="grid-checkbox-1">Checkbox</label>
<input type="checkbox" id="grid-checkbox-1" name="grid-checkbox-1">
</div>
<div class="ui-block-c">
<label for="grid-radio-1">Radio</label>
<input type="radio" id="grid-radio-1" name="grid-radio-1">
</div>
</form>
</div>
</div><!--/demo-html -->


<h2>Mini sized</h2>

<div data-demo-html="true">
<div data-demo-html="true" data-demo-css="#wrap">
<div class="ui-grid-b">
<div class="ui-block-a"><a href="#" data-role="button" data-mini="true">Anchor</a></div>
<div class="ui-block-b"><button data-mini="true">Button</button></div>
<div class="ui-block-c"><input type="button" data-mini="true" value="Input"></div>
<div class="ui-block-b"><div class="button-wrap"><button data-mini="true">Button</button></div></div>
<div class="ui-block-c"><input type="button" value="Input" data-mini="true"></div>
<form>
<div class="ui-block-a">
<label for="grid-select-2" class="ui-hidden-accessible">Select</label>
<select id="grid-select-2" name="grid-select-2" data-shadow="false" data-mini="true">
<option>Select</option>
<option value="1">The 1st Option</option>
<option value="2">The 2nt Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
<div class="ui-block-b">
<label for="grid-checkbox-2">Checkbox</label>
<input type="checkbox" id="grid-checkbox-2" name="grid-checkbox-2" data-mini="true">
</div>
<div class="ui-block-c">
<label for="grid-radio-2">Radio</label>
<input type="radio" id="grid-radio-2" name="grid-radio-2" data-mini="true">
</div>
</form>
</div>
</div><!--/demo-html -->


<h2>Select &amp; Checkbox</h2>
<h2>Icon only, inline centered</h2>

<p>Inline buttons can be centered by adding <code>text-align: center;</code> to your custom CSS.</p>

<div data-demo-html="true">
<form>
<div class="ui-grid-a">
<div class="ui-block-a">
<label for="grid-select-1" class="ui-hidden-accessible">Select</label>
<select id="grid-select-1" name="grid-select-1" data-shadow="false">
<option>Select</option>
<option value="1">The 1st Option</option>
<option value="2">The 2nd Option</option>
<option value="3">The 3rd Option</option>
<option value="4">The 4th Option</option>
</select>
</div>
<div class="ui-block-b">
<label for="grid-checkbox-1">Checkbox</label>
<input type="checkbox" id="grid-checkbox-1">
</div>
</div>
</form>
<div data-demo-html="true" data-demo-css="#center">
<div class="ui-grid-d center">
<div class="ui-block-a"><a data-role="button" data-icon="home" data-iconpos="notext" data-inline="true">Button</a></div>
<div class="ui-block-b"><a data-role="button" data-icon="arrow-l" data-iconpos="notext" data-inline="true">Button</a></div>
<div class="ui-block-c"><a data-role="button" data-icon="grid" data-iconpos="notext" data-inline="true">Button</a></div>
<div class="ui-block-d"><a data-role="button" data-icon="arrow-r" data-iconpos="notext" data-inline="true">Button</a></div>
<div class="ui-block-e"><a data-role="button" data-icon="gear" data-iconpos="notext" data-inline="true">Button</a></div>
</div>
</div><!--/demo-html -->


@@ -103,7 +126,7 @@
<div data-demo-html="true">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"><a href="#" data-role="button" data-icon="arrow-l">Back to order</a></div>
<div class="ui-block-b"><button data-icon="plus">Add products</button></div>
<div class="ui-block-b"><input type="button" data-icon="plus" value="Add products"></div>
<div class="ui-block-c"><input type="button" data-icon="check" data-iconpos="right" value="Confirm order"></div>
</div>
</div><!--/demo-html -->
@@ -127,7 +150,7 @@
<a href="#" data-role="button">Grid Solo</a>
</div>
<br>
<a href="#" data-role="button" data-theme="e">No grid class</a>
<a href="#" data-role="button" data-theme="e">Outside the grid</a>
</div><!--/demo-html -->


@@ -34,21 +34,22 @@
<p>Grids are 100% width, completely invisible (no borders or backgrounds) and don't have padding or margins, so they shouldn't interfere with the styles of elements placed inside them. Within the grid container, child elements are assigned <code>ui-block-a/b/c/d/e</code> in a sequential manner which makes each "block" element float side-by-side, forming the grid.</p>

<h2>Two column grids</h2>
<p>To build a two-column (50/50%) layout, start with a container with a <code>class</code> of <code>ui-grid-a</code>, and add two child containers inside it classed with <code>ui-block-a</code> for the first column and <code>ui-block-b</code> for the second. On the blocks below, we're adding two classes: <code>ui-bar</code> to add the default bar padding and <code>ui-bar-e</code> to apply the background gradient and font styling for the "e" toolbar theme swatch. For illustration purposes, an inline <code>style="height:120px"</code> attribute is also added to each grid to set each to a standard height. </p>

<p>To build a two-column (50/50%) layout, start with a container with a <code>class</code> of <code>ui-grid-a</code>, and add two child containers inside it classed with <code>ui-block-a</code> for the first column and <code>ui-block-b</code> for the second. On the blocks below, we're adding two classes: <code>ui-bar</code> to add the default bar padding and <code>ui-bar-a</code> to apply the background and font styling for the "a" toolbar theme swatch. For illustration purposes, an inline <code>style="height:60px"</code> attribute is also added to each grid to set each to a standard height.</p>

<div data-demo-html="true">
<div class="ui-grid-a">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">Block B</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
</div><!-- /grid-a -->
</div><!--/demo-html -->

<p>Grid classes can be applied to any container. In this next example, we add <code>ui-grid-a</code> to a <code>fieldset</code>, and apply the <code>ui-block</code> classes to the container of each of the two buttons inside to stretch them each to 50% of the screen width:</p>

<div data-demo-html="true">
<fieldset class="ui-grid-a">
<div class="ui-block-a"><button type="submit" data-theme="c">Cancel</button></div>
<div class="ui-block-b"><button type="submit" data-theme="b">Submit</button></div>
<div class="ui-block-a"><input type="submit" value="Submit" data-theme="a"></div>
<div class="ui-block-b"><input type="reset" value="Reset" data-theme="b"></div>
</fieldset>
</div><!--/demo-html -->

@@ -59,19 +60,19 @@

<div data-demo-html="true">
<div class="ui-grid-b">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">Block C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
</div><!-- /grid-b -->
</div><!--/demo-html -->

<p>And an example of a 3 column grid with buttons inside:</p>

<div data-demo-html="true">
<fieldset class="ui-grid-b">
<div class="ui-block-a"><button type="submit" data-theme="c">Hmm</button></div>
<div class="ui-block-b"><button type="submit" data-theme="a">No</button></div>
<div class="ui-block-c"><button type="submit" data-theme="b">Yes</button></div>
<div class="ui-block-a"><input type="button" value="Hmm"></div>
<div class="ui-block-b"><input type="reset" value="No"></div>
<div class="ui-block-c"><input type="submit" value="Yes"></div>
</fieldset>
</div><!--/demo-html -->

@@ -84,10 +85,10 @@

<div data-demo-html="true">
<div class="ui-grid-c">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-d"><div class="ui-bar ui-bar-e" style="height:60px">D</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
<div class="ui-block-d"><div class="ui-bar ui-bar-a" style="height:60px">Block D</div></div>
</div><!-- /grid-c -->
</div><!--/demo-html -->

@@ -98,11 +99,11 @@

<div data-demo-html="true">
<div class="ui-grid-d">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-d"><div class="ui-bar ui-bar-e" style="height:60px">D</div></div>
<div class="ui-block-e"><div class="ui-bar ui-bar-e" style="height:60px">E</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
<div class="ui-block-d"><div class="ui-bar ui-bar-a" style="height:60px">Block D</div></div>
<div class="ui-block-e"><div class="ui-bar ui-bar-a" style="height:60px">Block E</div></div>
</div><!-- /grid-c -->
</div><!--/demo-html -->

@@ -113,31 +114,31 @@

<div data-demo-html="true">
<div class="ui-grid-b">
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-e" style="height:60px">A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-e" style="height:60px">B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-e" style="height:60px">C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
<div class="ui-block-a"><div class="ui-bar ui-bar-a" style="height:60px">Block A</div></div>
<div class="ui-block-b"><div class="ui-bar ui-bar-a" style="height:60px">Block B</div></div>
<div class="ui-block-c"><div class="ui-bar ui-bar-a" style="height:60px">Block C</div></div>
</div><!-- /grid-c -->
</div><!--/demo-html -->


<h2>Grid solo class</h2>

<p>The framework adds left and right margin to buttons in a grid. For a single button you can use a container with class <code>ui-grid-solo</code> and wrap the button in a div with class <code>ui-block-a</code> like the example below. This way the button will get the same margin. View more examples of <a href="grid-buttons.php" data-ajax="false">buttons in grids</a>.</p>
<p>The framework adds left and right margin to buttons in a grid (one exception: 100% width button elements). For a single button you can use a container with class <code>ui-grid-solo</code> and wrap the button in a div with class <code>ui-block-a</code> like the example below. This way the button will get the same margin. View more examples of <a href="grid-buttons.php" data-ajax="false">buttons in grids</a>.</p>

<div data-demo-html="true">
<div class="ui-grid-a">
<div class="ui-block-a"><button type="button" data-theme="c">Previous</button></div>
<div class="ui-block-b"><button type="button" data-theme="c">Next</button></div>
<div class="ui-block-a"><a data-role="button">Previous</a></div>
<div class="ui-block-b"><a data-role="button">Next</a></div>
</div>

<div class="ui-grid-solo">
<div class="ui-block-a"><button type="button" data-theme="b">More</button></div>
<div class="ui-block-a"><input type="button" value="More"></div>
</div>
</div><!--/demo-html -->

@@ -41,14 +41,13 @@

<h2>Auto Init</h2>

<p>Because these tolbars are not within the page they will not auto initalize. you must call the toolbar plugin yourself on document ready</p>
<p>Because these toolbars are not within the page they will not auto initalize. You must call the toolbar plugin yourself on document ready.</p>

<h2>Ajax Navigation</h2>

<p>Because these toolbars are not within the page they will remain in the dom until manually removed. However they will automaticly hide if you navigate to a page containing a toolbar to allow the pages own toolbars to take their place. They will automaticly show again if you navigate to a page containing no toolbars.
</p>
<p>Because these toolbars are not within the page they will remain in the DOM until manually removed. However they will automatically hide if you navigate to a page containing a toolbar to allow the pages own toolbars to take their place. They will automatically show again if you navigate to a page containing no toolbars.</p>

<p>Toolbars not within a page will not be pulled into the dom durring ajax navigation</p>
<p>Toolbars not within a page will not be pulled into the DOM during Ajax navigation.</p>

<h2>Fixed External Toolbars</h2>

@@ -192,10 +192,10 @@

<p>You can then write a CSS rule in your stylesheet that targets the <code>ui-icon-myapp-email</code> class to specify the icon background source. To maintain visual consistency with the rest of the icons, create a white icon 18x18 pixels saved as a PNG-8 with alpha transparency.</p>

<p> In this example, we're just pointing to a standalone icon image, but you could just as easily use an icon sprite and specify the positioning instead, just like the icon sprite we use in the framework.</p>
<p>In this example, we're just pointing to a standalone icon image, but you could just as easily use an icon sprite and specify the positioning instead, just like the icon sprite we use in the framework.</p>

<pre><code>
.ui-icon-myapp-email {
.ui-btn.ui-icon-myapp-email {
background-image: url("app-icon-email.png");
}
</code></pre>
@@ -204,7 +204,7 @@

<pre><code>
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
.ui-icon-myapp-email {
.ui-btn.ui-icon-myapp-email {
background-image: url("app-icon-email-highres.png");
background-size: 18px 18px;
}
@@ -28,7 +28,7 @@

<p class="jqm-intro">This section is a reference for all widget options.</p>

<ul data-role="listview" data-inset="true" data-filter="true" data-theme="d" data-divider-theme="d" data-icon="false" data-filter-placeholder="Search widgets..." data-global-nav="demos" class="jqm-list">
<ul data-role="listview" data-inset="true" data-filter="true" data-theme="a" data-divider-theme="a" data-icon="false" data-filter-placeholder="Search widgets..." data-global-nav="demos" class="jqm-list">
<li data-role="list-divider">Widget reference</li>
<?php include( '../nav-widgets.php' ); ?>
</ul>
@@ -12,7 +12,7 @@
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
<style id="custom-icon">
.ui-icon-custom {
.ui-btn.ui-icon-custom:after {
background-image: url("../../_assets/img/glyphish-icons/21-skull.png");
background-position: 3px 3px;
background-size: 70%;
@@ -11,6 +11,16 @@
<script src="../../../js/jquery.js"></script>
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
<style>
.nav-glyphish-example .ui-btn { padding-top: 40px !important; }
.nav-glyphish-example .ui-btn:after { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
#chat:after { background: url(../../_assets/img/glyphish-icons/09-chat2.png) 50% 50% no-repeat; background-size: 24px 22px; }
#email:after { background: url(../../_assets/img/glyphish-icons/18-envelope.png) 50% 50% no-repeat; background-size: 24px 16px; }
#login:after { background: url(../../_assets/img/glyphish-icons/30-key.png) 50% 50% no-repeat; background-size: 12px 26px; }
#beer:after { background: url(../../_assets/img/glyphish-icons/88-beermug.png) 50% 50% no-repeat; background-size: 22px 27px; }
#coffee:after { background: url(../../_assets/img/glyphish-icons/100-coffee.png) 50% 50% no-repeat; background-size: 20px 24px; }
#skull:after { background: url(../../_assets/img/glyphish-icons/21-skull.png) 50% 50% no-repeat; background-size: 22px 24px; }
</style>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">
@@ -220,18 +230,7 @@

<p>You can add any of the popular icon libraries like <a href="http://glyphish.com/">Glyphish</a> to achieve the iOS style tab that has large icons stacked on top of text labels. All that is required is a bit of custom styles to link to the icons and position them in the navbar. Here is an example using Glyphish icons and custom styles (view page source for styles) in our navbar:</p>

<style>
.nav-glyphish-example .ui-btn .ui-btn-inner { padding-top: 40px !important; }
.nav-glyphish-example .ui-btn .ui-icon { width: 30px!important; height: 30px!important; margin-left: -15px !important; box-shadow: none!important; -moz-box-shadow: none!important; -webkit-box-shadow: none!important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
#chat .ui-icon { background: url(../../_assets/img/glyphish-icons/09-chat2.png) 50% 50% no-repeat; background-size: 24px 22px; }
#email .ui-icon { background: url(../../_assets/img/glyphish-icons/18-envelope.png) 50% 50% no-repeat; background-size: 24px 16px; }
#login .ui-icon { background: url(../../_assets/img/glyphish-icons/30-key.png) 50% 50% no-repeat; background-size: 12px 26px; }
#beer .ui-icon { background: url(../../_assets/img/glyphish-icons/88-beermug.png) 50% 50% no-repeat; background-size: 22px 27px; }
#coffee .ui-icon { background: url(../../_assets/img/glyphish-icons/100-coffee.png) 50% 50% no-repeat; background-size: 20px 24px; }
#skull .ui-icon { background: url(../../_assets/img/glyphish-icons/21-skull.png) 50% 50% no-repeat; background-size: 22px 24px; }
</style>

<div data-demo-html="true">
<div data-demo-html="true" data-demo-css="true">
<div data-role="footer" class="nav-glyphish-example">
<div data-role="navbar" class="nav-glyphish-example" data-grid="d">
<ul>
@@ -268,8 +267,8 @@
</div><!--/demo-html -->

<div data-demo-html="true">
<div class="ui-body-d ui-body">
<h3>Swatch "d"</h3>
<div class="ui-body-b ui-body">
<h3>Swatch "b"</h3>
<div data-role="navbar">
<ul>
<li><a href="#" data-icon="grid">A</a></li>
@@ -76,7 +76,7 @@

<div data-role="popup" id="popupMenu" data-theme="d">
<ul data-role="listview" data-inset="true" style="min-width:210px;" data-theme="d">
<li data-role="divider" data-theme="e">Choose an action</li>
<li data-role="list-divider" data-theme="e">Choose an action</li>
<li><a href="#">View details</a></li>
<li><a href="#">Edit</a></li>
<li><a href="#">Disable</a></li>
@@ -260,7 +260,7 @@
<a href="#transparent" data-rel="popup" data-role="button" data-inline="true">Theme "none", no shadow</a>
<div id="transparent" data-role="popup" data-theme="none" data-shadow="false">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
<img src="../../_assets/img/firefox-logo.png" class="popphoto" alt="firefox logo on a transparent popup">
<img src="../../_assets/img/firefox-logo.png" class="popphoto" alt="firefox logo on a transparent popup" height="300" width="300">
</div>

<a href="#overlay" data-rel="popup" data-role="button" data-inline="true">Overlay theme A</a>
@@ -274,6 +274,12 @@
</div>
</div><!--/demo-html -->

<h2>Pre-rendered markup</h2>
<p>You can supply pre-rendered popup markup to save startup time. The page in the example below contains a popup with pre-rendered markup supplied as part of the original page markup.</p>
<div data-demo-html="#pre-rendered-page">
<a href="#pre-rendered-page" data-role="button" data-icon="arrow-r" data-iconpos="right" data-mini="true" data-inline="true">Go to demo</a>
</div>

<h2>Advanced techniques</h2>
<p>Learn how to customize and extend popups by working with the API, custom scripts, and styles.</p>
<a href="popup-images.php" class="jqm-button" data-ajax="false" data-role="button" data-mini="true" data-inline="true" data-icon="arrow-r" data-iconpos="right">Scaling images</a>
@@ -289,5 +295,20 @@
<?php include( '../../global-nav.php' ); ?>

</div><!-- /page -->
<div id="pre-rendered-page" data-role="page">
<div data-role="header" data-add-back-btn="true">
<h1>Pre-rendered popup demo</h1>
</div>
<div data-role="content">
<a href="#pre-rendered" data-rel="popup" data-role="button" data-inline="true" aria-owns="pre-rendered" aria-haspopup="true" aria-expanded="false">Open Popup</a>
<div style="display: none;"><!-- placeholder for pre-rendered --></div>
</div>
<div id="pre-rendered-screen" class="ui-popup-screen ui-screen-hidden"></div>
<div id="pre-rendered-popup" class="ui-popup-container fade ui-popup-hidden ui-body-inherit ui-overlay-shadow ui-corner-all">
<div id="pre-rendered" class="ui-popup" data-role="popup" data-transition="fade">
<p>This is the contents of the pre-rendered popup</p>
</div>
</div>
</div>
</body>
</html>
@@ -3,27 +3,33 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Custom select - jQuery Mobile Demos</title>
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../../_assets/css/jqm-demos.css">
<link rel="shortcut icon" href="../../favicon.ico">
<title>Custom selects - jQuery Mobile Demos</title>
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../../_assets/css/jqm-demos.css">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
<script src="../../../js/jquery.js"></script>
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
<script src="../../../js/jquery.js"></script>
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">

<div data-role="header" class="jqm-header">
<h1>Custom select</h1>
<a href="#" class="jqm-search-link" data-icon="search" data-iconpos="notext">Search</a>
<?php include( '../../search.php' ); ?>
</div><!-- /header -->
<div data-role="header" class="jqm-header">
<h1 class="jqm-logo"><a href="../../"><img src="../../_assets/img/jquery-logo.png" alt="jQuery Mobile Framework"></a></h1>
<a href="#" class="jqm-navmenu-link" data-icon="bars" data-iconpos="notext">Navigation</a>
<a href="#" class="jqm-search-link" data-icon="search" data-iconpos="notext">Search</a>
<?php include( '../../search.php' ); ?>
</div><!-- /header -->

<div data-role="content" class="jqm-content">
<div data-role="content" class="jqm-content">

<form>
<h1>Custom select menu <a href="http://api.jquerymobile.com/select/" data-ajax="false" data-role="button" data-inline="true" data-mini="true" data-icon="arrow-r" data-iconpos="right" class="jqm-api-link">API</a></h1>

<p class="jqm-intro">The custom select uses a popup with a listview to display the menu. For long lists a dialog will be used.
</p>

<h2>Examples</h2>

<div data-demo-html="true">
<div data-role="fieldcontain">
@@ -370,15 +376,15 @@
</fieldset>
</div><!--/demo-html -->

</form>

</div><!-- /content -->

<div data-role="footer" class="jqm-footer">
<p class="jqm-version"></p>
<p>Copyright 2013 The jQuery Foundation</p>
</div><!-- /footer -->

<?php include( '../../global-nav.php' ); ?>

</div><!-- /page -->
</body>
</html>
@@ -26,7 +26,7 @@

<h1>Select menu <a href="http://api.jquerymobile.com/select/" data-ajax="false" data-role="button" data-inline="true" data-mini="true" data-icon="arrow-r" data-iconpos="right" class="jqm-api-link">API</a></h1>

<p class="jqm-intro">The select menu is based on a native select element, which is hidden from view and replaced with a custom-styled select button. Tapping it opens the native menu.
<p class="jqm-intro">The select menu is based on a native select element, which is hidden from view and replaced with a custom-styled select button. Tapping it opens the native menu. There is also a <a href="custom-selects.php">custom select menu</a> widget, which also replaces the native dropdown.
</p>

<h2>Basic select</h2>
@@ -0,0 +1 @@
<div class="tabs-list-content">I am ajax tab content i was pulled in from ajax-content.php </div>
@@ -0,0 +1,87 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Navbar - jQuery Mobile Demos</title>
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../../_assets/css/jqm-demos.css">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
<script src="../../../js/jquery.js"></script>
<script src="../../_assets/js/"></script>
<script src="../../../js/"></script>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">

<div data-role="header" class="jqm-header">
<h1 class="jqm-logo"><a href="../../"><img src="../../_assets/img/jquery-logo.png" alt="jQuery Mobile Framework"></a></h1>
<a href="#" class="jqm-navmenu-link" data-icon="bars" data-iconpos="notext">Navigation</a>
<a href="#" class="jqm-search-link" data-icon="search" data-iconpos="notext">Search</a>
<?php include( '../../search.php' ); ?>
</div><!-- /header -->

<div data-role="content" class="jqm-content">

<h1>Tabs <a href="http://api.jquerymobile.com/navbar/" data-ajax="false" data-role="button" data-inline="true" data-mini="true" data-icon="arrow-r" data-iconpos="right" class="jqm-api-link">API</a></h1>

<p class="jqm-intro">The jQuery mobile tabs widget is actually just an extension of the jQuery ui tabs widget and takes all the same options and methods</p>
</p>
<h2>Use navbar for tabs</h2>
<div data-role="tabs" id="tabs">
<div data-role="navbar">
<ul>
<li><a href="#one" data-ajax="false">one</a></li>
<li><a href="#two" data-ajax="false">two</a></li>
<li><a href="ajax-content.php" data-ajax="false">three</a></li>
</ul>
</div>
<div id="one" class="ui-body-d ui-content">
<h1>First tab contents</h1>
</div>
<div id="two">
<ul data-role="listview" data-inset="true">
<li><a href="#">Acura</a></li>
<li><a href="#">Audi</a></li>
<li><a href="#">BMW</a></li>
<li><a href="#">Cadillac</a></li>
<li><a href="#">Ferrari</a></li>
</ul>
</div>
</div>
<h2>Use inset listview for tabs</h2>
<div data-role="tabs">
<ul data-role="listview" data-inset="true" class="tabs-list-left">
<li><a href="#one" data-ajax="false">one</a></li>
<li><a href="#two" data-ajax="false">two</a></li>
<li><a href="ajax-content.php" data-ajax="false">three</a></li>
</ul>
<div id="one" class="ui-body-d tabs-list-content">
<h1>First tab contents</h1>
</div>

<ul id="two" class="tabs-list-content" data-role="listview" data-inset="true">
<li><a href="#">Acura</a></li>
<li><a href="#">Audi</a></li>
<li><a href="#">BMW</a></li>
<li><a href="#">Cadillac</a></li>
<li><a href="#">Ferrari</a></li>
</ul>

</div>
<h2>Tabbed page content</h2>
<p>You can also use tabs to swap out an enitre pages content <a data-ajax="false" href="tabbed-content.php">Tabbed Content Pages</a></p>

</div><!-- /content -->

<div data-role="footer" class="jqm-footer">
<p class="jqm-version"></p>
<p>Copyright 2013 The jQuery Foundation</p>
</div><!-- /footer -->

<?php include( '../../global-nav.php' ); ?>

</div><!-- /page -->
</body>
</html>
@@ -0,0 +1,45 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Navbar - jQuery Mobile Demos</title>
<link rel="stylesheet" href="../../../css/themes/default/jquery.mobile.css">
<link rel="stylesheet" href="../../_assets/css/jqm-demos.css">
<link rel="shortcut icon" href="../../favicon.ico">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
<script src="../../../js/jquery.js"></script>
<script src="../../../js/"></script>
</head>
<body>
<div data-role="page" class="jqm-demos" data-quicklinks="true">
<div data-role="tabs">
<div data-role="navbar">
<ul>
<li><a href="#one" data-theme="a" data-ajax="false">one</a></li>
<li><a href="#two" data-theme="a" data-ajax="false">two</a></li>
<li><a href="ajax-content.php" data-theme="a" data-ajax="false">three</a></li>
</ul>
</div>
<div id="one" class="ui-content">
<h1>First tab contents</h1>
</div>
<div id="two" class="ui-content">
<ul data-role="listview">
<li><a href="#">Acura</a></li>
<li><a href="#">Audi</a></li>
<li><a href="#">BMW</a></li>
<li><a href="#">Cadillac</a></li>
<li><a href="#">Ferrari</a></li>
</ul>
</div>
</div>
<div data-role="footer" class="jqm-footer">
<p class="jqm-version"></p>
<p>Copyright 2013 The jQuery Foundation</p>
</div><!-- /footer -->
</div><!-- /page -->
</body>
</html>

Large diffs are not rendered by default.

@@ -141,7 +141,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"

durationThreshold: 1000, // More time than this, and it isn't a swipe.

horizontalDistanceThreshold: 30, // Swipe horizontal displacement must be more than this.
horizontalDistanceThreshold: 10, // Swipe horizontal displacement must be more than this.

verticalDistanceThreshold: 75, // Swipe vertical displacement must be less than this.

@@ -170,9 +170,12 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
Math.abs( start.coords[ 1 ] - stop.coords[ 1 ] ) < $.event.special.swipe.verticalDistanceThreshold ) {
var direction = start.coords[0] > stop.coords[ 0 ] ? "swipeleft" : "swiperight";

triggerCustomEvent( thisObject, "swipe", $.Event( "swipe", { target: origTarget }) );
triggerCustomEvent( thisObject, direction,$.Event( direction, { target: origTarget } ) );
triggerCustomEvent( thisObject, "swipe", $.Event( "swipe", { target: origTarget, swipestart: start, swipestop: stop }) );
triggerCustomEvent( thisObject, direction,$.Event( direction, { target: origTarget, swipestart: start, swipestop: stop } ) );
return true;
}
return false;

},

setup: function() {
@@ -182,15 +185,18 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"
$this.bind( touchStartEvent, function( event ) {
var stop,
start = $.event.special.swipe.start( event ),
origTarget = event.target;
origTarget = event.target,
emitted = false;

function moveHandler( event ) {
if ( !start ) {
return;
}

stop = $.event.special.swipe.stop( event );

if( !emitted ){
emitted = $.event.special.swipe.handleSwipe( start, stop, thisObject, origTarget );
}
// prevent scrolling
if ( Math.abs( start.coords[ 0 ] - stop.coords[ 0 ] ) > $.event.special.swipe.scrollSupressionThreshold ) {
event.preventDefault();
@@ -199,12 +205,7 @@ define( [ "jquery", "../jquery.mobile.vmouse", "../jquery.mobile.support.touch"

$this.bind( touchMoveEvent, moveHandler )
.one( touchStopEvent, function() {
$this.unbind( touchMoveEvent, moveHandler );

if ( start && stop ) {
$.event.special.swipe.handleSwipe( start, stop, thisObject, origTarget );
}
start = stop = undefined;
emitted = false;
});
});
},
@@ -18,7 +18,9 @@
'events/throttledresize.js',
'events/orientationchange.js',
'jquery.hashchange.js',
'jquery.mobile.core.js',
'jquery.mobile.defaults.js',
'jquery.mobile.helpers.js',
'jquery.mobile.data.js',
'jquery.mobile.registry.js',
'widgets/page.js',
'widgets/loader.js',
@@ -60,8 +62,8 @@
'widgets/forms/slider.tooltip.js',
'widgets/forms/rangeslider.js',
'widgets/forms/textinput.js',
'widgets/forms/select.custom.js',
'widgets/forms/select.js',
'widgets/forms/select.custom.js',
'jquery.mobile.buttonMarkup.js',
'widgets/controlgroup.js',
'jquery.mobile.links.js',
@@ -74,6 +76,8 @@
'widgets/table.js',
'widgets/table.columntoggle.js',
'widgets/table.reflow.js',
'widgets/jquery.ui.tabs.js',
'widgets/tabs.js',
'jquery.mobile.zoom.js',
'jquery.mobile.zoom.iosorientationfix.js',
'jquery.mobile.init.js'
3,681 js/jquery.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,345 +1,10 @@
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Base file for jQuery Mobile
//>>label: Core
//>>group: Core
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQuery, ns, pkg, __version__ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
__version__ = ( pkg && pkg.version ) || "dev";
//>>excludeEnd("jqmBuildExclude");
var nsNormalizeDict = {},
// Monkey-patching Sizzle to filter the :jqmData selector
oldFind = $.find,
jqmDataRE = /:jqmData\(([^)]*)\)/g;

// jQuery.mobile configurable options
$.extend($.mobile, {

// Version of the jQuery Mobile Framework
version: __version__,

// Namespace used framework-wide for data-attrs. Default is no namespace
ns: "",

// Define the url parameter used for referencing widget-generated sub-pages.
// Translates to to example.html&ui-page=subpageIdentifier
// hash segment before &ui-page= is used to make Ajax request
subPageUrlKey: "ui-page",

// Class assigned to page currently in view, and during transitions
activePageClass: "ui-page-active",

// Class used for "active" button state, from CSS framework
activeBtnClass: "ui-btn-active",

// Class used for "focus" form element state, from CSS framework
focusClass: "ui-focus",

// Automatically handle clicks and form submissions through Ajax, when same-domain
ajaxEnabled: true,

// Automatically load and show pages based on location.hash
hashListeningEnabled: true,

// disable to prevent jquery from bothering with links
linkBindingEnabled: true,

// Set default page transition - 'none' for no transitions
defaultPageTransition: "fade",

// Set maximum window width for transitions to apply - 'false' for no limit
maxTransitionWidth: false,

// Minimum scroll distance that will be remembered when returning to a page
minScrollBack: 250,

// DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts
touchOverflowEnabled: false,

// Set default dialog transition - 'none' for no transitions
defaultDialogTransition: "pop",

// Error response message - appears when an Ajax page request fails
pageLoadErrorMessage: "Error Loading Page",

// For error messages, which theme does the box uses?
pageLoadErrorMessageTheme: "e",

// replace calls to window.history.back with phonegaps navigation helper
// where it is provided on the window object
phonegapNavigationEnabled: false,

//automatically initialize the DOM when it's ready
autoInitializePage: true,

pushStateEnabled: true,

// allows users to opt in to ignoring content by marking a parent element as
// data-ignored
ignoreContentEnabled: false,

buttonMarkup: {
hoverDelay: 200
},

// disable the alteration of the dynamic base tag or links in the case
// that a dynamic base tag isn't supported
dynamicBaseEnabled: true,

// default the property to remove dependency on assignment in init module
pageContainer: $(),

// define the window and the document objects
window: $( window ),
document: $( document ),

keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
},

// Place to store various widget extensions
behaviors: {},

// Retrieve an attribute from an element and perform some massaging of the value
getAttribute: function( e, key, dns ) {
var value;

if ( dns ) {
key = "data-" + $.mobile.ns + key;
}

value = e.getAttribute( key );

return value === "true" ? true :
value === "false" ? false :
value === null ? undefined : value;
},

// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
silentScroll: function( ypos ) {
if ( $.type( ypos ) !== "number" ) {
ypos = $.mobile.defaultHomeScroll;
}

// prevent scrollstart and scrollstop events
$.event.special.scrollstart.enabled = false;

setTimeout( function() {
window.scrollTo( 0, ypos );
$.mobile.document.trigger( "silentscroll", { x: 0, y: ypos });
}, 20 );

setTimeout( function() {
$.event.special.scrollstart.enabled = true;
}, 150 );
},

// Expose our cache for testing purposes.
nsNormalizeDict: nsNormalizeDict,

// Take a data attribute property, prepend the namespace
// and then camel case the attribute string. Add the result
// to our nsNormalizeDict so we don't have to do this again.
nsNormalize: function( prop ) {
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
},

// Find the closest parent with a theme class on it. Note that
// we are not using $.fn.closest() on purpose here because this
// method gets called quite a bit and we need it to be as fast
// as possible.
getInheritedTheme: function( el, defaultTheme ) {
var e = el[ 0 ],
ltr = "",
re = /ui-(bar|body|overlay)-([a-z])\b/,
c, m;
while ( e ) {
c = e.className || "";
if ( c && ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) {
// We found a parent with a theme class
// on it so bail from this loop.
break;
}

e = e.parentNode;
}
// Return the theme letter we found, if none, return the
// specified default.
return ltr || defaultTheme || "a";
},

// TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers
//
// Find the closest javascript page element to gather settings data jsperf test
// http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit
// possibly naive, but it shows that the parsing overhead for *just* the page selector vs
// the page and dialog selector is negligable. This could probably be speed up by
// doing a similar parent node traversal to the one found in the inherited theme code above
closestPageData: function( $target ) {
return $target
.closest( ":jqmData(role='page'), :jqmData(role='dialog')" )
.data( "mobile-page" );
},

enhanceable: function( $set ) {
return this.haveParents( $set, "enhance" );
},

hijackable: function( $set ) {
return this.haveParents( $set, "ajax" );
},

haveParents: function( $set, attr ) {
if ( !$.mobile.ignoreContentEnabled ) {
return $set;
}

var count = $set.length,
$newSet = $(),
e, $element, excluded,
i, c;

for ( i = 0; i < count; i++ ) {
$element = $set.eq( i );
excluded = false;
e = $set[ i ];

while ( e ) {
c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : "";

if ( c === "false" ) {
excluded = true;
break;
}

e = e.parentNode;
}

if ( !excluded ) {
$newSet = $newSet.add( $element );
}
}

return $newSet;
},

getScreenHeight: function() {
// Native innerHeight returns more accurate value for this across platforms,
// jQuery version is here as a normalized fallback for platforms like Symbian
return window.innerHeight || $.mobile.window.height();
}
});

// Mobile version of data and removeData and hasData methods
// ensures all data is set and retrieved using jQuery Mobile's data namespace
$.fn.jqmData = function( prop, value ) {
var result;
if ( typeof prop !== "undefined" ) {
if ( prop ) {
prop = $.mobile.nsNormalize( prop );
}

// undefined is permitted as an explicit input for the second param
// in this case it returns the value and does not set it to undefined
if( arguments.length < 2 || value === undefined ){
result = this.data( prop );
} else {
result = this.data( prop, value );
}
}
return result;
};

$.jqmData = function( elem, prop, value ) {
var result;
if ( typeof prop !== "undefined" ) {
result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value );
}
return result;
};

$.fn.jqmRemoveData = function( prop ) {
return this.removeData( $.mobile.nsNormalize( prop ) );
};

$.jqmRemoveData = function( elem, prop ) {
return $.removeData( elem, $.mobile.nsNormalize( prop ) );
};

$.fn.removeWithDependents = function() {
$.removeWithDependents( this );
};

$.removeWithDependents = function( elem ) {
var $elem = $( elem );

( $elem.jqmData( "dependents" ) || $() ).remove();
$elem.remove();
};

$.fn.addDependents = function( newDependents ) {
$.addDependents( this , newDependents );
};

$.addDependents = function( elem, newDependents ) {
var $elem = $( elem ),
dependents = $elem.jqmData( "dependents" ) || $();

$elem.jqmData( "dependents", $( dependents ).add( newDependents ) );
};

// note that this helper doesn't attempt to handle the callback
// or setting of an html element's text, its only purpose is
// to return the html encoded version of the text in all cases. (thus the name)
$.fn.getEncodedText = function() {
return $( "<a>" ).text( $( this ).text() ).html();
};

// fluent helper function for the mobile namespaced equivalent
$.fn.jqmEnhanceable = function() {
return $.mobile.enhanceable( this );
};

$.fn.jqmHijackable = function() {
return $.mobile.hijackable( this );
};

$.find = function( selector, context, ret, extra ) {
selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" );

return oldFind.call( this, selector, context, ret, extra );
};

$.extend( $.find, oldFind );

$.find.matches = function( expr, set ) {
return $.find( expr, null, null, set );
};

$.find.matchesSelector = function( node, expr ) {
return $.find( expr, null, null, [ node ] ).length > 0;
};
})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>group: exclude

define([
"require",
"./jquery.mobile.defaults",
"./jquery.mobile.data",
"./jquery.mobile.helpers"
]);
//>>excludeEnd("jqmBuildExclude");

@@ -0,0 +1,108 @@
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Mobile versions of Data functions to allow for namespaceing
//>>label: jqmData
//>>group: Core
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
var nsNormalizeDict = {},
// Monkey-patching Sizzle to filter the :jqmData selector
oldFind = $.find,
jqmDataRE = /:jqmData\(([^)]*)\)/g;

$.extend($.mobile, {

// Namespace used framework-wide for data-attrs. Default is no namespace

ns: "",

// Retrieve an attribute from an element and perform some massaging of the value

getAttribute: function( e, key, dns ) {
var value;

if ( dns ) {
key = "data-" + $.mobile.ns + key;
}

value = e.getAttribute( key );

return value === "true" ? true :
value === "false" ? false :
value === null ? undefined : value;
},

// Expose our cache for testing purposes.
nsNormalizeDict: nsNormalizeDict,

// Take a data attribute property, prepend the namespace
// and then camel case the attribute string. Add the result
// to our nsNormalizeDict so we don't have to do this again.
nsNormalize: function( prop ) {
return nsNormalizeDict[ prop ] || ( nsNormalizeDict[ prop ] = $.camelCase( $.mobile.ns + prop ) );
},

// Find the closest javascript page element to gather settings data jsperf test
// http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit
// possibly naive, but it shows that the parsing overhead for *just* the page selector vs
// the page and dialog selector is negligable. This could probably be speed up by
// doing a similar parent node traversal to the one found in the inherited theme code above
closestPageData: function( $target ) {
return $target
.closest( ":jqmData(role='page'), :jqmData(role='dialog')" )
.data( "mobile-page" );
}

});
// Mobile version of data and removeData and hasData methods
// ensures all data is set and retrieved using jQuery Mobile's data namespace
$.fn.jqmData = function( prop, value ) {
var result;
if ( typeof prop !== "undefined" ) {
if ( prop ) {
prop = $.mobile.nsNormalize( prop );
}

// undefined is permitted as an explicit input for the second param
// in this case it returns the value and does not set it to undefined
if( arguments.length < 2 || value === undefined ){
result = this.data( prop );
} else {
result = this.data( prop, value );
}
}
return result;
};

$.jqmData = function( elem, prop, value ) {
var result;
if ( typeof prop !== "undefined" ) {
result = $.data( elem, prop ? $.mobile.nsNormalize( prop ) : prop, value );
}
return result;
};

$.fn.jqmRemoveData = function( prop ) {
return this.removeData( $.mobile.nsNormalize( prop ) );
};

$.jqmRemoveData = function( elem, prop ) {
return $.removeData( elem, $.mobile.nsNormalize( prop ) );
};


$.find = function( selector, context, ret, extra ) {
selector = selector.replace( jqmDataRE, "[data-" + ( $.mobile.ns || "" ) + "$1]" );

return oldFind.call( this, selector, context, ret, extra );
};

$.extend( $.find, oldFind );

})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
@@ -0,0 +1,90 @@
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Default values for jQuery Mobile
//>>label: Defaults
//>>group: Core
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQuery, ns, pkg, __version__ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
__version__ = ( pkg && pkg.version ) || "dev";
//>>excludeEnd("jqmBuildExclude");
$.extend($.mobile, {

// Version of the jQuery Mobile Framework
version: __version__,

// Define the url parameter used for referencing widget-generated sub-pages.
// Translates to to example.html&ui-page=subpageIdentifier
// hash segment before &ui-page= is used to make Ajax request
subPageUrlKey: "ui-page",

// Class assigned to page currently in view, and during transitions
activePageClass: "ui-page-active",

// Class used for "active" button state, from CSS framework
activeBtnClass: "ui-btn-active",

// Class used for "focus" form element state, from CSS framework
focusClass: "ui-focus",

// Automatically handle clicks and form submissions through Ajax, when same-domain
ajaxEnabled: true,

// Automatically load and show pages based on location.hash
hashListeningEnabled: true,

// disable to prevent jquery from bothering with links
linkBindingEnabled: true,

// Set default page transition - 'none' for no transitions
defaultPageTransition: "fade",

// Set maximum window width for transitions to apply - 'false' for no limit
maxTransitionWidth: false,

// Minimum scroll distance that will be remembered when returning to a page
minScrollBack: 250,

// DEPRECATED: the following property is no longer in use, but defined until 2.0 to prevent conflicts
touchOverflowEnabled: false,

// Set default dialog transition - 'none' for no transitions
defaultDialogTransition: "pop",

// Error response message - appears when an Ajax page request fails
pageLoadErrorMessage: "Error Loading Page",

// For error messages, which theme does the box uses?
pageLoadErrorMessageTheme: "e",

// replace calls to window.history.back with phonegaps navigation helper
// where it is provided on the window object
phonegapNavigationEnabled: false,

//automatically initialize the DOM when it's ready
autoInitializePage: true,

pushStateEnabled: true,

// allows users to opt in to ignoring content by marking a parent element as
// data-ignored
ignoreContentEnabled: false,

buttonMarkup: {
hoverDelay: 200
},

// disable the alteration of the dynamic base tag or links in the case
// that a dynamic base tag isn't supported
dynamicBaseEnabled: true,

// default the property to remove dependency on assignment in init module
pageContainer: $()
});
})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
@@ -9,13 +9,9 @@ define( [ "jquery", "jquery.mobile.registry" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

// filter function removes whitespace between label and form element so we can use inline-block (nodeType 3 = text)
// Deprecated in 1.4
$.fn.fieldcontain = function(/* options */) {
return this
.addClass( "ui-field-contain ui-body ui-br" )
.contents().filter( function() {
return ( this.nodeType === 3 && !/\S/.test( this.nodeValue ) );
}).remove();
return this.addClass( "ui-field-contain" );
};

//auto self-init widgets
@@ -0,0 +1,215 @@
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>description: Helper functions and refrences
//>>label: Helpers
//>>group: Core
//>>css.structure: ../css/structure/jquery.mobile.core.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "./jquery.mobile.ns", "json!../package.json" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {

// jQuery.mobile configurable options
$.extend($.mobile, {
// define the window and the document objects
window: $( window ),
document: $( document ),

//TODO: Remove once we pull in UI Core
keyCode: {
BACKSPACE: 8,
COMMA: 188,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
LEFT: 37,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SPACE: 32,
TAB: 9,
UP: 38
},

// Place to store various widget extensions
behaviors: {},
// Scroll page vertically: scroll to 0 to hide iOS address bar, or pass a Y value
silentScroll: function( ypos ) {
if ( $.type( ypos ) !== "number" ) {
ypos = $.mobile.defaultHomeScroll;
}

// prevent scrollstart and scrollstop events
$.event.special.scrollstart.enabled = false;

setTimeout( function() {
window.scrollTo( 0, ypos );
$.mobile.document.trigger( "silentscroll", { x: 0, y: ypos });
}, 20 );

setTimeout( function() {
$.event.special.scrollstart.enabled = true;
}, 150 );
},

// DEPRECATED in 1.4
// Find the closest parent with a theme class on it. Note that
// we are not using $.fn.closest() on purpose here because this
// method gets called quite a bit and we need it to be as fast
// as possible.
getInheritedTheme: function( el, defaultTheme ) {
var e = el[ 0 ],
ltr = "",
re = /ui-(bar|body|overlay)-([a-z])\b/,
c, m;
while ( e ) {
c = e.className || "";
if ( c && ( m = re.exec( c ) ) && ( ltr = m[ 2 ] ) ) {
// We found a parent with a theme class
// on it so bail from this loop.
break;
}

e = e.parentNode;
}
// Return the theme letter we found, if none, return the
// specified default.
return ltr || defaultTheme || "a";
},

// TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers
//

enhanceable: function( $set ) {
return this.haveParents( $set, "enhance" );
},

hijackable: function( $set ) {
return this.haveParents( $set, "ajax" );
},

haveParents: function( $set, attr ) {
if ( !$.mobile.ignoreContentEnabled ) {
return $set;
}

var count = $set.length,
$newSet = $(),
e, $element, excluded,
i, c;

for ( i = 0; i < count; i++ ) {
$element = $set.eq( i );
excluded = false;
e = $set[ i ];

while ( e ) {
c = e.getAttribute ? e.getAttribute( "data-" + $.mobile.ns + attr ) : "";

if ( c === "false" ) {
excluded = true;
break;
}

e = e.parentNode;
}

if ( !excluded ) {
$newSet = $newSet.add( $element );
}
}

return $newSet;
},

getScreenHeight: function() {
// Native innerHeight returns more accurate value for this across platforms,
// jQuery version is here as a normalized fallback for platforms like Symbian
return window.innerHeight || $.mobile.window.height();
},

//simply set the active page's minimum height to screen height, depending on orientation
resetActivePageHeight: function( height ) {
var aPage = $( "." + $.mobile.activePageClass ),
aPageHeight = aPage.height(),
aPageOuterHeight = aPage.outerHeight( true );

height = ( typeof height === "number" ) ? height : $.mobile.getScreenHeight();

aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
}
});

$.fn.removeWithDependents = function() {
$.removeWithDependents( this );
};

$.removeWithDependents = function( elem ) {
var $elem = $( elem );

( $elem.jqmData( "dependents" ) || $() ).remove();
$elem.remove();
};

$.fn.addDependents = function( newDependents ) {
$.addDependents( this , newDependents );
};

$.addDependents = function( elem, newDependents ) {
var $elem = $( elem ),
dependents = $elem.jqmData( "dependents" ) || $();

$elem.jqmData( "dependents", $( dependents ).add( newDependents ) );
};

// note that this helper doesn't attempt to handle the callback
// or setting of an html element's text, its only purpose is
// to return the html encoded version of the text in all cases. (thus the name)
$.fn.getEncodedText = function() {
return $( "<a>" ).text( $( this ).text() ).html();
};

// fluent helper function for the mobile namespaced equivalent
$.fn.jqmEnhanceable = function() {
return $.mobile.enhanceable( this );
};

$.fn.jqmHijackable = function() {
return $.mobile.hijackable( this );
};

$.find.matches = function( expr, set ) {
return $.find( expr, null, null, set );
};

$.find.matchesSelector = function( node, expr ) {
return $.find( expr, null, null, [ node ] ).length > 0;
};
//Needed for ui widgets
//TODO: Remove once ui core is pulled in
var uuid = 0,
runiqueId = /^ui-id-\d+$/;
$.fn.extend({
uniqueId: function() {
return this.each(function() {
if ( !this.id ) {
this.id = "ui-id-" + (++uuid);
}
});
},
removeUniqueId: function() {
return this.each(function() {
if ( runiqueId.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
});
}
});
})( jQuery, this );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
//>>excludeEnd("jqmBuildExclude");
@@ -6,7 +6,9 @@

define([
"jquery",
"./jquery.mobile.core",
"./jquery.mobile.defaults",
"./jquery.mobile.helpers",
"./jquery.mobile.data",
"./jquery.mobile.support",
"./events/navigate",
"./navigation/path",
@@ -41,6 +41,8 @@ define([
"./widgets/table",
"./widgets/table.columntoggle",
"./widgets/table.reflow",
"./widgets/jquery.ui.tabs",
"./widgets/tabs",
"./jquery.mobile.zoom",
"./jquery.mobile.zoom.iosorientationfix"
], function( require ) {
@@ -4,7 +4,10 @@
//>>group: Utilities


define( [ "jquery", "jquery.mobile.core", "jquery.mobile.registry" ], function( jQuery ) {
define( [ "jquery",
"jquery.mobile.core",
"navigation/path",
"jquery.mobile.registry" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

@@ -18,21 +21,23 @@ $.mobile._enhancer.add( "mobile.links", undefined, function( target ) {
.each( function() {
// Accessibility info for popups
var e = this,
href = $( this ).attr( "href" );
href = $( this ).attr( "href" ),
sel = $.mobile.path.hashToSelector( href ),
idref = href.substring( 1 );

e.setAttribute( "aria-haspopup", true );
e.setAttribute( "aria-owns", href );
e.setAttribute( "aria-owns", idref );
e.setAttribute( "aria-expanded", false );
$( document )
.on( "popupafteropen", href, function() {
.on( "popupafteropen", sel, function() {
e.setAttribute( "aria-expanded", true );
})
.on( "popupafterclose", href, function() {
.on( "popupafterclose", sel, function() {
e.setAttribute( "aria-expanded", false );
});
})
.end()
.not( ".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')" )
.not( ".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')" )
.addClass( "ui-link" );

});
@@ -97,8 +97,6 @@ define( [
//initial value. If a base tag does not exist, then we default to the documentUrl.
documentBase = path.documentBase,

getScreenHeight = $.mobile.getScreenHeight,

//base element management, defined depending on dynamic base tag support
base = {
//define base element, for use in routing asset urls that are referenced in Ajax-requested markup
@@ -307,17 +305,6 @@ define( [
return promise;
}

//simply set the active page's minimum height to screen height, depending on orientation
$.mobile.resetActivePageHeight = function resetActivePageHeight( height ) {
var aPage = $( "." + $.mobile.activePageClass ),
aPageHeight = aPage.height(),
aPageOuterHeight = aPage.outerHeight( true );

height = ( typeof height === "number" ) ? height : getScreenHeight();

aPage.css( "min-height", height - ( aPageOuterHeight - aPageHeight ) );
};

//shared page enhancements
function enhancePage( $page, role ) {
// If a role was specified, make sure the data-role attribute
@@ -237,7 +237,7 @@ nokiaLTE7_3 = (function() {
// default enhanced qualifications are media query support OR IE 7+

$.mobile.gradeA = function() {
return ( $.support.mediaquery || $.mobile.browser.oldIE && $.mobile.browser.oldIE >= 7 ) && ( $.support.boundingRect || $.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/) !== null );
return ( ( $.support.mediaquery && $.support.cssPseudoElement ) || $.mobile.browser.oldIE && $.mobile.browser.oldIE >= 8 ) && ( $.support.boundingRect || $.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/) !== null );
};

$.mobile.ajaxBlacklist =
@@ -8,7 +8,7 @@ define( [ "jquery", "./jquery.mobile.ns", "jquery.ui.widget" ], function( jQuery
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.widget", {
$.extend( $.Widget.prototype, {
_getCreateOptions: function() {

var elem = this.element,
@@ -51,13 +51,10 @@ $.widget( "mobile.widget", {
}

$widgetElements[ this.widgetName ]();
},

raise: function( msg ) {
throw "Widget [" + this.widgetName + "]: " + msg;
}
});

//TODO: Remove in 1.5 for backcompat only
$.mobile.widget = $.Widget;
})( jQuery );
//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
});
@@ -11,6 +11,9 @@ requirejs.config({
"jquery.ui.widget": {
deps: [ "jquery" ],
exports: "$.widget"
},
"widgets/jquery.ui.tabs": {
deps: [ "jquery.ui.widget" ]
}
}
});
@@ -5,13 +5,17 @@
//>>css.structure: ../css/structure/jquery.mobile.collapsible.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.buttonMarkup", "../jquery.mobile.registry" ], function( jQuery ) {
define( [
"jquery",
"../jquery.mobile.core",
"../jquery.mobile.widget",
"../jquery.mobile.registry" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

var getAttr = $.mobile.getAttribute;

$.widget( "mobile.collapsible", $.mobile.widget, {
$.widget( "mobile.collapsible", {
options: {
expandCueText: " click to expand contents",
collapseCueText: " click to collapse contents",
@@ -45,10 +49,7 @@ $.widget( "mobile.collapsible", $.mobile.widget, {

// If we are in a collapsible set
if ( collapsibleSet.length ) {
// Inherit the theme from collapsible-set
if ( !o.theme ) {
o.theme = getAttr( collapsibleSet[ 0 ], "theme", true ) || $.mobile.getInheritedTheme( collapsibleSet, "c" );
}

// Inherit the content-theme from collapsible-set
if ( !o.contentTheme ) {
o.contentTheme = getAttr( collapsibleSet[ 0 ], "content-theme", true );
@@ -75,11 +76,6 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
if ( !o.mini ) {
o.mini = getAttr( collapsibleSet[ 0 ], "mini", true );
}
} else {
// get inherited theme if not a set and no theme has been set
if ( !o.theme ) {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
}
}

if ( !!o.inset ) {
@@ -105,14 +101,9 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.wrapInner( "<a href='#' class='ui-collapsible-heading-toggle'></a>" )
.find( "a" )
.first()
.buttonMarkup({
shadow: false,
corners: false,
iconpos: o.iconpos,
icon: o.collapsedIcon,
mini: o.mini,
theme: o.theme
});
.addClass( "ui-btn ui-icon-" + o.collapsedIcon + " ui-btn-icon-" + o.iconpos +
( o.theme ? " ui-btn-" + o.theme : "" ) +
( o.mini ? " ui-mini" : "" ) );

$.extend( this, {
_collapsibleHeading: collapsibleHeading,
@@ -158,12 +149,11 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
.find( ".ui-collapsible-heading-status" )
.text( isCollapse ? o.expandCueText : o.collapseCueText )
.end()
.find( ".ui-icon" )
.find( "a" ).first()
.toggleClass( "ui-icon-" + o.expandedIcon, !isCollapse )
// logic or cause same icon for expanded/collapsed state would remove the ui-icon-class
.toggleClass( "ui-icon-" + o.collapsedIcon, ( isCollapse || o.expandedIcon === o.collapsedIcon ) )
.end()
.find( "a" ).first().removeClass( $.mobile.activeBtnClass );
.removeClass( $.mobile.activeBtnClass );

this.element.toggleClass( "ui-collapsible-collapsed", isCollapse );
this._collapsibleContent
@@ -9,20 +9,23 @@ define( [ "jquery", "../jquery.mobile.widget", "./collapsible", "./addFirstLastC
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.collapsibleset", $.mobile.widget, $.extend( {
$.widget( "mobile.collapsibleset", $.extend( {
_create: function() {
var $el = this.element.addClass( "ui-collapsible-set" ),
o = this.options;
var $el = this.element,
o = this.options,
classes = "ui-collapsible-set";

// Inherit the theme from collapsible-set
if ( !o.theme ) {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
o.theme = $el.jqmData( "theme" );
}
if ( o.theme ) {
classes += " ui-group-theme-" + o.theme;
}
// Inherit the content-theme from collapsible-set

if ( !o.contentTheme ) {
o.contentTheme = $el.jqmData( "content-theme" );
}
// Inherit the corner styling from collapsible-set

if ( !o.corners ) {
o.corners = $el.jqmData( "corners" );
}
@@ -34,9 +37,11 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, $.extend( {
o.corners = o.corners !== undefined ? o.corners : true;

if ( !!o.corners && !!o.inset ) {
$el.addClass( "ui-corner-all" );
classes += " ui-corner-all";
}

$el.addClass( classes );

// Initialize the collapsible set if it's not already initialized
if ( !$el.jqmData( "collapsiblebound" ) ) {
$el
@@ -6,15 +6,15 @@
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery",
"../jquery.mobile.buttonMarkup",
"./addFirstLastClasses",
"../jquery.mobile.registry",
"../jquery.mobile.widget" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.controlgroup", $.mobile.widget, $.extend( {
$.widget( "mobile.controlgroup", $.extend( {
options: {
theme: null,
shadow: false,
corners: true,
excludeInvisible: true,
@@ -56,12 +56,20 @@ $.widget( "mobile.controlgroup", $.mobile.widget, $.extend( {
this.refresh();
}

if ( o.theme !== undefined ) {
$el.removeClass( "ui-group-theme-" + this.options.theme );

if ( o.theme ) {
$el.addClass( "ui-group-theme-" + o.theme );
}
}

if ( o.corners !== undefined ) {
$el.toggleClass( "ui-corner-all", o.corners );
}

if ( o.shadow !== undefined ) {
$el.toggleClass( "ui-shadow", o.shadow );
$el.find( ".ui-controlgroup-controls" ).toggleClass( "ui-shadow", o.shadow );
}

if ( o.mini !== undefined ) {
@@ -76,7 +84,7 @@ $.widget( "mobile.controlgroup", $.mobile.widget, $.extend( {
},

refresh: function() {
var $el = this.element,
var $el = this.container(),
els = $el.find( ".ui-btn" ).not( ".ui-slider-handle" ),
create = this._initialRefresh;
if ( $.mobile.checkboxradio ) {
@@ -90,7 +98,7 @@ $.widget( "mobile.controlgroup", $.mobile.widget, $.extend( {
$.mobile.controlgroup.initSelector = ":jqmData(role='controlgroup')";

$.mobile._enhancer.add( "mobile.controlgroup", {
dependencies: [ "mobile.selectmenu", "mobile.button", "mobile.buttonmarkup", "mobile.checkboxradio" ]
dependencies: [ "mobile.selectmenu", "mobile.button", "mobile.checkboxradio" ]
});

})(jQuery);
@@ -5,13 +5,13 @@
//>>css.structure: ../css/structure/jquery.mobile.dialog.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.navigation", "./optionDemultiplexer" ], function( jQuery ) {
define( [ "jquery", "../jquery.mobile.widget", "./page", "../jquery.mobile.navigation", "./optionDemultiplexer" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, window, undefined ) {

$.widget( "mobile.dialog", $.mobile.widget, $.extend( {
$.widget( "mobile.dialog", $.extend( {
options: {
closeBtn: "left",
closeBtn: "left", /* Accepts left, right and none */
closeBtnText: "Close",
overlayTheme: "a",
corners: true
@@ -39,7 +39,7 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
"class" : "ui-dialog-contain ui-overlay-shadow" + cornerClass
});

$el.addClass( "ui-dialog ui-overlay-" + this.options.overlayTheme );
$el.addClass( "ui-dialog" );

// Class the markup for dialog styling
// Set aria role
@@ -76,9 +76,6 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
},

_setOverlayTheme: function( value ) {
this.element
.removeClass( "ui-overlay-" + this.options.overlayTheme )
.addClass( "ui-overlay-" + value );
if ( $.mobile.activePage[ 0 ] === this.element[ 0 ] ) {
this.options.overlayTheme = value;
this._handlePageBeforeShow();
@@ -91,7 +88,7 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
},

_setCloseBtn: function( value ) {
var self = this, btn, location;
var self = this, btn, location, dst;

if ( this._headerCloseButton ) {
this._headerCloseButton.remove();
@@ -100,21 +97,23 @@ $.widget( "mobile.dialog", $.mobile.widget, $.extend( {
if ( value !== "none" ) {
// Sanitize value
location = ( value === "left" ? "left" : "right" );
btn = $( "<a href='#' class='ui-btn-" + location + "' data-" + $.mobile.ns + "icon='delete' data-" + $.mobile.ns + "iconpos='notext'>"+ this.options.closeBtnText + "</a>" );
this.element.children().find( ":jqmData(role='header')" ).first().prepend( btn );
if ( $.fn.buttonMarkup ) {
btn.buttonMarkup();
}

// this must be an anonymous function so that select menu dialogs can replace
// the close method. This is a change from previously just defining data-rel=back
// on the button and letting nav handle it
//
// Use click rather than vclick in order to prevent the possibility of unintentionally
// reopening the dialog if the dialog opening item was directly under the close button.
btn.bind( "click", function() {
self.close();
});
dst = this.element.children().find( ":jqmData(role='header')" ).first();
btn = $( "<a></a>", {
"href": "#",
"class": "ui-btn ui-btn-" + location +
" ui-corner-all ui-icon-delete ui-btn-icon-notext"
})
.text( this.options.closeBtnText )
.prependTo( dst )
// this must be an anonymous function so that select menu dialogs can replace
// the close method. This is a change from previously just defining data-rel=back
// on the button and letting nav handle it
//
// Use click rather than vclick in order to prevent the possibility of unintentionally
// reopening the dialog if the dialog opening item was directly under the close button.
.bind( "click", function() {
self.close();
});

this._headerCloseButton = btn;
}
@@ -5,7 +5,7 @@
//>>css.structure: ../css/structure/jquery.mobile.fixedToolbar.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jquery.mobile.navigation", "./page","../jquery.mobile.zoom", "../jquery.mobile.registry" ], function( jQuery ) {
define( [ "jquery", "../jquery.mobile.widget", "../jquery.mobile.core", "../jquery.mobile.navigation", "./page","./toolbar","../jquery.mobile.zoom", "../jquery.mobile.registry" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

@@ -5,153 +5,145 @@
//>>css.structure: ../css/structure/jquery.mobile.button.css
//>>css.theme: ../css/themes/default/jquery.mobile.theme.css

define( [ "jquery", "../../jquery.mobile.widget", "../../jquery.mobile.buttonMarkup", "../../jquery.mobile.registry" ], function( jQuery ) {
define( [ "jquery", "../../jquery.mobile.widget", "../../jquery.mobile.registry" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

function splitOptions( o ) {
var key, ret = { btn: {}, widget: {} };

for ( key in o ) {
if ( o[ key ] !== null ) {
if ( key === "disabled" ) {
ret.widget.disabled = o[ key ];
ret.haveWidget = true;
} else if ( key !== "initSelector" ) {
ret.btn[ key ] = o[ key ];
ret.haveBtn = true;
}
}
}

return ret;
}

$.widget( "mobile.button", $.mobile.widget, {
$.widget( "mobile.button", {
options: {
theme: null,
icon: null,
iconpos: null,
iconshadow: false, /* TODO: Deprecated in 1.4, remove in 1.5. */
corners: true,
shadow: true,
iconshadow: true,
inline: null,
mini: null
},

_create: function() {
var $button,
o = this.options,
$el = this.element,
classes = "";
isInput = $el[ 0 ].tagName === "INPUT",
classes = "ui-btn";

// if this is a link, check if it's been enhanced and, if not, use the right function
if ( $el[ 0 ].tagName === "A" ) {
if ( !$el.hasClass( "ui-btn" ) ) {
$el.buttonMarkup();
}
return;
}
if ( isInput ) {
classes += " ui-input-btn";

// get the inherited theme
// TODO centralize for all widgets
if ( !o.theme ) {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
}
o.disabled = $el.prop( "disabled" );
o = splitOptions( o );

// TODO: Post 1.1--once we have time to test thoroughly--any classes manually applied to the original element should be carried over to the enhanced element, with an `-enhanced` suffix. See https://github.com/jquery/jquery-mobile/issues/3577
/* if ( $el[0].className.length ) {
classes = $el[0].className;
} */
if ( !!~$el[ 0 ].className.indexOf( "ui-btn-left" ) ) {
classes = "ui-btn-left";
}
// TODO: data-class and data-id options. See https://github.com/jquery/jquery-mobile/issues/3577
if ( !!~$el[ 0 ].className.indexOf( "ui-btn-left" ) ) {
classes += " ui-btn-left";
}
if ( !!~$el[ 0 ].className.indexOf( "ui-btn-right" ) ) {
classes += " ui-btn-right";
}

if ( !!~$el[ 0 ].className.indexOf( "ui-btn-right" ) ) {
classes = "ui-btn-right";
this.button = $( "<div></div>" )
[ "text" ]( $el.val() )
.insertBefore( $el )
.addClass( classes )
.append( $el );

$button = this.button;

this._on( $el, {
focus: function() {
$button.addClass( $.mobile.focusClass );
},

blur: function() {
$button.removeClass( $.mobile.focusClass );
}
});
} else {
this.button = $el.addClass( classes );
}

if ( $el.attr( "type" ) === "submit" || $el.attr( "type" ) === "reset" ) {
if ( classes ) {
classes += " ui-submit";
} else {
classes = "ui-submit";
}
}
$( "label[for='" + $el.attr( "id" ) + "']" ).addClass( "ui-submit" );

// Add ARIA role
this.button = $( "<div></div>" )
[ $el.html() ? "html" : "text" ]( $el.html() || $el.val() )
.insertBefore( $el )
.buttonMarkup( o.btn )
.addClass( classes )
.append( $el.addClass( "ui-btn-hidden" ) );
this._setOption( "disabled", o.widget.disabled );

$button = this.button;

this._on( $el, {
focus: function() {
$button.addClass( $.mobile.focusClass );
},

blur: function() {
$button.removeClass( $.mobile.focusClass );
}
$.extend( this, {
isInput: isInput,
buttonClasses: classes,
styleClasses: ""
});

this.refresh( true );
},

widget: function() {
return this.button;
},

_destroy: function() {
var b = this.button;
this.element.insertBefore( b );
b.remove();
var $button, removeClasses;
if ( this.isInput ) {
$button = this.button;

this.element.insertBefore( $button );

$button.remove();
} else {
removeClasses = this.buttonClasses + " " + this.styleClasses;

this.button.removeClass( removeClasses );
}
},

_setOptions: function( o ) {
o = splitOptions( o );
refresh: function( create ) {
var o = this.options,
$el = this.element,
classes = "";

// Resolve the buttonMarkup options
if ( o.haveBtn ) {
this.button.buttonMarkup( o.btn );
if ( o.theme ) {
classes += "ui-btn-" + o.theme;
}

// ... and pass the rest up
if ( o.haveWidget ) {
this._super( o.widget );
if ( o.corners ) {
classes += " ui-corner-all";
}
},
if ( o.shadow ) {
classes += " ui-shadow";
}
if ( o.inline ) {
classes += " ui-btn-inline";
}
if ( o.mini ) {
classes += " ui-mini";
}

if ( o.icon ) {
if ( !o.iconpos ) {
o.iconpos = "left";
}

classes += " ui-icon-" + o.icon + " ui-btn-icon-" + o.iconpos;

if ( o.iconpos === "notext" && !$el.attr( "title" ) ) {
$el.attr( "title", ( this.isInput ? $el.val() : $el.getEncodedText() ) );
}

_setOption: function( key, value ) {
var op = {};

op[ key ] = value;
if ( key === "disabled" ) {
value = !!value;
this.element.prop( "disabled", value );
// FIXME: We should be using ui-state-disabled, so we can get rid of this line
this.button.toggleClass( "ui-disabled", value );
} else if ( key !== "initSelector" ) {
this.button.buttonMarkup( op );
// Record the option change in the options and in the DOM data-* attributes
this.element.attr( "data-" + ( $.mobile.ns || "" ) + ( key.replace( /([A-Z])/, "-$1" ).toLowerCase() ), value );
/* TODO: Remove in 1.5. */
if ( o.iconshadow ) {
classes += " ui-shadow-icon";
}
}
this._super( key, value );
},

refresh: function() {
var $el = this.element;
if ( !create ) {
this.button.removeClass( this.styleClasses );
}

this._setOption( "disabled", $el.prop( "disabled" ) );
this.styleClasses = classes;

this.button.addClass( classes );

// Grab the button's text element from its implementation-independent data item
$( this.button.data( "buttonElements" ).text )[ $el.html() ? "html" : "text" ]( $el.html() || $el.val() );
/* If the button element doesn't contain text we use the value if provided */
if ( !this.isInput && this.button.text() === "" && !!this.button.val() ) {
this.button.text( this.button.val() );
}

if ( this.isInput && !create ) {
$( this.button )[ "text" ]( $el.val() ).append( $el );
}

this._setOption( "disabled", $el.prop( "disabled" ) );
}
});

@@ -12,13 +12,12 @@
define( [ "jquery",
"../../jquery.mobile.core",
"../../jquery.mobile.widget",
"../../jquery.mobile.buttonMarkup",
"../optionDemultiplexer",
"./reset" ], function( jQuery ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {

$.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
$.widget( "mobile.checkboxradio", $.extend( {
options: {
theme: null,
mini: false
@@ -34,10 +33,9 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
parentLabel = $( input ).closest( "label" ),
label = parentLabel.length ? parentLabel : $( input ).closest( "form, fieldset, :jqmData(role='page'), :jqmData(role='dialog')" ).find( "label" ).filter( "[for='" + input[0].id + "']" ).first(),
inputtype = input[0].type,
mini = inheritAttr( input, "mini" ) || o.mini,
checkedState = inputtype + "-on",
uncheckedState = inputtype + "-off",
iconpos = inheritAttr( input, "iconpos" ),
iconpos = inheritAttr( input, "iconpos" ) || label.jqmData( "iconpos" ) || "left",
checkedClass = "ui-" + checkedState,
uncheckedClass = "ui-" + uncheckedState,
wrapper;
@@ -46,20 +44,13 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
return;
}

// If there's no selected theme check the data attr
if ( !o.theme ) {
o.theme = $.mobile.getInheritedTheme( this.element, "c" );
}
// Establish options
o.mini = inheritAttr( input, "mini" ) || o.mini;

// Expose for other methods
$.extend( this, {
//save buttonMarkup options to use them in refresh
buttonMarkupOptions: {
theme: o.theme,
shadow: false,
mini: mini,
iconpos: iconpos
},
iconpos: iconpos,
input: input,
label: label,
inputtype: inputtype,
checkedClass: checkedClass,
@@ -71,8 +62,8 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
// Wrap the input + label in a div
wrapper = document.createElement( "div" );
wrapper.className = "ui-" + inputtype;

input.add( label ).wrapAll( wrapper );
label.addClass( "ui-btn ui-corner-all ui-btn-icon-" + iconpos );

this._on( label, {
vmouseover: "_handleLabelVMouseOver",
@@ -87,6 +78,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
});

this._handleFormReset();
this._setOptions( o );
this.refresh();
},

@@ -114,7 +106,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
},

_handleLabelVMouseOver: function( event ) {
if ( this.label.parent().hasClass( "ui-disabled" ) ) {
if ( this.label.parent().hasClass( "ui-state-disabled" ) ) {
event.stopPropagation();
}
},
@@ -183,20 +175,20 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
refresh: function() {
var input = this.element[ 0 ],
active = " " + $.mobile.activeBtnClass,
checkedClass = this.checkedClass + ( this.element.parents( ".ui-controlgroup-horizontal" ).length ? active : "" ),
label = this.label,
options = this.buttonMarkupOptions;

hasIcon = ( this.element.parents( ".ui-controlgroup-horizontal" ).length === 0 ),
checkedClass = this.checkedClass + ( hasIcon ? "" : active ),
label = this.label;

label
.toggleClass( "ui-btn-icon-" + this.iconpos, hasIcon )
.toggleClass( "ui-icon-" + this.checkedicon, input.checked )
.toggleClass( "ui-icon-" + this.uncheckedicon, !input.checked );
if ( input.checked ) {
options.icon = this.checkedicon;
label.removeClass( this.uncheckedClass + active ).addClass( checkedClass ).buttonMarkup( options );
label.removeClass( this.uncheckedClass + active ).addClass( checkedClass );
} else {
options.icon = this.uncheckedicon;
label.removeClass( checkedClass ).addClass( this.uncheckedClass ).buttonMarkup( options );
label.removeClass( checkedClass ).addClass( this.uncheckedClass );
}

this.buttonMarkupOptions = {};

if ( input.disabled ) {
this.disable();
} else {
@@ -205,17 +197,30 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
},

_setTheme: function( value ) {
this.label.buttonMarkup( { theme: value } );
if ( value ) {
this.label.removeClass( "ui-btn-" + this.options.theme ).addClass( "ui-btn-" + value );
}
},

_setMini: function( value ) {
this.label.buttonMarkup( { mini: !!value } );
/* TODO: expose the wrapper in _create */
this.label.parent().toggleClass( "ui-mini", !!value );
},

_setDisabled: function( value ) {
value = !!value;
this.element.prop( "disabled", value ).parent().toggleClass( "ui-disabled", value );
widget: function() {
return this.label.parent();
},

disable: function() {
this._super();
this.input.prop( "disabled", true );
},

enable: function() {
this._super();
this.input.prop( "disabled", false );
}

}, $.mobile.behaviors.formReset, $.mobile.behaviors.optionDemultiplexer ) );

$.mobile.checkboxradio.initSelector = "input[type='checkbox'],input[type='radio']";