选择框默认显示文字类似于“请选择发布作业的课程”,点击即弹出供选择的课程列表,课程名称后还需要显示开课学期

This commit is contained in:
cxt 2015-09-01 16:41:49 +08:00
parent d845b8373a
commit de1708b8df
2 changed files with 6 additions and 2 deletions

View File

@ -546,7 +546,7 @@ module UsersHelper
type = []
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
option = []
option << course.name
option << course.name+""+course.time.to_s+course.term+""
option << course.id
type << option
end

View File

@ -74,7 +74,11 @@
</div>
</div>
<div class="cl"></div>
<script type="text/javascript">
$(function (){
$("#course_id").append("<option value='-1'hidden selected>请选择发布作业的课程</option>");
});
</script>
<script id="t:test-answer-list" type="text/html">
<div class="mt10">