From e87238497c67420e5efbc7b9b07cf5e1e6e17855 Mon Sep 17 00:00:00 2001 From: z9hang Date: Mon, 24 Nov 2014 11:26:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=B5=84=E6=BA=90=E5=BA=93?= =?UTF-8?q?=EF=BC=9A=E9=BC=A0=E6=A0=87=E7=A7=BB=E8=BF=87=E6=97=B6=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E6=90=9C=E7=B4=A2=E6=8C=89=E9=92=AE=E7=9A=84=E9=A2=9C?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/files/_course_file.html.erb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 04ce917c8..0823fae4b 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -31,6 +31,11 @@ $('#insite').attr("class", "re_schbtn b_dblue"); } } + function buttoncss() + { + $('#incourse').attr("class", "re_schbtn b_lblue"); + $('#insite').attr("class", "re_schbtn b_lblue"); + } @@ -39,8 +44,8 @@
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %> <%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%> - <%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onclick => "presscss('incourse')"%> - <%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onclick => "presscss('insite')" %> + <%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %> + <%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %> <% end %> <% if is_course_teacher(User.current,@course) %> 上传资源