From ae3dec01677d4c0659041ab5339ee2c3a3731b68 Mon Sep 17 00:00:00 2001
From: Steffen van Bergerem <svbergerem@online.de>
Date: Thu, 14 Aug 2014 22:41:41 +0200
Subject: [PATCH] Fix aspect membership dropdown on people search page

---
 app/assets/javascripts/app/app.js             |  3 +++
 .../app/views/notifications_view.js           |  3 ---
 app/assets/javascripts/people.js              | 22 +++++++++----------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/app/assets/javascripts/app/app.js b/app/assets/javascripts/app/app.js
index 2c9099bf75..0d3af147fc 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 815ccd5741..eadf917f46 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 d9f9eeb2bf..d204d481c0 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;
+  });
 });
-- 
GitLab