mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-22 17:00:24 +00:00
Merge remote branch 'origin/master'
This commit is contained in:
commit
7cd3d81e5d
6 changed files with 21 additions and 17 deletions
|
|
@ -31,8 +31,8 @@
|
|||
<head>
|
||||
<title>Page Title</title>
|
||||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
|
||||
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
|
||||
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
|
||||
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -73,8 +73,8 @@
|
|||
<head>
|
||||
<title>Page Title</title>
|
||||
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
|
||||
<script src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
|
||||
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
|
||||
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"></script>
|
||||
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
|
||||
<div data-role="footer">
|
||||
<h4>Page Footer</h4>
|
||||
</div><!-- /header -->
|
||||
</div><!-- /footer -->
|
||||
</div><!-- /page -->
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ $.event.special.tap = {
|
|||
|
||||
var moved = false,
|
||||
touching = true,
|
||||
origTarget = event.target,
|
||||
origPos = [ event.pageX, event.pageY ],
|
||||
originalType,
|
||||
timer;
|
||||
|
|
@ -97,7 +98,10 @@ $.event.special.tap = {
|
|||
clearTimeout( timer );
|
||||
touching = false;
|
||||
|
||||
if ( !moved ) {
|
||||
/* ONLY trigger a 'tap' event if the start target is
|
||||
* the same as the stop target.
|
||||
*/
|
||||
if ( !moved && (origTarget == event.target)) {
|
||||
originalType = event.type;
|
||||
event.type = "tap";
|
||||
$.event.handle.call( thisObject, event );
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
},
|
||||
_create: function(){
|
||||
var input = this.element,
|
||||
label = $("label[for='" + input.attr( "id" ) + "']"),
|
||||
label = input.closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
|
||||
inputtype = input.attr( "type" ),
|
||||
checkedicon = "ui-icon-" + inputtype + "-on",
|
||||
uncheckedicon = "ui-icon-" + inputtype + "-off";
|
||||
|
|
@ -76,7 +76,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
|
||||
refresh: function( ){
|
||||
var input = this.element,
|
||||
label = $("label[for='" + input.attr( "id" ) + "']"),
|
||||
label = input.closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
|
||||
inputtype = input.attr( "type" ),
|
||||
icon = label.find( ".ui-icon" ),
|
||||
checkedicon = "ui-icon-" + inputtype + "-on",
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
//expose to other methods
|
||||
$.extend(self, {
|
||||
select: select,
|
||||
options: options,
|
||||
selectID: selectID,
|
||||
label: label,
|
||||
buttonId:buttonId,
|
||||
|
|
@ -173,7 +174,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
|
||||
// index of option tag to be selected
|
||||
var newIndex = list.find( "li:not(.ui-li-divider)" ).index( this ),
|
||||
option = options.eq( newIndex )[0];
|
||||
option = self.options.eq( newIndex )[0];
|
||||
|
||||
// toggle selected status on the tag for multi selects
|
||||
option.selected = isMultiple ? !option.selected : true;
|
||||
|
|
@ -291,7 +292,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
|
|||
var self = this,
|
||||
select = this.element,
|
||||
isMultiple = this.isMultiple,
|
||||
options = select.find("option"),
|
||||
options = this.options = select.find("option"),
|
||||
selected = options.filter(":selected"),
|
||||
|
||||
// return an array of all selected index's
|
||||
|
|
|
|||
|
|
@ -223,11 +223,6 @@
|
|||
}
|
||||
removeActiveLinkClass();
|
||||
|
||||
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
|
||||
if( duplicateCachedPage != null ){
|
||||
duplicateCachedPage.remove();
|
||||
}
|
||||
|
||||
//jump to top or prev scroll, if set
|
||||
$.mobile.silentScroll( to.data( 'lastScroll' ) );
|
||||
|
||||
|
|
@ -236,6 +231,11 @@
|
|||
if( to.data("page")._trigger("show", null, {prevPage: from}) !== false ){
|
||||
$.mobile.activePage = to;
|
||||
}
|
||||
|
||||
//if there's a duplicateCachedPage, remove it from the DOM now that it's hidden
|
||||
if (duplicateCachedPage != null) {
|
||||
duplicateCachedPage.remove();
|
||||
}
|
||||
};
|
||||
|
||||
function addContainerClass(className){
|
||||
|
|
@ -495,4 +495,4 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
})( jQuery );
|
||||
})( jQuery );
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
.ui-btn { display: block; text-align: center; cursor:pointer; position: relative; margin: .5em 5px; padding: 0; }
|
||||
.ui-btn:focus, .ui-btn a:focus { outline: none; }
|
||||
.ui-btn:visited { color: #fff; }
|
||||
.ui-header .ui-btn, .ui-footer .ui-btn, .ui-bar .ui-btn { display: inline-block; font-size: 13px; margin: 0; }
|
||||
.ui-btn-inline { display: inline-block; }
|
||||
.ui-btn-inner { padding: .6em 25px; display: block; height: 100%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; position: relative; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue