点击发布作业,作业列表标题栏自动获得焦点

This commit is contained in:
sw 2015-09-29 10:48:50 +08:00
parent 22b9c6a866
commit f2d3ec980a
2 changed files with 9 additions and 3 deletions

View File

@ -12,6 +12,12 @@
$("#RSide").removeAttr("id");
$("#Container").css("width","1000px");
});
<% if @is_new%>
$(function(){
$("#homework_name").focus();
});
<%end%>
</script>
<style>
/*日历选择图*/
@ -22,7 +28,7 @@
.is_public{display: none !important;}
.link_file{ background:url(../images/pic_file.png) 0 5px no-repeat !important;}
#attachments_fields input.filename{ background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
.link_file_a{background:url(../images/pic_file.png) 0 3px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
.link_file_a{background:url(../images/pic_file.png) 0 5px no-repeat !important;padding-left:20px !important; color:#64bdd9 !important;}
</style>
<div class="homepageRight mt0 ml10">

View File

@ -91,9 +91,9 @@
<%= link_to "(#{@course.course_activities.count})", course_path(@course), :class => "subnav_num c_orange"%>
</div>
<div class="subNav">
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id,:is_new => 1), :class => "f14 c_blue02"%>
<%= link_to l(:label_homework), homework_common_index_path(:course => @course.id), :class => "f14 c_blue02"%>
<%= link_to "(#{@course.homework_commons.count})", homework_common_index_path(:course => @course.id), :class => "subnav_num c_orange"%>
<%= link_to( "+#{l(:label_course_homework_new)}", "javascript:void(0)", :class => 'subnav_green c_white', :onclick => "new_homework_alert();") if is_teacher %>
<%= link_to( "+#{l(:label_course_homework_new)}", homework_common_index_path(:course => @course.id,:is_new => 1), :class => 'subnav_green c_white') if is_teacher %>
</div>
<div class="subNav">
<%= link_to l(:label_course_news), course_news_index_path(@course), :class => "f14 c_blue02" %>