From 2efcb5b89ab47e117cfc6feb68269c84f2cfec34 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 5 Jan 2016 16:05:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=AE=A8=E8=AE=BA=E5=8C=BA?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=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/boards/_course_show_detail.html.erb | 24 ++++++++++++------- public/stylesheets/public.css | 2 +- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/views/boards/_course_show_detail.html.erb b/app/views/boards/_course_show_detail.html.erb index 75ee516c4..f971776f1 100644 --- a/app/views/boards/_course_show_detail.html.erb +++ b/app/views/boards/_course_show_detail.html.erb @@ -42,15 +42,21 @@ $(function () { init_activity_KindEditor_data(<%= topic.id%>, null, "87%"); showNormalImage('activity_description_<%= topic.id %>'); - /*var description_images=$("div#activity_description_<%#= topic.id %>").find("img"); - if (description_images.length>0) { - for (var i=0; i").attr("href",image.attr('src')); - image.wrap(element); - } - } - $('#activity_description_<%#= topic.id %> a').colorbox({rel:'nofollow', close: "关闭", returnFocus: false});*/ + if($("#intro_content_<%= topic.id %>").height() > 360) { + $("#intro_content_show_<%= topic.id %>").show(); + } + $("#intro_content_show_<%= topic.id %>").click(function(){ + $("#activity_description_<%= topic.id %>").toggleClass("maxh360"); + $("#activity_description_<%= topic.id%>").toggleClass("lh18"); + $("#intro_content_show_<%= topic.id %>").hide(); + $("#intro_content_hide_<%= topic.id %>").show(); + }); + $("#intro_content_hide_<%= topic.id %>").click(function(){ + $("#activity_description_<%= topic.id %>").toggleClass("maxh360"); + $("#activity_description_<%= topic.id%>").toggleClass("lh18"); + $("#intro_content_hide_<%= topic.id %>").hide(); + $("#intro_content_show_<%= topic.id %>").show(); + }); }); <% if topic %> diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 7f9a4ad7a..e36f477d5 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -959,5 +959,5 @@ span.at {color:#269ac9;} .orgSendSearch {border:1px solid #dddddd; outline:none; width:262px; height:22px; padding-left:10px; float:left;} /*文本描述展开高度*/ -.maxh360 {max-height: 760px;} +.maxh360 {max-height: 810px;} .lh18 { line-height: 18px;} \ No newline at end of file