From 14bafc510d096e0c88159f0047dc1b113fc99801 Mon Sep 17 00:00:00 2001 From: Kin Blas Date: Tue, 20 Sep 2011 15:40:52 -0700 Subject: [PATCH] Removed support for the alpha signature of $.mobile.changePage() in preparation for jQM 1.0. Folks now how to use the signature that requires the toPage (url or element) as the first arg, and options object as the 2nd. --- js/jquery.mobile.navigation.js | 37 ---------------------------------- 1 file changed, 37 deletions(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 4de284e3..415019ba 100755 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -862,43 +862,6 @@ // 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.