From fc55be78c63ff39f8e8f130bcfecc90bed5f9357 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 5 Jan 2016 17:01:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E5=BC=80/?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/blog_comments/reply.js.erb | 21 +++++++++++++++++++-- app/views/blogs/_article.html.erb | 2 +- app/views/blogs/_article_list.html.erb | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/app/views/blog_comments/reply.js.erb b/app/views/blog_comments/reply.js.erb index 06adca74d..fe46d870c 100644 --- a/app/views/blog_comments/reply.js.erb +++ b/app/views/blog_comments/reply.js.erb @@ -1,7 +1,24 @@ <% if @in_user_center%> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/user_blog', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); - init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity'); +// init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity'); <% else%> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'blogs/article', :locals => {:activity => @article,:user_activity_id =>@user_activity_id}) %>"); +//init_activity_KindEditor_data(<%#= @user_activity_id%>,"","87%", 'UserActivity'); +<% end %> init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", 'UserActivity'); -<% end %> \ No newline at end of file +showNormalImage('activity_description_<%= @user_activity_id %>'); +if($("#intro_content_<%= @user_activity_id %>").height() > 810) { + $("#intro_content_show_<%= @user_activity_id %>").show(); +} +$("#intro_content_show_<%= @user_activity_id %>").click(function(){ + $("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360"); + $("#activity_description_<%= @user_activity_id%>").toggleClass("lh18"); + $("#intro_content_show_<%= @user_activity_id %>").hide(); + $("#intro_content_hide_<%= @user_activity_id %>").show(); +}); +$("#intro_content_hide_<%= @user_activity_id %>").click(function(){ + $("#activity_description_<%= @user_activity_id %>").toggleClass("maxh360"); + $("#activity_description_<%= @user_activity_id%>").toggleClass("lh18"); + $("#intro_content_hide_<%= @user_activity_id %>").hide(); + $("#intro_content_show_<%= @user_activity_id %>").show(); +}); \ No newline at end of file diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index 32e53d188..99c743a96 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -58,7 +58,7 @@ 发帖时间:<%= format_time(activity.created_on) %>
-
+
<% if activity.parent_id.nil? %> <%= activity.content.to_s.html_safe%> <% else %> diff --git a/app/views/blogs/_article_list.html.erb b/app/views/blogs/_article_list.html.erb index 2164d785f..62f1391b0 100644 --- a/app/views/blogs/_article_list.html.erb +++ b/app/views/blogs/_article_list.html.erb @@ -76,7 +76,7 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%", "<%=topic.class.to_s%>"); showNormalImage('activity_description_<%= topic.id %>'); - if($("#intro_content_blog_<%= topic.id %>").height() > 810) { + if($("#intro_content_<%= topic.id %>").height() > 810) { $("#intro_content_show_<%= topic.id %>").show(); } $("#intro_content_show_<%= topic.id %>").click(function(){