Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Make possible app to control page loading message. #4156

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions js/jquery.mobile.navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ define( [
$window.bind( "scrollstop", delayedSetLastScroll );

//function for transitioning between two existing pages
function transitionPages( toPage, fromPage, transition, reverse ) {
function transitionPages( toPage, fromPage, transition, settings ) {

if( fromPage ) {
//trigger before show/hide events
Expand All @@ -485,8 +485,10 @@ define( [
toPage.data( "page" )._trigger( "beforeshow", null, { prevPage: fromPage || $( "" ) } );

//clear page loader
$.mobile.hidePageLoadingMsg();

if (settings.showLoadMsg) {
$.mobile.hidePageLoadingMsg();
}

// If transition is defined, check if css 3D transforms are supported, and if not, if a fallback is specified
if( transition && !$.support.cssTransform3d && $.mobile.transitionFallbacks[ transition ] ){
transition = $.mobile.transitionFallbacks[ transition ];
Expand All @@ -496,7 +498,7 @@ define( [
//isn't one in our transitionHandlers dictionary, use the default one.
//call the handler immediately to kick-off the transition.
var th = $.mobile.transitionHandlers[ transition || "default" ] || $.mobile.defaultTransitionHandler,
promise = th( transition, reverse, toPage, fromPage );
promise = th( transition, settings.reverse, toPage, fromPage );

promise.done(function() {

Expand Down Expand Up @@ -1106,7 +1108,7 @@ define( [
// If we're navigating back in the URL history, set reverse accordingly.
settings.reverse = settings.reverse || historyDir < 0;

transitionPages( toPage, fromPage, settings.transition, settings.reverse )
transitionPages( toPage, fromPage, settings.transition, settings )
.done(function( name, reverse, $to, $from, alreadyFocused ) {
removeActiveLinkClass();

Expand Down