Fix aspect membership dropdown on people search page

This commit is contained in:
Steffen van Bergerem 2014-08-14 22:41:41 +02:00
parent 80a0a9f999
commit ae3dec0167
3 changed files with 14 additions and 14 deletions

View file

@ -100,6 +100,9 @@ var app = {
setupGlobalViews: function() { setupGlobalViews: function() {
app.hovercard = new app.views.Hovercard(); app.hovercard = new app.views.Hovercard();
app.aspectMembershipsBlueprint = new app.views.AspectMembershipBlueprint(); app.aspectMembershipsBlueprint = new app.views.AspectMembershipBlueprint();
$('.aspect_membership_dropdown').each(function(){
new app.views.AspectMembership({el: this});
});
app.sidebar = new app.views.Sidebar(); app.sidebar = new app.views.Sidebar();
}, },

View file

@ -6,9 +6,6 @@ app.views.Notifications = Backbone.View.extend({
initialize: function() { initialize: function() {
Diaspora.page.header.notifications.setUpNotificationPage(this); Diaspora.page.header.notifications.setUpNotificationPage(this);
$('.aspect_membership_dropdown').each(function(){
new app.views.AspectMembership({el: this});
});
}, },
toggleUnread: function(evt) { toggleUnread: function(evt) {

View file

@ -11,16 +11,16 @@ $(document).ready(function() {
$('#profile_buttons .sharing_message_container').tooltip({placement: 'bottom'}); $('#profile_buttons .sharing_message_container').tooltip({placement: 'bottom'});
$("#block_user_button").click(function(evt) { $("#block_user_button").click(function(evt) {
if(!confirm(Diaspora.I18n.t('ignore_user'))) { return; } if(!confirm(Diaspora.I18n.t('ignore_user'))) { return; }
var personId = $(this).data('person-id'); var personId = $(this).data('person-id');
var block = new app.models.Block(); var block = new app.models.Block();
block.save({block : {person_id : personId}}, { block.save({block : {person_id : personId}}, {
success: function() { success: function() {
$('#profile_buttons').attr('class', 'blocked'); $('#profile_buttons').attr('class', 'blocked');
$('#sharing_message').attr('class', 'icons-circle'); $('#sharing_message').attr('class', 'icons-circle');
$('.profile_button, .white_bar').remove(); $('.profile_button, .white_bar').remove();
} }
}); });
return false; return false;
}); });
}); });