mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-17 06:20:26 +00:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
2dadb4dbc4
32 changed files with 67 additions and 46 deletions
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery UI Mobile Framework - About</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
@ -34,4 +34,4 @@
|
|||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery UI Mobile Framework - API</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
@ -35,4 +35,4 @@
|
|||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery UI Mobile Framework - Documentation</title>
|
||||
<link rel="stylesheet" media="only all" href="../themes/default/" />
|
||||
<link rel="stylesheet" href="../themes/default/" />
|
||||
<link rel="stylesheet" href="_assets/css/jqm-docs.css"/>
|
||||
<script src="../js/jquery.js"></script>
|
||||
<script src="../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
@ -35,4 +35,4 @@
|
|||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Animals</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
</head>
|
||||
|
|
@ -22,4 +22,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Colors</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
</head>
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Dynamic Page Samples</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
</head>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>changePage JSON Sample</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>changePage JSON Sample</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>Vehicles</title>
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<link rel="stylesheet" href="../../../themes/default/">
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
</head>
|
||||
|
|
@ -22,4 +22,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Anatomy of a Page</title>
|
||||
<link rel="stylesheet" media="only all" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Prefetching & caching pages</title>
|
||||
<link rel="stylesheet" media="only all" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Dialogs</title>
|
||||
<link rel="stylesheet" media="only all" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Dynamically Injecting Pages</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Ajax, hashes & history</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Docs - Scripting pages</title>
|
||||
<link rel="stylesheet" media="only all" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Main Page</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Main Page</title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<script src="../../js/jquery.js"></script>
|
||||
<script src="../../js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Scrollview Test 02 - Scrollview Events Test</title>
|
||||
<link rel="stylesheet" href="../../themes/default/"/>
|
||||
<link rel="stylesheet" href="jquery.mobile.scrollview.css" />
|
||||
<link rel="stylesheet" href="../../themes/default/"/>
|
||||
<link rel="stylesheet" href="jquery.mobile.scrollview.css" />
|
||||
<link rel="stylesheet" href="../../docs/_assets/css/jqm-docs.css"/>
|
||||
<style>
|
||||
#evtCatcher {
|
||||
|
|
@ -238,4 +238,4 @@ $(function(){
|
|||
<!-- /page -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ $forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Framework - Weather for <?php echo $information[0]->city['data']; ?></title>
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<link rel="stylesheet" href="../../themes/default/" />
|
||||
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
|
||||
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
|
||||
<style>
|
||||
|
|
@ -86,4 +86,4 @@ $forecast_list = $xml->xpath("/xml_api_reply/weather/forecast_conditions");
|
|||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
label = widget.label,
|
||||
thisPage = widget.select.closest( ".ui-page" ),
|
||||
screen = $( "<div>", {"class": "ui-selectmenu-screen ui-screen-hidden"} ).appendTo( thisPage ),
|
||||
selectOptions = widget.select.find("option"),
|
||||
selectOptions = widget._selectOptions(),
|
||||
isMultiple = widget.isMultiple = widget.select[ 0 ].multiple,
|
||||
buttonId = selectID + "-button",
|
||||
menuId = selectID + "-menu",
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
// index of option tag to be selected
|
||||
var oldIndex = self.select[ 0 ].selectedIndex,
|
||||
newIndex = self.list.find( "li:not(.ui-li-divider)" ).index( this ),
|
||||
option = self.selectOptions.eq( newIndex )[ 0 ];
|
||||
option = self._selectOptions().eq( newIndex )[ 0 ];
|
||||
|
||||
// toggle selected status on the tag for multi selects
|
||||
option.selected = self.isMultiple ? !option.selected : true;
|
||||
|
|
@ -206,7 +206,7 @@
|
|||
var self = this,
|
||||
select = this.element,
|
||||
isMultiple = this.isMultiple,
|
||||
options = this.selectOptions = select.find( "option" ),
|
||||
options = this._selectOptions(),
|
||||
selected = this.selected(),
|
||||
// return an array of all selected index's
|
||||
indicies = this.selectedIndices();
|
||||
|
|
|
|||
|
|
@ -55,6 +55,10 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
}, 40);
|
||||
},
|
||||
|
||||
_selectOptions: function() {
|
||||
return this.select.find( "option" );
|
||||
},
|
||||
|
||||
// setup items that are generally necessary for select menu extension
|
||||
_preExtension: function(){
|
||||
this.select = this.element.wrap( "<div class='ui-select'>" );
|
||||
|
|
@ -62,7 +66,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
this.label = $( "label[for='"+ this.selectID +"']" ).addClass( "ui-select" );
|
||||
this.isMultiple = this.select[ 0 ].multiple;
|
||||
this.options.theme = this._theme();
|
||||
this.selectOptions = this.select.find( "option" );
|
||||
},
|
||||
|
||||
_create: function() {
|
||||
|
|
@ -153,14 +156,14 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
},
|
||||
|
||||
selected: function() {
|
||||
return this.selectOptions.filter( ":selected" );
|
||||
return this._selectOptions().filter( ":selected" );
|
||||
},
|
||||
|
||||
selectedIndices: function() {
|
||||
var self = this;
|
||||
|
||||
return this.selected().map( function() {
|
||||
return self.selectOptions.index( this );
|
||||
return self._selectOptions().index( this );
|
||||
}).get();
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Basic Page</title>
|
||||
<link rel="stylesheet" href="../themes/default/" />
|
||||
<link rel="stylesheet" href="../themes/default/" />
|
||||
<script src="../js/jquery.js"></script>
|
||||
<script src="../js/"></script>
|
||||
<script>
|
||||
|
|
@ -64,4 +64,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<script src="../../../js/"></script>
|
||||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<script src="../../../js/"></script>
|
||||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<script src="../../../js"></script>
|
||||
<script src="select_cached.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<script src="select_events.js"></script>
|
||||
<script src="select_core.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -321,8 +321,12 @@
|
|||
<option value="long">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select name="native-refresh" id="native-refresh">
|
||||
<option value="-1">default</option>
|
||||
<option value="-1">other</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="enhancetest">
|
||||
|
|
@ -333,5 +337,6 @@
|
|||
<option value="overnight">Overnight</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -44,4 +44,17 @@
|
|||
}
|
||||
], 300);
|
||||
});
|
||||
|
||||
// issue https://github.com/jquery/jquery-mobile/issues/2410
|
||||
test( "adding options and refreshing a native select defaults the text", function() {
|
||||
var select = $( "#native-refresh" ),
|
||||
button = select.siblings( '.ui-btn-inner' ),
|
||||
text = "foo";
|
||||
|
||||
same(button.text(), "default");
|
||||
select.find( "option" ).remove(); //remove the loading message
|
||||
select.append('<option value="1">' + text + '</option>');
|
||||
select.selectmenu('refresh');
|
||||
same(button.text(), text);
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue