mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-26 00:54:43 +00:00
merge changes
This commit is contained in:
commit
0438418175
5 changed files with 61 additions and 15 deletions
2
Makefile
2
Makefile
|
|
@ -110,7 +110,7 @@ init:
|
|||
|
||||
# Build the minified JS file
|
||||
min: init js
|
||||
# Build the minified Javascript file
|
||||
# Build the minified JavaScript file
|
||||
@@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${MIN}
|
||||
@@java -jar build/google-compiler-20110405.jar --js ${OUTPUT}/${JS} --warning_level QUIET --js_output_file ${MIN}.tmp
|
||||
@@cat ${MIN}.tmp >> ${OUTPUT}/${MIN}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,9 @@ $.widget( "mobile.dialog", $.mobile.widget, {
|
|||
var $target = $( e.target ).closest( e.type === "vclick" ? "a" : "form" );
|
||||
|
||||
if( $target.length && !$target.jqmData( "transition" ) ) {
|
||||
var active = $.mobile.urlHistory.getActive() || {};
|
||||
$target
|
||||
.attr( "data-" + $.mobile.ns + "transition", $.mobile.urlHistory.getActive().transition )
|
||||
.attr( "data-" + $.mobile.ns + "transition", ( active.transition || $.mobile.defaultDialogTransition ) )
|
||||
.attr( "data-" + $.mobile.ns + "direction", "reverse" );
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
}
|
||||
|
||||
self._cacheVals();
|
||||
|
||||
input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
|
||||
|
||||
input.prop( "checked", inputtype === "radio" && true || !(input.prop("checked")) );
|
||||
|
||||
// input set for common radio buttons will contain all the radio
|
||||
// buttons, but will not for checkboxes. clearing the checked status
|
||||
// of other radios ensures the active button state is applied properly
|
||||
self._getInputSet().not(input).removeAttr('checked');
|
||||
self._getInputSet().not(input).prop('checked', false);
|
||||
|
||||
self._updateAll();
|
||||
return false;
|
||||
|
|
@ -79,6 +79,13 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
},
|
||||
|
||||
vclick: function(){
|
||||
// adds checked attribute to checked input when keyboard is used
|
||||
if ($(this).is(":checked")) {
|
||||
$(this).prop( "checked", true);
|
||||
self._getInputSet().not($(this)).prop('checked', false);
|
||||
} else {
|
||||
$(this).prop("checked", false);
|
||||
}
|
||||
self._updateAll();
|
||||
},
|
||||
|
||||
|
|
@ -125,7 +132,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
|||
|
||||
// input[0].checked expando doesn't always report the proper value
|
||||
// for checked='checked'
|
||||
if ( $(input[0]).attr('checked') ) {
|
||||
if ( $(input[0]).prop('checked') ) {
|
||||
label.addClass( $.mobile.activeBtnClass );
|
||||
icon.addClass( this.checkedicon ).removeClass( this.uncheckedicon );
|
||||
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@
|
|||
|
||||
// The absolute version of the URL passed into the function. This
|
||||
// version of the URL may contain dialog/subpage params in it.
|
||||
absUrl = url, // XXX_jblas: path.makeAbsolute( url ),
|
||||
absUrl = path.stripHash( url ), // XXX_jblas: path.makeAbsolute( url ),
|
||||
|
||||
// The absolute version of the URL minus any dialog/subpage params.
|
||||
// In otherwords the real URL of the page to be loaded.
|
||||
|
|
@ -421,8 +421,9 @@
|
|||
settings.data = $.param( settings.data );
|
||||
}
|
||||
// XXX_jblas: We should be checking to see if the url already has a query in it.
|
||||
url += url + "?" + settings.data;
|
||||
absUrl += absUrl + "?" + settings.data;
|
||||
settings.data = undefined;
|
||||
fileUrl = path.getFilePath( absUrl );
|
||||
}
|
||||
|
||||
// Check to see if the page already exists in the DOM.
|
||||
|
|
@ -440,7 +441,7 @@
|
|||
if ( page.length ) {
|
||||
if ( !settings.reloadPage ) {
|
||||
enhancePage( page, settings.role );
|
||||
deferred.resolve( url, options, page );
|
||||
deferred.resolve( absUrl, options, page );
|
||||
return deferred.promise();
|
||||
}
|
||||
dupCachedPage = page;
|
||||
|
|
@ -527,7 +528,7 @@
|
|||
$.mobile.hidePageLoadingMsg();
|
||||
}
|
||||
|
||||
deferred.resolve( url, options, page, dupCachedPage );
|
||||
deferred.resolve( absUrl, options, page, dupCachedPage );
|
||||
},
|
||||
error: function() {
|
||||
//set base back to current path
|
||||
|
|
@ -549,7 +550,7 @@
|
|||
});
|
||||
}
|
||||
|
||||
deferred.reject( url, options );
|
||||
deferred.reject( absUrl, options );
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -558,7 +559,7 @@
|
|||
|
||||
$.mobile.loadPage.defaults = {
|
||||
type: "get",
|
||||
data: "undefined",
|
||||
data: undefined,
|
||||
reloadPage: false,
|
||||
role: "page",
|
||||
showLoadMsg: true,
|
||||
|
|
@ -567,6 +568,43 @@
|
|||
|
||||
// Show a specific page in the page container.
|
||||
$.mobile.changePage = function( toPage, options ) {
|
||||
// XXX: REMOVE_BEFORE_SHIPPING_1.0
|
||||
// This is temporary code that makes changePage() compatible with previous alpha versions.
|
||||
if ( typeof options !== "object" ) {
|
||||
var opts = null;
|
||||
|
||||
// Map old-style call signature for form submit to the new options object format.
|
||||
if ( typeof toPage === "object" && toPage.url && toPage.type ) {
|
||||
opts = {
|
||||
type: toPage.type,
|
||||
data: toPage.data,
|
||||
forcePageLoad: true
|
||||
};
|
||||
toPage = toPage.url;
|
||||
}
|
||||
|
||||
// The arguments passed into the function need to be re-mapped
|
||||
// to the new options object format.
|
||||
var len = arguments.length;
|
||||
if ( len > 1 ) {
|
||||
var argNames = [ "transition", "reverse", "changeHash", "fromHashChange" ], i;
|
||||
for ( i = 1; i < len; i++ ) {
|
||||
var a = arguments[ i ];
|
||||
if ( typeof a !== "undefined" ) {
|
||||
opts = opts || {};
|
||||
opts[ argNames[ i - 1 ] ] = a;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If an options object was created, then we know changePage() was called
|
||||
// with an old signature.
|
||||
if ( opts ) {
|
||||
return $.mobile.changePage( toPage, opts );
|
||||
}
|
||||
}
|
||||
// XXX: REMOVE_BEFORE_SHIPPING_1.0
|
||||
|
||||
// If we are in the midst of a transition, queue the current request.
|
||||
// We'll call changePage() once we're done with the current transition to
|
||||
// service the request.
|
||||
|
|
|
|||
|
|
@ -14,14 +14,14 @@
|
|||
.ui-mobile-viewport { margin: 0; overflow-x: hidden; -webkit-text-size-adjust: none; -ms-text-size-adjust:none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
||||
|
||||
/* "page" containers - full-screen views, one should always be in view post-pageload */
|
||||
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; position: absolute; display: none; border: 0; }
|
||||
.ui-mobile [data-role=page], .ui-mobile [data-role=dialog], .ui-page { top: 0; left: 0; width: 100%; min-height: 100%; height: auto !important; height: 100%; position: absolute; display: none; border: 0; }
|
||||
.ui-mobile .ui-page-active { display: block; overflow: visible; }
|
||||
|
||||
/*orientations from js are available */
|
||||
.portrait,
|
||||
.portrait .ui-page { min-height: 100%; }
|
||||
.portrait .ui-page,
|
||||
.landscape,
|
||||
.landscape .ui-page { min-height: 100%; }
|
||||
.landscape .ui-page { min-height: 100%; height: auto !important; height: 100%; }
|
||||
|
||||
/* loading screen */
|
||||
.ui-loading .ui-mobile-viewport { overflow: hidden !important; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue