diff --git a/app/views/files/_hidden_file.html.erb b/app/views/files/_hidden_file.html.erb index c8de6586f..6d8d861d5 100644 --- a/app/views/files/_hidden_file.html.erb +++ b/app/views/files/_hidden_file.html.erb @@ -1,23 +1,24 @@ -
+

发布设置

-
+
<%= form_tag(republish_file_course_file_path(@course,@file), :multipart => true,:remote => !ie8?,:name=>"upload_form") do %>
- + <%#= calendar_for('attachment_publish_time')%>
+
- 确定 + 确定 取消 <% end %>
@@ -51,6 +52,11 @@ $('#submit_file').parent().submit(); } } + + function reset_publish_time(){ + $("#datetimepicker_mask").val(''); + $("#reset_time").hide(); + } $(function(){ $('#datetimepicker_mask').datetimepicker({ allowBlank:true, @@ -58,7 +64,13 @@ format:'Y-m-d H:i', formatTime:'H:i', formatDate:'Y-m-d', - validateOnBlur:false + validateOnBlur:false, + onSelectDate:function() { + $("#reset_time").show(); + }, + onSelectTime:function() { + $("#reset_time").show(); + } }); }); \ No newline at end of file diff --git a/app/views/files/_upload_course_files.erb b/app/views/files/_upload_course_files.erb index 80cdd0cda..b396fbbab 100644 --- a/app/views/files/_upload_course_files.erb +++ b/app/views/files/_upload_course_files.erb @@ -52,6 +52,7 @@
+
@@ -109,6 +110,10 @@ $('#submit_resource').parent().submit(); <% end %> } + function reset_publish_time(){ + $("#datetimepicker_mask").val(''); + $("#reset_time").hide(); + } $(function(){ $('#datetimepicker_mask').datetimepicker({ allowBlank:true, @@ -116,7 +121,13 @@ format:'Y-m-d H:i', formatTime:'H:i', formatDate:'Y-m-d', - validateOnBlur:false + validateOnBlur:false, + onSelectDate:function() { + $("#reset_time").show(); + }, + onSelectTime:function() { + $("#reset_time").show(); + } }); }); \ No newline at end of file diff --git a/app/views/files/file_hidden.js.erb b/app/views/files/file_hidden.js.erb index 38c61660f..f8d66c854 100644 --- a/app/views/files/file_hidden.js.erb +++ b/app/views/files/file_hidden.js.erb @@ -1,2 +1,2 @@ var htmlvalue = '<%= escape_javascript(render :partial => 'files/hidden_file',:locals => {:course => @course,:course_attachment_type => 1}) %>'; -pop_box_new(htmlvalue, 300, 140); \ No newline at end of file +pop_box_new(htmlvalue, 340, 140); \ No newline at end of file diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index fb0f08a90..1ac38638d 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -68,7 +68,15 @@ format:'Y-m-d H:i', formatTime:'H:i', formatDate:'Y-m-d', - validateOnBlur:false + validateOnBlur:false, + onSelectDate:function() { + $("#reset_time").show(); + $("#homework_publish_time_div").show(); + }, + onSelectTime:function() { + $("#reset_time").show(); + $("#homework_publish_time_div").show(); + } }); <% end %> <% allow_edit = homework.student_works.has_committed.count == 0 && homework.student_work_projects.count ==0 %> @@ -94,6 +102,7 @@ function reset_end_time(){ $("#homework_end_time").val(''); $("#homework_publish_time").val(''); + $("#reset_time").hide(); $("#homework_publish_time_div").hide(); } @@ -280,7 +289,7 @@ <%# end %>
<% if !edit_mode || (edit_mode && homework.homework_detail_manual.comment_status.to_i < 1) %> - 清空 + <% end %>