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

Commit

Permalink
Init: Remove uses of $.mobile.pageContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
arschmitz committed Dec 10, 2015
1 parent fb55994 commit 4cf168c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
14 changes: 4 additions & 10 deletions js/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ $.extend( $.mobile, {
// find and enhance the pages in the dom and transition to the first page.
initializePage: function() {
// find present pages
var path = $.mobile.path,
var pagecontainer,
path = $.mobile.path,
$pages = $( ":jqmData(role='page'), :jqmData(role='dialog')" ),
hash = path.stripHash( path.stripQueryParams( path.parseLocation().hash ) ),
theLocation = $.mobile.path.parseLocation(),
Expand Down Expand Up @@ -100,19 +101,12 @@ $.extend( $.mobile, {
$.enhance._installWidget();

// define page container
$.mobile.pageContainer = $.mobile.firstPage
.parent()
.addClass( "ui-mobile-viewport" )
.pagecontainer();
pagecontainer = $.mobile.firstPage.parent().pagecontainer();

// initialize navigation events now, after mobileinit has occurred and the page container
// has been created but before the rest of the library is alerted to that fact
$.mobile.navreadyDeferred.resolve();

// alert listeners that the pagecontainer has been determined for binding
// to events triggered on it
$window.trigger( "pagecontainercreate" );

// cue page loading message
$.mobile.loading( "show" );

Expand All @@ -135,7 +129,7 @@ $.extend( $.mobile, {
$.mobile.navigate.navigator.squash( path.parseLocation().href );
}

$.mobile.pageContainer.pagecontainer( "change", $.mobile.firstPage, {
pagecontainer.pagecontainer( "change", $.mobile.firstPage, {
transition: "none",
reverse: true,
changeHash: false,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/init/init_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ require( [
function() {
var firstPage = findFirstPage();

assert.deepEqual( $.mobile.pageContainer[ 0 ], firstPage.parent()[ 0 ] );
assert.deepEqual( $( ".ui-pagecontainer" )[ 0 ], firstPage.parent()[ 0 ] );
}
).then( start );
} );
Expand Down

0 comments on commit 4cf168c

Please sign in to comment.