diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js index 2c9099bf7519753bfd296cc28a9822bd05991db1..0d3af147fc2fe3634f641855654dd74fc0fe9b4f 100644 --- a/app/assets/javascripts/app/app.js +++ b/app/assets/javascripts/app/app.js @@ -100,6 +100,9 @@ var app = { setupGlobalViews: function() { app.hovercard = new app.views.Hovercard(); app.aspectMembershipsBlueprint = new app.views.AspectMembershipBlueprint(); + $('.aspect_membership_dropdown').each(function(){ + new app.views.AspectMembership({el: this}); + }); app.sidebar = new app.views.Sidebar(); }, diff --git a/app/assets/javascripts/app/views/notifications_view.js b/app/assets/javascripts/app/views/notifications_view.js index 815ccd5741728fcef460a57862ba60acd83c8cdc..eadf917f4629a1fb8f6f9010c15ac617ca2d7a36 100644 --- a/app/assets/javascripts/app/views/notifications_view.js +++ b/app/assets/javascripts/app/views/notifications_view.js @@ -6,9 +6,6 @@ app.views.Notifications = Backbone.View.extend({ initialize: function() { Diaspora.page.header.notifications.setUpNotificationPage(this); - $('.aspect_membership_dropdown').each(function(){ - new app.views.AspectMembership({el: this}); - }); }, toggleUnread: function(evt) { diff --git a/app/assets/javascripts/people.js b/app/assets/javascripts/people.js index d9f9eeb2bf51a40d2b3cd033ff9d46d87d975a5e..d204d481c00e75cb027a3549cc930b175e46b606 100644 --- a/app/assets/javascripts/people.js +++ b/app/assets/javascripts/people.js @@ -11,16 +11,16 @@ $(document).ready(function() { $('#profile_buttons .sharing_message_container').tooltip({placement: 'bottom'}); $("#block_user_button").click(function(evt) { if(!confirm(Diaspora.I18n.t('ignore_user'))) { return; } - var personId = $(this).data('person-id'); - var block = new app.models.Block(); - block.save({block : {person_id : personId}}, { - success: function() { - $('#profile_buttons').attr('class', 'blocked'); - $('#sharing_message').attr('class', 'icons-circle'); - $('.profile_button, .white_bar').remove(); - } - }); + var personId = $(this).data('person-id'); + var block = new app.models.Block(); + block.save({block : {person_id : personId}}, { + success: function() { + $('#profile_buttons').attr('class', 'blocked'); + $('#sharing_message').attr('class', 'icons-circle'); + $('.profile_button, .white_bar').remove(); + } + }); - return false; - }); + return false; + }); });