Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for issue 1666 - Deprecate $.mobile.pageLoading()

- Removed $.mobile.pageLoading().
- Updated tests/unit/init/ to call the new showPageLoadingMsg/hidePageLoadingMsg functions.
  • Loading branch information...
commit c75a7ad654f0ef30f52de6ca33d8492af6692065 1 parent 432b876
@jblas jblas authored
Showing with 10 additions and 19 deletions.
  1. +0 −9 js/jquery.mobile.init.js
  2. +10 −10 tests/unit/init/init_core.js
View
9 js/jquery.mobile.init.js
@@ -60,15 +60,6 @@
$html.removeClass( "ui-loading" );
},
- // XXX: deprecate for 1.0
- pageLoading: function ( done ) {
- if ( done ) {
- $.mobile.hidePageLoadingMsg();
- } else {
- $.mobile.showPageLoadingMsg();
- }
- },
-
// find and enhance the pages in the dom and transition to the first page.
initializePage: function() {
// find present pages
View
20 tests/unit/init/init_core.js
@@ -25,7 +25,7 @@
teardown: function(){
$.extend = extendFn;
- // NOTE reset for pageLoading tests
+ // NOTE reset for showPageLoadingMsg/hidePageLoadingMsg tests
$('.ui-loader').remove();
// clear the classes added by reloading the init
@@ -147,10 +147,10 @@
same($("#bar").jqmData('url'), "bak");
});
- asyncTest( "pageLoading doesn't add the dialog to the page when loading message is false", function(){
+ asyncTest( "showPageLoadingMsg doesn't add the dialog to the page when loading message is false", function(){
expect( 1 );
$.mobile.loadingMessage = false;
- $.mobile.pageLoading(false);
+ $.mobile.showPageLoadingMsg();
setTimeout(function(){
ok(!$(".ui-loader").length, "no ui-loader element");
@@ -158,10 +158,10 @@
}, 500);
});
- asyncTest( "pageLoading doesn't add the dialog to the page when done is passed as true", function(){
+ asyncTest( "hidePageLoadingMsg doesn't add the dialog to the page when loading message is false", function(){
expect( 1 );
$.mobile.loadingMessage = true;
- $.mobile.pageLoading(true);
+ $.mobile.hidePageLoadingMsg();
setTimeout(function(){
same($(".ui-loading").length, 0, "page should not be in the loading state");
@@ -169,10 +169,10 @@
}, 500);
});
- asyncTest( "pageLoading adds the dialog to the page when done is true", function(){
+ asyncTest( "showPageLoadingMsg adds the dialog to the page when loadingMessage is true", function(){
expect( 1 );
$.mobile.loadingMessage = true;
- $.mobile.pageLoading(false);
+ $.mobile.showPageLoadingMsg();
setTimeout(function(){
same($(".ui-loading").length, 1, "page should be in the loading state");
@@ -183,7 +183,7 @@
asyncTest( "page loading should contain default loading message", function(){
expect( 1 );
reloadCoreNSandInit();
- $.mobile.pageLoading(false);
+ $.mobile.showPageLoadingMsg();
setTimeout(function(){
same($(".ui-loader h1").text(), "loading");
@@ -194,7 +194,7 @@
asyncTest( "page loading should contain custom loading message", function(){
$.mobile.loadingMessage = "foo";
$.testHelper.reloadLib(libName);
- $.mobile.pageLoading(false);
+ $.mobile.showPageLoadingMsg();
setTimeout(function(){
same($(".ui-loader h1").text(), "foo");
@@ -204,7 +204,7 @@
asyncTest( "page loading should contain custom loading message when set during runtime", function(){
$.mobile.loadingMessage = "bar";
- $.mobile.pageLoading(false);
+ $.mobile.showPageLoadingMsg();
setTimeout(function(){
same($(".ui-loader h1").text(), "bar");
Please sign in to comment.
Something went wrong with that request. Please try again.