diff options
| author | Rene Ae <aehtyb@gmail.com> | 2015-12-04 20:32:44 -0600 |
|---|---|---|
| committer | Rene Ae <aehtyb@gmail.com> | 2015-12-04 20:32:44 -0600 |
| commit | 10efb0f7b426426057fed757fe3c851a249358dd (patch) | |
| tree | b80e285251d30fbca36220c932ef180c29c55dcf /StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js | |
| parent | 015b58ff6845b5cb79b13fec109a37b4c10c7813 (diff) | |
android build
Diffstat (limited to 'StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js')
| -rwxr-xr-x | StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js new file mode 100755 index 00000000..704aaa34 --- /dev/null +++ b/StoneIsland/platforms/android/assets/www/js/lib/nav/NavView.js @@ -0,0 +1,157 @@ +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(){ + }, + + show: function(klass){ + $("body").addClass("nav") + app.curtain.show("dark") + if (klass) { + setTimeout(function(){ + this.addClass(klass) + }.bind(this), 500) + } + }, + + hide: function(){ + $("body").removeClass("nav") + app.curtain.hide("dark") + }, + + intro: function(){ + this.hide() + app.router.go("intro") + }, + store: function(){ + this.hide() + app.router.go("store") + }, + hub: function(){ + this.hide() + app.router.go("hub") + }, + story: function(){ + this.hide() + app.router.go("story") + }, + archive: function(){ + this.hide() + app.router.go("archive") + }, + + login: function(){ + this.hide() + 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" + }, + + back: function(){ + this.el.className = "" + }, + + profile: function(){ + this.hide() + 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("page/privacy") + }, + returns: function(){ + this.hide() + app.router.go("page/returns") + }, + terms: function(){ + this.hide() + app.router.go("page/terms") + }, + care: function(){ + window.open("http://www.stoneisland.com/localize.asp?tskay=4036416C&page=help/return&deviceYeti=smartphone", '_system') + }, + + + search: function(){ + this.hide() + app.router.go("search") + }, + + + fb: function(){ + window.open("https://www.facebook.com/StoneIsland", '_system') + }, + insta: function(){ + window.open("https://instagram.com/stoneisland_official", '_system') + }, + tw: function(){ + window.open("https://twitter.com/stoneisland", '_system') + }, + +}) |
