Permalink
Browse files

Pagecontainer: Remove reloadPage option

Fixes #8434
Closes #8437
  • Loading branch information...
apsdehal authored and arschmitz committed Jun 7, 2016
1 parent ea2c6c8 commit 4df25a6f4d5202e113a0cf2805ea3797e8578426
Showing with 3 additions and 22 deletions.
  1. +1 −11 js/widgets/pagecontainer.js
  2. +2 −11 tests/unit/pagecontainer/pagecontainer_core.js
@@ -619,9 +619,6 @@ $.widget( "mobile.pagecontainer", {
type: "get",
data: undefined,
// DEPRECATED
reloadPage: false,
reload: false,
// By default we rely on the role defined by the @data-role attribute.
@@ -640,15 +637,8 @@ $.widget( "mobile.pagecontainer", {
// know when the content is done loading, or if an error has occurred.
var deferred = ( options && options.deferred ) || $.Deferred(),
// Examining the option "reloadPage" passed by the user is deprecated as of 1.4.0
// and will be removed in 1.5.0.
// Copy option "reloadPage" to "reload", but only if option "reload" is not present
reloadOptionExtension = ( ( options && options.reload === undefined &&
options.reloadPage !== undefined ) ?
{ reload: options.reloadPage } : {} ),
// The default load options with overrides specified by the caller.
settings = $.extend( {}, this._loadDefaults, options, reloadOptionExtension ),
settings = $.extend( {}, this._loadDefaults, options ),
// The DOM element for the content after it has been loaded.
content = null,
@@ -49,25 +49,16 @@ QUnit.test( "load does not trigger an error when called withput a second param",
assert.ok( "no error triggered when load method called without options" );
} );
QUnit.test( "Options 'reload' and 'reloadPage' both work, and 'reload' takes precedence",
QUnit.test( "Options 'reload' works",
function( assert ) {
var pagecontainer = $( ":mobile-pagecontainer" );
pagecontainer.pagecontainer( "load", "stuff.html", {
reload: true,
reloadPage: false
reload: true
} );
assert.strictEqual( triggerData.options.reload, true,
"The value of option 'reload' is not affected by the value of option 'reloadPage'" );
pagecontainer.pagecontainer( "load", "stuff.html", {
reloadPage: true
} );
assert.strictEqual( triggerData.options.reload, true,
"The value of option 'reloadPage' is copied to the value of option 'reload' if the " +
"latter is absent from the options hash" );
} );
QUnit.module( "_handleDialog()" );

0 comments on commit 4df25a6

Please sign in to comment.