From 7970bd6df073d780ef42ee55e2f7c9511a4288c6 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 24 Mar 2015 09:57:55 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E6=88=AA=E8=87=B3=E6=97=B6=E9=97=B4=E7=9A=84js=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=202=E3=80=81=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E5=88=B0=E4=BA=86=E4=B9=8B=E5=90=8E=E7=9A=84=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/homework.html.erb | 18 +++++++++++++++--- public/javascripts/course.js | 14 ++++++++------ 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/app/views/courses/homework.html.erb b/app/views/courses/homework.html.erb index 751558237..f5fe74953 100644 --- a/app/views/courses/homework.html.erb +++ b/app/views/courses/homework.html.erb @@ -29,10 +29,22 @@

<%= textilizable bid, :description %> -
<%= l(:label_create_time)%> : <%= format_time bid.created_on%>

-
<%= l(:label_expend_information)%> - +
+ <%= l(:button_more)%>... +
+ <%= l(:label_end_time)%>:<%= bid.deadline%> + <% if betweentime(bid.deadline) < 0 %> + + <%= l(:label_commit_limit)%> + + <% else %> + +
+
+ <% end %>
diff --git a/public/javascripts/course.js b/public/javascripts/course.js index f6bc4933c..4a9854fcd 100644 --- a/public/javascripts/course.js +++ b/public/javascripts/course.js @@ -35,7 +35,7 @@ $(document).ready(function () { $("#RSide").css("min-height",$("#LSide").height()-30); }); //课程作业结束时间倒计时 -function ShowCountDown(year,month,day,divname) +function show_bid_dead_line(year,month,day,divname) { var now = new Date(); var endDate = new Date(year, month-1, day); @@ -45,11 +45,13 @@ function ShowCountDown(year,month,day,divname) var hour=Math.floor((leftsecond-day1*24*60*60)/3600); var minute=Math.floor((leftsecond-day1*24*60*60-hour*3600)/60); var second=Math.floor(leftsecond-day1*24*60*60-hour*3600-minute*60); - $("#"+divname).html("作业提交还剩 : " - +day1+"  " - +hour+"  " - +minute+"  " - +second+" "); + $("#"+divname).html("
" + + " 天" + + " 小时" + + " 分" + + " 秒" + + "
" + + "

作业提交还剩:

"); } //验证新建作业的名字 function regex_bid_name()