From f2d3ec980a64c0bbf2f7ac956918c397531ae63e Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 29 Sep 2015 10:48:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=8F=91=E5=B8=83=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=EF=BC=8C=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E6=A0=8F=E8=87=AA=E5=8A=A8=E8=8E=B7=E5=BE=97=E7=84=A6?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/homework_common/index.html.erb | 8 +++++++- app/views/layouts/base_courses.html.erb | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/homework_common/index.html.erb b/app/views/homework_common/index.html.erb index c725384fd..0c3dd6d8e 100644 --- a/app/views/homework_common/index.html.erb +++ b/app/views/homework_common/index.html.erb @@ -12,6 +12,12 @@ $("#RSide").removeAttr("id"); $("#Container").css("width","1000px"); }); + + <% if @is_new%> + $(function(){ + $("#homework_name").focus(); + }); + <%end%>
diff --git a/app/views/layouts/base_courses.html.erb b/app/views/layouts/base_courses.html.erb index 57dab9933..4dd5b0b27 100644 --- a/app/views/layouts/base_courses.html.erb +++ b/app/views/layouts/base_courses.html.erb @@ -91,9 +91,9 @@ <%= link_to "(#{@course.course_activities.count})", course_path(@course), :class => "subnav_num c_orange"%>