socialforge/app/views/blog_comments/destroy.js.erb

7 lines
594 B
Plaintext
Raw Normal View History

2016-07-14 14:44:47 +08:00
<% if @in_user_homepage %>
<% homepage = BlogComment.find(@user.blog.homepage_id) %>
2016-07-14 14:44:47 +08:00
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/homepage', :locals => {:activity => @blog_comment, :user_activity_id => homepage.id}) %>");
<% else%>
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @blog_comment,:user_activity_id =>@user_activity_id}) %>");
<% end %>
sd_create_editor_from_data(<%= @user_activity_id%>,"","100%", 'UserActivity');