diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-11-24 20:57:41 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-11-24 20:57:41 -0500 |
| commit | 612561818f907f0f9988247c82ec158ba4494986 (patch) | |
| tree | 8bbc773dad7a6364cbdb8aed2ef4cab04854f49a /StoneIsland/platforms/ios/www/js/lib/nav/NavView.js | |
| parent | d548a7d02ce6349ca9a820b6824e4374b759812b (diff) | |
build
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/nav/NavView.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/lib/nav/NavView.js | 103 |
1 files changed, 93 insertions, 10 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/nav/NavView.js b/StoneIsland/platforms/ios/www/js/lib/nav/NavView.js index 3949c3c5..1445a0d5 100644 --- a/StoneIsland/platforms/ios/www/js/lib/nav/NavView.js +++ b/StoneIsland/platforms/ios/www/js/lib/nav/NavView.js @@ -3,33 +3,61 @@ var NavView = View.extend({ el: "#nav", events: { + "click .logo": "intro", + "click .store": "store", "click .hub": "hub", "click .story": "story", "click .archive": "archive", "click .login": "login", + "click .logout": "logout", + "click .account": "account", "click .faq": "faq", "click .search": "search", + "click .main": "back", + "click .account_back": "back", + "click .profile": "profile", + "click .payment": "payment", + "click .shipping": "shipping", + "click .settings": "settings", + "click .orders": "orders", + "click .return_link": "return_link", + + "click .faq_back": "back", + "click .privacy": "privacy", + "click .returns": "returns", + "click .terms": "terms", + "click .care": "care", + "click .fb": "fb", "click .insta": "insta", "click .tw": "tw", }, - initialize: function(){ - }, + initialize: function(){ + }, - show: function(){ + show: function(klass){ $("body").addClass("nav") - app.curtain.show() + app.curtain.show("dark") + if (klass) { + setTimeout(function(){ + this.addClass(klass) + }.bind(this), 500) + } }, hide: function(){ $("body").removeClass("nav") - app.curtain.hide() + app.curtain.hide("dark") }, + intro: function(){ + this.hide() + app.router.go("intro") + }, store: function(){ this.hide() app.router.go("store") @@ -49,18 +77,74 @@ var NavView = View.extend({ login: function(){ this.hide() - app.router.go("login") + auth.last_view = app.view + app.router.go("account/login") + }, + logout: function(){ + this.hide() + auth.last_view = app.view + app.router.go("account/logout") + }, + account: function(){ + this.el.className = "account" }, - search: function(){ + back: function(){ + this.el.className = "" + }, + + profile: function(){ this.hide() - app.router.go("search") + app.router.go("account/profile") + }, + payment: function(){ + this.hide() + app.router.go("account/payment") }, + shipping: function(){ + this.hide() + app.router.go("account/shipping") + }, + orders: function(){ + this.hide() + app.router.go("account/orders") + }, + settings: function(){ + this.hide() + app.router.go("account/settings") + }, + return_link: function(){ + window.open("http://www.stoneisland.com/", '_system') + }, + + faq: function(){ + this.el.className = "faq" + }, + privacy: function(){ this.hide() - app.router.go("faq") + app.router.go("page/privacy") + }, + returns: function(){ + this.hide() + app.router.go("page/returns") + }, + terms: function(){ + this.hide() + app.router.go("page/terms") + }, + care: function(){ + this.hide() + app.router.go("page/care") + }, + + + search: function(){ + this.hide() + app.router.go("search") }, + fb: function(){ window.open("https://www.facebook.com/StoneIsland", '_system') }, @@ -70,6 +154,5 @@ var NavView = View.extend({ tw: function(){ window.open("https://twitter.com/stoneisland", '_system') }, - }) |
