diff --git a/app/assets/javascripts/app/router.js b/app/assets/javascripts/app/router.js index 73b8d2ba2..335fcb29d 100644 --- a/app/assets/javascripts/app/router.js +++ b/app/assets/javascripts/app/router.js @@ -30,7 +30,7 @@ app.Router = Backbone.Router.extend({ "people/:id/photos": "photos", "people/:id/contacts": "profile", "people": "pageWithAspectMembershipDropdowns", - "notifications": "pageWithAspectMembershipDropdowns", + "notifications": "notifications", "people/:id": "profile", "u/:name": "profile" @@ -83,6 +83,12 @@ app.Router = Backbone.Router.extend({ app.conversations = new app.views.Conversations(); }, + notifications: function() { + this._loadContacts(); + this.renderAspectMembershipDropdowns($(document)); + new app.views.Notifications({el: "#notifications_container"}); + }, + registration: function() { app.page = new app.pages.Registration(); }, diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 4e178dcc6..fde543ffc 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -74,8 +74,3 @@ .no-notifications.well %h4 = t(".no_notifications") - -:javascript - $(document).ready(function(){ - new app.views.Notifications({ el: '#notifications_container' }); - });