diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-01-20 23:51:37 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-01-20 23:51:37 +0100 |
| commit | a1fbe0b115fd9f9b654dae79f266581c32ba00d2 (patch) | |
| tree | 5d3fd9e4401bbfeff572ba4530630a731e252ad8 /StoneIsland/www/js/lib/account | |
| parent | 0a6a76b07644f38b2599a6bb0c462e82cdecbf8a (diff) | |
backup db, handle being offline better
Diffstat (limited to 'StoneIsland/www/js/lib/account')
| -rwxr-xr-x | StoneIsland/www/js/lib/account/OrdersView.js | 5 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/account/PaymentView.js | 5 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/account/ProfileView.js | 5 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/account/SettingsView.js | 5 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/account/ShippingView.js | 5 |
5 files changed, 25 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/account/OrdersView.js b/StoneIsland/www/js/lib/account/OrdersView.js index a1b83767..b3ff3e7a 100755 --- a/StoneIsland/www/js/lib/account/OrdersView.js +++ b/StoneIsland/www/js/lib/account/OrdersView.js @@ -31,6 +31,11 @@ var OrdersView = ScrollableView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO VIEW<br>YOUR ORDERS.", "") + return + } app.header.set_back(false) app.footer.hide() document.body.className = "orders" diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js index 8b49ed1d..0e300f9b 100755 --- a/StoneIsland/www/js/lib/account/PaymentView.js +++ b/StoneIsland/www/js/lib/account/PaymentView.js @@ -34,6 +34,11 @@ var PaymentView = FormView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO CHANGE<br>YOUR PAYMENT INFO.", "") + return + } app.footer.show("SAVE") document.body.className = "payment" this.deferScrollToTop() diff --git a/StoneIsland/www/js/lib/account/ProfileView.js b/StoneIsland/www/js/lib/account/ProfileView.js index d36f7f38..df6bc865 100755 --- a/StoneIsland/www/js/lib/account/ProfileView.js +++ b/StoneIsland/www/js/lib/account/ProfileView.js @@ -15,6 +15,11 @@ var ProfileView = FormView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO<br>EDIT YOUR PROFILE.", "") + return + } app.footer.show("SAVE") document.body.className = "profile" if (auth.user.BirthDay.match(/T/)) { diff --git a/StoneIsland/www/js/lib/account/SettingsView.js b/StoneIsland/www/js/lib/account/SettingsView.js index 0d6fa807..f6eae13c 100755 --- a/StoneIsland/www/js/lib/account/SettingsView.js +++ b/StoneIsland/www/js/lib/account/SettingsView.js @@ -17,6 +17,11 @@ var SettingsView = FormView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO CHANGE<br>YOUR NOTIFICATION SETTINGS.", "") + return + } document.body.className = "settings" this.deferScrollToTop() diff --git a/StoneIsland/www/js/lib/account/ShippingView.js b/StoneIsland/www/js/lib/account/ShippingView.js index 0bf88025..3b7b555a 100755 --- a/StoneIsland/www/js/lib/account/ShippingView.js +++ b/StoneIsland/www/js/lib/account/ShippingView.js @@ -32,6 +32,11 @@ var ShippingView = FormView.extend({ show: function(){ if (! auth.logged_in()) { return app.router.go("intro") } + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO<br>EDIT YOUR SHIPPING INFO.", "") + return + } // this.preload( this.data || this.test_data ) app.footer.show("SAVE") document.body.className = "shipping" |
