From 738acad2116066a76b870ef5b7793cee70cfc7e6 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 5 Jan 2016 16:52:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=95=E5=BC=80=E3=80=81=E6=94=B6=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/blogs/_article.html.erb | 2 +- app/views/blogs/_article_list.html.erb | 2 +- app/views/boards/_course_show_detail.html.erb | 2 +- app/views/boards/_project_show_detail.html.erb | 2 +- app/views/messages/reply.js.erb | 18 +++++++++++++++++- .../projects/_project_activities.html.erb | 2 +- 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index 99c743a96..32e53d188 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 10868efb4..2164d785f 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_<%= topic.id %>").height() > 360) { + if($("#intro_content_blog_<%= topic.id %>").height() > 810) { $("#intro_content_show_<%= topic.id %>").show(); } $("#intro_content_show_<%= topic.id %>").click(function(){ diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb index f971776f1..8f50905c6 100644 --- a/app/views/boards/_course_show_detail.html.erb +++ b/app/views/boards/_course_show_detail.html.erb @@ -42,7 +42,7 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); showNormalImage('activity_description_<%= topic.id %>'); - if($("#intro_content_<%= topic.id %>").height() > 360) { + if($("#intro_content_<%= topic.id %>").height() > 810) { $("#intro_content_show_<%= topic.id %>").show(); } $("#intro_content_show_<%= topic.id %>").click(function(){ diff --git a/app/views/boards/_project_show_detail.html.erb b/app/views/boards/_project_show_detail.html.erb index 7af315f56..5b266b90c 100644 --- a/app/views/boards/_project_show_detail.html.erb +++ b/app/views/boards/_project_show_detail.html.erb @@ -41,7 +41,7 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); showNormalImage('activity_description_<%= topic.id %>'); - if($("#intro_content_<%= topic.id %>").height() > 360) { + if($("#intro_content_<%= topic.id %>").height() > 810) { $("#intro_content_show_<%= topic.id %>").show(); } $("#intro_content_show_<%= topic.id %>").click(function(){ diff --git a/app/views/messages/reply.js.erb b/app/views/messages/reply.js.erb index f33986c59..ea848439f 100644 --- a/app/views/messages/reply.js.erb +++ b/app/views/messages/reply.js.erb @@ -5,4 +5,20 @@ <% elsif @org_subfield %> $("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'organizations/org_subfield_message', :locals => {:activity => @topic,:user_activity_id =>@user_activity_id}) %>"); <%end%> -init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%", "UserActivity"); \ No newline at end of file +init_activity_KindEditor_data(<%= @user_activity_id %>,"","87%", "UserActivity"); +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/projects/_project_activities.html.erb b/app/views/projects/_project_activities.html.erb index b3ae89cf2..781b65810 100644 --- a/app/views/projects/_project_activities.html.erb +++ b/app/views/projects/_project_activities.html.erb @@ -34,7 +34,7 @@ $(function () { init_activity_KindEditor_data(<%= activity.id%>, null, "87%", "<%= activity.class.to_s %>"); showNormalImage('activity_description_<%= activity.id %>'); - if ($("#intro_content_<%= activity.id %>").height() > 360) { + if ($("#intro_content_<%= activity.id %>").height() > 810) { $("#intro_content_show_<%= activity.id %>").show(); } $("#intro_content_show_<%= activity.id %>").click(function () {