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/products | |
| parent | 0a6a76b07644f38b2599a6bb0c462e82cdecbf8a (diff) | |
backup db, handle being offline better
Diffstat (limited to 'StoneIsland/www/js/lib/products')
| -rwxr-xr-x | StoneIsland/www/js/lib/products/ClosedStoreView.js | 12 | ||||
| -rwxr-xr-x | StoneIsland/www/js/lib/products/CollectionView.js | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/StoneIsland/www/js/lib/products/ClosedStoreView.js b/StoneIsland/www/js/lib/products/ClosedStoreView.js index 2f242ba4..97b46006 100755 --- a/StoneIsland/www/js/lib/products/ClosedStoreView.js +++ b/StoneIsland/www/js/lib/products/ClosedStoreView.js @@ -19,12 +19,20 @@ var ClosedStoreView = View.extend({ }, show: function(){ + this.setMessage(app.closed.storeClosedMessageOne, app.closed.storeClosedMessageTwo) + this.showElement() + }, + + showElement: function(){ document.body.className = "closed" this.animate() app.footer.hide() - $(".closed_store_msg h3").html(app.closed.storeClosedMessageOne || "THIS STORE IS CURRENTLY CLOSED") + }, + + setMessage: function(msg_one, msg_two){ + $(".closed_store_msg h3").html(msg_one || "THIS STORE IS CURRENTLY CLOSED") if (app.closed.storeClosedMessageTwo) { - $(".closed_store_msg h4").show().html(app.closed.storeClosedMessageTwo) + $(".closed_store_msg h4").show().html(msg_two) } else { $(".closed_store_msg h4").hide() diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 5480c016..3745f563 100755 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -25,6 +25,11 @@ var CollectionView = ScrollableView.extend({ }, show: function(){ + if (! navigator.onLine) { + app.closed.showElement() + app.closed.setMessage("PLEASE GO ONLINE TO BROWSE<br>THE STONE ISLAND STORE.", "") + return + } if (sdk.env !== "test" && app.closed.storeIsClosed) { return app.closed.show() } |
