diff --git a/app/views/org_document_comments/add_reply.js.erb b/app/views/org_document_comments/add_reply.js.erb index 930c8ebb0..5d54af2bf 100644 --- a/app/views/org_document_comments/add_reply.js.erb +++ b/app/views/org_document_comments/add_reply.js.erb @@ -1,3 +1,3 @@ -$("#organization_document_<%= @document.id %>").html(""); -$("#organization_document_<%= @document.id %>").html("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document}) %>"); + +$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document}) %>"); init_activity_KindEditor_data(<%= @document.id %>,"","87%"); \ No newline at end of file diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb index a636b2ec8..3c2910529 100644 --- a/app/views/org_document_comments/index.html.erb +++ b/app/views/org_document_comments/index.html.erb @@ -20,8 +20,6 @@ init_activity_KindEditor_data(<%= document.id%>, null, "87%"); }); -
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document} %> -
<% end %> <% end %> \ No newline at end of file diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index f1c633320..700db0eeb 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -1,4 +1,4 @@ -+ <%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %> -
<% end %> <% unless @activities.nil? %> @@ -58,9 +57,7 @@ init_activity_KindEditor_data(<%= act.org_act.id%>, null, "87%"); }); -<%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %> -
<% end %> <% end %>