选择框默认显示文字类似于“请选择发布作业的课程”,点击即弹出供选择的课程列表,课程名称后还需要显示开课学期
This commit is contained in:
parent
d845b8373a
commit
de1708b8df
|
@ -546,7 +546,7 @@ module UsersHelper
|
||||||
type = []
|
type = []
|
||||||
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
|
user.courses.select{|c| user.allowed_to?(:as_teacher,c)}.each do |course|
|
||||||
option = []
|
option = []
|
||||||
option << course.name
|
option << course.name+"("+course.time.to_s+course.term+")"
|
||||||
option << course.id
|
option << course.id
|
||||||
type << option
|
type << option
|
||||||
end
|
end
|
||||||
|
|
|
@ -74,7 +74,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></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">
|
<script id="t:test-answer-list" type="text/html">
|
||||||
<div class="mt10">
|
<div class="mt10">
|
||||||
|
|
Loading…
Reference in New Issue