From a59677c22eff44705d292c80288c3f926c8ad475 Mon Sep 17 00:00:00 2001 From: z9hang Date: Thu, 26 Mar 2015 19:02:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E4=BF=A1=E6=81=AF=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=9A=90=E8=97=8F=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/news/_course_news.html.erb | 11 ++++++++++- public/stylesheets/courses.css | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/views/news/_course_news.html.erb b/app/views/news/_course_news.html.erb index 731ae78a1..a1f94ab27 100644 --- a/app/views/news/_course_news.html.erb +++ b/app/views/news/_course_news.html.erb @@ -52,7 +52,7 @@ <%= l(:label_release_news) %>:<%= link_to h(news.title), news_path(news),:class => 'problem_tit fl fb c_dblue' %>
<%= textilizable(news, :description) %>
<%= l(:label_create_time) %> :<%= format_time(news.created_on) %>
-
<%= l(:label_expend_information) %>
+
@@ -90,4 +90,13 @@ }); }); }); + $(function(){ + $('.news_description').each(function () { + if($(this).height() >= 60) + { + $('#news_foot_'+$(this).attr('id').replace('news_description_','')).css("display","block"); + } + } + ) + }); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index 0d995d095..6069c4a14 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -19,7 +19,7 @@ a:hover.project_name{ color:#016f33;} a.project_txt02{ color:#0781b4; width:618px; display:block; float:left; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} a:hover.project_txt{ color:#066e9a;} .noline{ border-bottom:none;} -.news_description{max-height: 38px;overflow:hidden; } +.news_description{max-height: 60px;overflow:hidden; } .news_description_none{max-height: none;} a.news_foot{ border:1px solid #e8eef2; color: #929598; text-align:center; width:600px; height:20px; padding-top:3px; cursor:pointer;} a:hover.news_foot{ color:#787b7e; border:1px solid #d4d4d4;}