summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/products
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/lib/products')
-rwxr-xr-xStoneIsland/www/js/lib/products/ClosedStoreView.js12
-rwxr-xr-xStoneIsland/www/js/lib/products/CollectionView.js5
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()
}