From b88d5e59a13083463692a801dce215c66354db67 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Sat, 14 Nov 2015 09:44:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99=E4=BC=9A=E5=A4=9A=E5=87=BA=E4=B8=80=E6=9D=A1=E4=B8=80?= =?UTF-8?q?=E6=A8=A1=E4=B8=80=E6=A0=B7=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/org_document_comments/add_reply.js.erb | 4 ++-- app/views/org_document_comments/index.html.erb | 2 -- app/views/organizations/_show_org_document.html.erb | 2 +- app/views/organizations/show.html.erb | 5 +---- db/schema.rb | 3 ++- 5 files changed, 6 insertions(+), 10 deletions(-) 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 %>