课程列表,列表描述内容去掉空格

This commit is contained in:
yuanke 2016-04-29 15:07:46 +08:00
parent 196501bc39
commit 789f3906a5
2 changed files with 5 additions and 2 deletions

View File

@ -28,10 +28,10 @@
<div class="cl"></div>
<li class="ml15">
<span class="grayTxt">
开课学期:&nbsp;&nbsp;<span><%= current_time_and_term course %></span>
创建时间:<%= format_time(course.created_at) %>
</span>
<span class="grayTxt">
创建时间:<%= format_time(course.created_at) %>
开课学期:&nbsp;&nbsp;<span><%= current_time_and_term course %></span>
</span>
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %>
<% homework_num = course.homework_commons.count %>

View File

@ -1246,6 +1246,9 @@ function description_showwords_ellipsis(id){
str = str + $(this).text();
});
//去掉空格
str = str.replace(/\s/gi,'');
if(str.length > 100){
str = str.substring(0,100)+"...";
}