点击发布作业的取消按钮时还原截止日期和课程列表下拉框的默认值
This commit is contained in:
parent
de1708b8df
commit
7aef734113
|
@ -76,7 +76,7 @@
|
|||
<div class="cl"></div>
|
||||
<script type="text/javascript">
|
||||
$(function (){
|
||||
$("#course_id").append("<option value='-1'hidden selected>请选择发布作业的课程</option>");
|
||||
$("#course_id").append("<option value='-1' id='option_select' hidden selected>请选择发布作业的课程</option>");
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<script type="text/javascript">
|
||||
function reset_homework(){
|
||||
$("#homework_name").val("");
|
||||
$("#homework_end_time").val("<%= (Time.now + 3600 * 24).strftime('%Y-%m-%d')%>");
|
||||
$("#course_id").val("");
|
||||
$("#homework_end_time").val("");
|
||||
$("#course_id").val($("#option_select").val());
|
||||
$("#homework_attachments").html("<%= escape_javascript(render :partial => 'users/user_homework_attachment', :locals => { :container => HomeworkCommon.new })%>");
|
||||
homework_description_editor.html("");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue