From 42abd3d633d82b4fc0f97cf5082457cc125422c9 Mon Sep 17 00:00:00 2001 From: Pat Patterson Date: Wed, 1 Apr 2015 08:29:53 -0700 Subject: [PATCH] Updated jQuery Mobile to latest --- mobileapp.js | 20 ++++++++++---------- phonegap.html | 41 +++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 32 deletions(-) diff --git a/mobileapp.js b/mobileapp.js index f2e8de7..eeb9242 100644 --- a/mobileapp.js +++ b/mobileapp.js @@ -48,12 +48,12 @@ function addClickListeners() { $('#deletebtn').click(function(e) { // Delete the account e.preventDefault(); - $.mobile.pageLoading(); + $.mobile.loading('show'); client.del('Account', $('#accountdetail').find('#Id').val() , function(response) { getAccounts(function() { - $.mobile.pageLoading(true); + $.mobile.loading('hide'); $.mobile.changePage('#mainpage', "slide", true, true); }); }, errorCallback); @@ -62,7 +62,7 @@ function addClickListeners() { $('#editbtn').click(function(e) { // Get account fields and show the 'Edit Account' form e.preventDefault(); - $.mobile.pageLoading(); + $.mobile.loading('show'); client.retrieve("Account", $('#accountdetail').find('#Id').val() , "Name,Id,Industry,TickerSymbol", function(response) { @@ -74,7 +74,7 @@ function addClickListeners() { $('#actionbtn') .unbind('click.btn') .bind('click.btn', updateHandler); - $.mobile.pageLoading(true); + $.mobile.loading('hide'); $.mobile.changePage('#editpage', "slide", false, true); }, errorCallback); }); @@ -94,7 +94,7 @@ function getAccounts(callback) { .append('

' + this.Name + '

') .click(function(e) { e.preventDefault(); - $.mobile.pageLoading(); + $.mobile.loading('show'); // We could do this more efficiently by adding Industry and // TickerSymbol to the fields in the SELECT, but we want to // show dynamic use of the retrieve function... @@ -105,7 +105,7 @@ function getAccounts(callback) { $('#Industry').text(response.Industry); $('#TickerSymbol').text(response.TickerSymbol); $('#Id').val(response.Id); - $.mobile.pageLoading(true); + $.mobile.loading('hide'); $.mobile.changePage('#detailpage', "slide", false, true); }, errorCallback); }) @@ -132,11 +132,11 @@ function createHandler(e) { fields[child.attr("name")] = child.val(); } }); - $.mobile.pageLoading(); + $.mobile.loading('show'); client.create('Account', fields, function(response) { getAccounts(function() { - $.mobile.pageLoading(true); + $.mobile.loading('hide'); $.mobile.changePage('#mainpage', "slide", true, true); }); }, errorCallback); @@ -153,12 +153,12 @@ function updateHandler(e) { fields[child.attr("name")] = child.val(); } }); - $.mobile.pageLoading(); + $.mobile.loading('show'); client.update('Account', accountform.find('#Id').val(), fields , function(response) { getAccounts(function() { - $.mobile.pageLoading(true); + $.mobile.loading('hide'); $.mobile.changePage('#mainpage', "slide", true, true); }); }, errorCallback); diff --git a/phonegap.html b/phonegap.html index be7c71f..818d1cd 100644 --- a/phonegap.html +++ b/phonegap.html @@ -48,9 +48,9 @@ from the CDN, but then the device needs to be online for the app to be functional. --> - - - + + + @@ -90,7 +90,7 @@ function() { client.setRefreshToken(null); $.mobile.changePage('#loginpage', "slide", false, true); - $.mobile.pageLoading(); + $.mobile.loading('show'); var ref = window.open(getAuthorizeUrl(loginUrl, clientId, redirectUri), '_blank', 'location=no,toolbar=no'); ref.addEventListener('loadstop', function(evt) { if (evt.url.startsWith(redirectUri)) { @@ -105,9 +105,9 @@ }); $.mobile.changePage('#mainpage', "slide", false, true); - $.mobile.pageLoading(); + $.mobile.loading('show'); getAccounts(function() { - $.mobile.pageLoading(true); + $.mobile.loading('hide'); }); } @@ -152,7 +152,7 @@ keychain = new Keychain(); keychain.getForKey( function(value) { - $.mobile.pageLoading(); + $.mobile.loading('show'); client.setRefreshToken(value); client.refreshAccessToken(sessionCallback, function(jqXHR, textStatus, errorThrown) { @@ -173,7 +173,7 @@ -
+

Login

@@ -184,16 +184,15 @@

Login

Force.com

-
-
+
+

Account List

-
    +
    @@ -203,8 +202,8 @@

    Account List

    Force.com

-
-
+
+

Account Detail

@@ -217,15 +216,15 @@

Account Detail

+ data-theme="b">Delete

Force.com

-
-
+
+

New Account

@@ -234,17 +233,15 @@

New Account

- + - + - +
Account Name:
Industry:
Ticker Symbol: