diff --git a/app/views/users/_course_boardlist.html.erb b/app/views/users/_course_boardlist.html.erb index ce5881a4a..c92d117ee 100644 --- a/app/views/users/_course_boardlist.html.erb +++ b/app/views/users/_course_boardlist.html.erb @@ -42,7 +42,7 @@ <% else %> <% content = activity.parent.content %> <% end %> -

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54} %>

+

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

发帖时间:<%= format_time(activity.created_on) %> diff --git a/app/views/users/_course_newslist.html.erb b/app/views/users/_course_newslist.html.erb index ca782b0d5..ff99e116e 100644 --- a/app/views/users/_course_newslist.html.erb +++ b/app/views/users/_course_newslist.html.erb @@ -30,7 +30,7 @@
-

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54} %>

+

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100} %>

发布时间:<%= format_time(activity.created_on) %> diff --git a/app/views/users/_intro_content_ex.html.erb b/app/views/users/_intro_content_ex.html.erb index ae88fc6ac..e3baf3fe2 100644 --- a/app/views/users/_intro_content_ex.html.erb +++ b/app/views/users/_intro_content_ex.html.erb @@ -12,6 +12,6 @@ $("#activity_description_<%= user_activity_id%>").css("max-height", heightType + "px"); } - description_showwords_ellipsis(<%=user_activity_id %>); + description_showwords_ellipsis(<%=user_activity_id %>,<%= maxwordsnum %>); }); \ No newline at end of file diff --git a/app/views/users/_project_boardlist.html.erb b/app/views/users/_project_boardlist.html.erb index 8a306523f..5f61d26ef 100644 --- a/app/views/users/_project_boardlist.html.erb +++ b/app/views/users/_project_boardlist.html.erb @@ -42,7 +42,7 @@ <% else %> <% content = activity.parent.content %> <% end %> -

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54 } %>

+

<%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

发帖时间:<%= format_time(activity.created_on) %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index e7be7acbd..9cd689bdd 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1266,7 +1266,7 @@ function expand_reply(container,btnid){ } //by yk 列表描述将文字和起来去掉空格多于100就显示省略号 -function description_showwords_ellipsis(id){ +function description_showwords_ellipsis(id,num){ var str = ""; $("#intro_content_"+id).each(function () { str = str + $(this).text(); @@ -1275,8 +1275,8 @@ function description_showwords_ellipsis(id){ //去掉空格 str = str.replace(/\s/gi,''); - if(str.length > 100){ - str = str.substring(0,100)+"..."; + if(str.length > num){ + str = str.substring(0,num)+"..."; } $("#intro_content_"+id).html(str); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index dafedc9a9..f4a54dbe8 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -134,8 +134,6 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostReply {width:710px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} -.homepagePostReply ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostReply ul li{list-style-type: disc;margin-left: 20px;} .homepagePostReplyBanner {width:708px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .borderBottomNone {border-bottom:none !important;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 5eb709289..673cb9ced 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -678,8 +678,6 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} -.homepagePostReply ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostReply ul li{list-style-type: disc;margin-left: 20px;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} .borderBottomNone {border-bottom:none !important;} .topBorder {border-top: 1px solid #e4e4e4;} diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 3422ffd87..927e65b94 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -219,7 +219,9 @@ a:hover.talk_btn{ background:#2a9dc1;} /****讨论区内页***/ .mt0{ margin-top:0px;} .talk_info{ margin-left:60px; margin-top:10px;} -.issue_desc li{list-style-type: decimal;margin-left: 20px;} +/*.issue_desc li{list-style-type: decimal;margin-left: 20px;}*/ +.issue_desc ol li{list-style-type: decimal;margin-left: 20px;} +.issue_desc ul li{list-style-type: disc;margin-left: 20px;} .talk_info img {max-width:100%;} a.talk_edit{ color:#426e9a; margin-right:5px;} a:hover.talk_edit{ color:#ff5722;} @@ -971,8 +973,6 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} } .homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} .homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} -.homepagePostReply ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostReply ul li{list-style-type: disc;margin-left: 20px;} .topBorder { border-top: 1px solid #E4E4E4; }