diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/index.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/cart/CartView.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/IntroView.js | 6 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/CollectionView.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/products/ProductView.js | 4 | ||||
| -rw-r--r-- | StoneIsland/www/js/vendor/view/router.js | 2 |
7 files changed, 19 insertions, 4 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 64027d2a..5720dcf1 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -10,6 +10,7 @@ var app = (function(){ app.header = new HeaderView () app.footer = new FooterView () + app.curtain = new CurtainView () app.nav = new NavView () app.login = new LoginView () diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index 6434e9bf..d45ffdc2 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -5,6 +5,7 @@ var SiteRouter = Router.extend({ routes: { '/': 'intro', + '/intro': 'intro', '/store': 'store', '/hub': 'hub', '/story': 'story', @@ -25,7 +26,6 @@ var SiteRouter = Router.extend({ } window.location.href = "#/" + url this.parseRoute(url) - console.log(url) }, intro: function(){ diff --git a/StoneIsland/www/js/lib/cart/CartView.js b/StoneIsland/www/js/lib/cart/CartView.js index fa92fefe..f958f716 100644 --- a/StoneIsland/www/js/lib/cart/CartView.js +++ b/StoneIsland/www/js/lib/cart/CartView.js @@ -8,4 +8,8 @@ var CartView = View.extend({ initialize: function(){ }, + show: function(){ + document.body.className = "cart" + }, + })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/nav/IntroView.js b/StoneIsland/www/js/lib/nav/IntroView.js index 7b726f6a..93602eb5 100644 --- a/StoneIsland/www/js/lib/nav/IntroView.js +++ b/StoneIsland/www/js/lib/nav/IntroView.js @@ -28,12 +28,12 @@ var IntroView = View.extend({ deviceorientation: function(e){ var heading if ('webkitCompassHeading' in e) { - heading = e.webkitCompassHeading + heading = e.webkitCompassHeading || 0 } else { - heading = e.alpha + heading = e.alpha || 0 } - this.compass.style[transformProp] = "translateZ(0) transformX(-50%) transformY(-50%) rotate(" + heading + "deg)" + this.compass.style[transformProp] = "translateZ(0) translateX(-50%) translateY(-50%) rotate(" + heading + "deg)" }, store: function(){ app.router.go("store") }, diff --git a/StoneIsland/www/js/lib/products/CollectionView.js b/StoneIsland/www/js/lib/products/CollectionView.js index 137d0ec3..7e178a8a 100644 --- a/StoneIsland/www/js/lib/products/CollectionView.js +++ b/StoneIsland/www/js/lib/products/CollectionView.js @@ -10,6 +10,10 @@ var CollectionView = View.extend({ this.$content = this.$(".content") }, + show: function(){ + document.body.className = "collection" + }, + populate: function(){ }, diff --git a/StoneIsland/www/js/lib/products/ProductView.js b/StoneIsland/www/js/lib/products/ProductView.js index ef54575d..3c18338e 100644 --- a/StoneIsland/www/js/lib/products/ProductView.js +++ b/StoneIsland/www/js/lib/products/ProductView.js @@ -8,4 +8,8 @@ var ProductView = View.extend({ initialize: function(){ }, + show: function(){ + document.body.className = "product" + }, + })
\ No newline at end of file diff --git a/StoneIsland/www/js/vendor/view/router.js b/StoneIsland/www/js/vendor/view/router.js index 82cf9e12..bff039b7 100644 --- a/StoneIsland/www/js/vendor/view/router.js +++ b/StoneIsland/www/js/vendor/view/router.js @@ -15,6 +15,8 @@ var Router = View.extend({ parseRoute: function(pathname){ + if (pathname[0] !== "/" && pathname[0] !== "#") { pathname = "/" + pathname } + var routes = is_mobile ? this.mobileRoutes : this.routes, path = pathname.split("/"); |
