From e5dc46846ce9fb1c990d291ef852c0cad3f74957 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Jun 2014 11:26:04 -0400 Subject: editing profile --- public/assets/javascripts/ui/MasterView.js | 77 ------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 public/assets/javascripts/ui/MasterView.js (limited to 'public/assets/javascripts/ui/MasterView.js') diff --git a/public/assets/javascripts/ui/MasterView.js b/public/assets/javascripts/ui/MasterView.js deleted file mode 100644 index 5aca4e0..0000000 --- a/public/assets/javascripts/ui/MasterView.js +++ /dev/null @@ -1,77 +0,0 @@ - -var MasterView = View.extend({ - el: "body", - - events: { - "click [data-role='show-signup-modal']": 'signup', - "click [data-role='show-signin-modal']": 'signin', - "click [data-role='new-project-modal']": 'newProject', - "click [data-role='edit-project-modal']": 'editProject', - "click [data-role='edit-profile-modal']": 'editProfile', - }, - - routes: { - "/login": 'signin', - "/signup": 'signup', - "/project/new": 'newProject', - "/profile/edit": 'editProfile', - "/app": 'launch', - }, - - initialize: function(){ - this.signUpModal = new SignUpModal() - this.signInModal = new SignInModal() - this.newProjectModal = new NewProjectModal() - this.editProjectModal = new EditProjectModal() - this.editProfileModal = new EditProfileModal() - - this.originalPath = window.location.pathname - - for (var route in this.routes) { - if (window.location.pathname.indexOf(route) === 0) { - this[this.routes[route]]() - break; - } - } - - $("body").removeClass("loading") - }, - - launch: function(){ - app.launch() - }, - - signup: function(e){ - e && e.preventDefault() - window.history.pushState(null, document.title, "/signup") - this.signUpModal.load() - }, - - signin: function(e){ - e && e.preventDefault() - window.history.pushState(null, document.title, "/login") - this.signInModal.load() - }, - - newProject: function(e){ - e && e.preventDefault() - window.history.pushState(null, document.title, "/project/new") - - this.newProjectModal.load() - }, - - editProject: function(e){ - e && e.preventDefault() - window.history.pushState(null, document.title, "/project/edit") - this.editProjectModal.load() - }, - - editProfile: function(e){ - e && e.preventDefault() - window.history.pushState(null, document.title, "/profile/edit") - - this.editProfileModal.load() - }, - -}) - -- cgit v1.2.3-70-g09d2