Skip to content

Commit d3703a8

Browse files
committed
Toolbar: Remove uses of $.mobile.pageContainer from fixedToolbar
1 parent 2a315c6 commit d3703a8

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

js/widgets/fixedToolbar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ return $.widget( "mobile.toolbar", $.mobile.toolbar, {
166166

167167
if ( nextFooter.length || nextHeader.length ) {
168168

169-
nextFooter.add( nextHeader ).appendTo( $.mobile.pageContainer );
169+
nextFooter.add( nextHeader ).appendTo( this.element.closest( ".ui-pagecontainer" ) );
170170

171171
ui.nextPage.one( "pageshow", function() {
172172
nextHeader.prependTo( this );

tests/integration/fixed-toolbar/fixedToolbar.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ asyncTest( "Fullscreen toolbars add classes to page", function() {
165165

166166
$.testHelper.sequence([
167167
function(){
168-
$.mobile.pageContainer.pagecontainer( "change", "#fullscreen-test-a" );
168+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#fullscreen-test-a" );
169169
},
170170

171171
function() {
@@ -194,7 +194,7 @@ asyncTest( "The persistent headers and footers are working properly", function()
194194
$.testHelper.pageSequence([
195195
function(){
196196
ok( nextpageheader.length && nextpagefooter.length, "next page has fixed header and fixed footer" );
197-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-a" );
197+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-a" );
198198
},
199199

200200
function() {
@@ -203,12 +203,12 @@ asyncTest( "The persistent headers and footers are working properly", function()
203203
ok( nextpageheader.parent( ".ui-mobile-viewport" ).length, "fixed header and footer are now a child of page container" );
204204
} );
205205

206-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-b" );
206+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-b" );
207207
},
208208

209209
function() {
210210
ok( nextpageheader.parent( ".ui-page" ).length, "fixed header and footer are now a child of page again" );
211-
$.mobile.pageContainer.pagecontainer( "change", "#default" );
211+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#default" );
212212
},
213213

214214
start
@@ -226,21 +226,21 @@ asyncTest( "The persistent headers should work without a footer", function() {
226226
$.testHelper.pageSequence([
227227
function(){
228228
ok( nextpageheader.length, "next page has fixed header and fixed footer" );
229-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-c" );
229+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-c" );
230230
},
231231

232232
function() {
233233
$( "#persist-test-d" )
234234
.one( "pagebeforeshow", function() {
235-
deepEqual( nextpageheader.parent()[ 0 ], $.mobile.pageContainer[ 0 ], "fixed header is now a child of page container" );
235+
deepEqual( nextpageheader.parent()[ 0 ], $( ".ui-pagecontainer" )[ 0 ], "fixed header is now a child of page container" );
236236
} );
237237

238-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-d" );
238+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-d" );
239239
},
240240

241241
function() {
242242
deepEqual( nextpageheader.parent()[0], $.mobile.activePage[0], "fixed header is now a child of page again" );
243-
$.mobile.pageContainer.pagecontainer( "change", "#default" );
243+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#default" );
244244
},
245245

246246
start
@@ -258,20 +258,20 @@ asyncTest( "The persistent footers should work without a header", function() {
258258
$.testHelper.pageSequence([
259259
function(){
260260
ok( nextpagefooter.length, "next page has fixed footer and fixed footer" );
261-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-e" );
261+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-e" );
262262
},
263263
function() {
264264
$( "#persist-test-f" )
265265
.one( "pagebeforeshow", function() {
266-
deepEqual( nextpagefooter.parent()[ 0 ], $.mobile.pageContainer[ 0 ], "fixed footer is now a child of page container" );
266+
deepEqual( nextpagefooter.parent()[ 0 ], $( ".ui-pagecontainer" )[ 0 ], "fixed footer is now a child of page container" );
267267
} );
268268

269-
$.mobile.pageContainer.pagecontainer( "change", "#persist-test-f" );
269+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#persist-test-f" );
270270
},
271271

272272
function() {
273273
deepEqual( nextpagefooter.parent()[0], $.mobile.activePage[0], "fixed footer is now a child of page again" );
274-
$.mobile.pageContainer.pagecontainer( "change", "#default" );
274+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#default" );
275275
},
276276

277277
start
@@ -282,7 +282,7 @@ asyncTest( "The persistent footers should work without a header", function() {
282282
var asyncTestFooterAndHeader = function( pageSelector, visible ) {
283283
$.testHelper.pageSequence([
284284
function() {
285-
$.mobile.pageContainer.pagecontainer( "change", pageSelector );
285+
$( ".ui-pagecontainer" ).pagecontainer( "change", pageSelector );
286286
},
287287

288288
function() {
@@ -297,7 +297,7 @@ var asyncTestFooterAndHeader = function( pageSelector, visible ) {
297297
equal( !$header.hasClass( "ui-fixed-hidden" ), visible, "the header should be " + hiddenStr );
298298

299299

300-
$.mobile.pageContainer.pagecontainer( "change", "#default" );
300+
$( ".ui-pagecontainer" ).pagecontainer( "change", "#default" );
301301
},
302302

303303
start
@@ -350,7 +350,7 @@ asyncTest( "page-retains-fixed-header-on-popup-remove", function() {
350350

351351
function() {
352352

353-
$.mobile.pageContainer.change( "#default" );
353+
$( ".ui-pagecontainer" ).change( "#default" );
354354

355355
}
356356
] );

0 commit comments

Comments
 (0)