diff --git a/app/views/users/_user_course_list.html.erb b/app/views/users/_user_course_list.html.erb index 610c16293..ca9420f7d 100644 --- a/app/views/users/_user_course_list.html.erb +++ b/app/views/users/_user_course_list.html.erb @@ -28,10 +28,10 @@
  • - 开课学期:  <%= current_time_and_term course %> + 创建时间:<%= format_time(course.created_at) %> - 创建时间:<%= format_time(course.created_at) %> + 开课学期:  <%= current_time_and_term course %> <% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %> <% homework_num = course.homework_commons.count %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 31807b8d0..7c52bae35 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -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)+"..."; }