diff options
Diffstat (limited to 'StoneIsland/www/js')
| -rw-r--r-- | StoneIsland/www/js/index.js | 8 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/_router.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/LoginView.js | 3 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/LogoutView.js | 24 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/account/PaymentView.js | 2 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/BlogView.js | 1 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/blogs/FaqView.js | 23 | ||||
| -rw-r--r-- | StoneIsland/www/js/lib/nav/SearchView.js | 16 |
8 files changed, 75 insertions, 5 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js index 1beaa708..5023873c 100644 --- a/StoneIsland/www/js/index.js +++ b/StoneIsland/www/js/index.js @@ -39,7 +39,15 @@ var app = (function(){ app.nav = new NavView () app.login = new LoginView () + app.logout = new LogoutView () + app.signup = new SignupView () + app.profile = new ProfileView () + app.payment = new PaymentView () + app.shipping = new ShippingView () + app.intro = new IntroView () + app.faq = new FaqView () + app.search = new SearchView () app.product = new ProductView () app.collection = new CollectionView () diff --git a/StoneIsland/www/js/lib/_router.js b/StoneIsland/www/js/lib/_router.js index 344755e8..1e01ce96 100644 --- a/StoneIsland/www/js/lib/_router.js +++ b/StoneIsland/www/js/lib/_router.js @@ -17,7 +17,7 @@ var SiteRouter = Router.extend({ '/account/logout': 'logout', '/account/signup': 'signup', '/account/profile': 'profile', - '/account/billing': 'billing', + '/account/payment': 'payment', '/account/shipping': 'shipping', '/faq': 'faq', @@ -60,3 +60,4 @@ var SiteRouter = Router.extend({ }, }) + diff --git a/StoneIsland/www/js/lib/account/LoginView.js b/StoneIsland/www/js/lib/account/LoginView.js index 40cc29ba..3b409b3d 100644 --- a/StoneIsland/www/js/lib/account/LoginView.js +++ b/StoneIsland/www/js/lib/account/LoginView.js @@ -6,8 +6,6 @@ var LoginView = View.extend({ "submit form": "submit", }, - mode: null, - initialize: function(){ this.$form = this.$("form") }, @@ -18,7 +16,6 @@ var LoginView = View.extend({ }, hide: function(){ - app.curtain.hide() document.body.classList.remove("login") }, diff --git a/StoneIsland/www/js/lib/account/LogoutView.js b/StoneIsland/www/js/lib/account/LogoutView.js new file mode 100644 index 00000000..fffe661a --- /dev/null +++ b/StoneIsland/www/js/lib/account/LogoutView.js @@ -0,0 +1,24 @@ +var LogoutView = View.extend({ + + el: "#logout", + + events: { + }, + + show: function(){ + document.body.classList.add("logout") + }, + + hide: function(){ + document.body.classList.remove("logout") + }, + + submit: function(e){ + e.preventDefault() + }, + + success: function(){ + // change login in ui to logout or whatever + }, + +})
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/account/PaymentView.js b/StoneIsland/www/js/lib/account/PaymentView.js index 1ce91283..74727648 100644 --- a/StoneIsland/www/js/lib/account/PaymentView.js +++ b/StoneIsland/www/js/lib/account/PaymentView.js @@ -30,5 +30,5 @@ var AddressView = View.extend({ serialize: function(){ }, - + })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/blogs/BlogView.js b/StoneIsland/www/js/lib/blogs/BlogView.js index 59cf25b2..357698f5 100644 --- a/StoneIsland/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/www/js/lib/blogs/BlogView.js @@ -28,6 +28,7 @@ var BlogView = View.extend({ this.loader.preloadImage(data.story[0].image.uri, function(img){ app.story.populate(data.story) }) + app.faq.populate(data.page[0]) }, })
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/blogs/FaqView.js b/StoneIsland/www/js/lib/blogs/FaqView.js new file mode 100644 index 00000000..bce83d88 --- /dev/null +++ b/StoneIsland/www/js/lib/blogs/FaqView.js @@ -0,0 +1,23 @@ +var FaqView = ScrollableView.extend({ + + el: "#faq", + + events: { + }, + + initialize: function(){ + this.$content = this.$(".content") + this.$loader = this.$(".loader") + this.scroller = new IScroll('#faq', app.iscroll_optionsx) + }, + + show: function(){ + this.deferScrollToTop() + document.body.className = "faq" + }, + + populate: function(data){ + this.$content.html(data.body.replace(/\n/g, "<br>")) + } + +})
\ No newline at end of file diff --git a/StoneIsland/www/js/lib/nav/SearchView.js b/StoneIsland/www/js/lib/nav/SearchView.js new file mode 100644 index 00000000..8739f088 --- /dev/null +++ b/StoneIsland/www/js/lib/nav/SearchView.js @@ -0,0 +1,16 @@ +var SearchView = View.extend({ + + el: "#search", + + events: { + }, + + show: function(){ + document.body.classList.add("search") + }, + + hide: function(){ + document.body.classList.remove("search") + }, + +})
\ No newline at end of file |
