From 178752ba8f308726a573a1ec4cd43f037e087d6d Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 16 Oct 2015 15:42:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=B0=86=E2=80=9C=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E2=80=9D=E6=94=B9=E6=88=90=E2=80=9C=E6=8F=90=E4=BA=A4=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d21eb48a9..ce11bded8 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -2351,7 +2351,7 @@ module ApplicationHelper def user_for_homework_common homework,is_teacher if User.current.member_of_course?(homework.course) if is_teacher #老师显示作品数量 - link_to "提交(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" + link_to "作品(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" else #学生显示提交作品、修改作品等按钮 work = cur_user_works_for_homework homework if work.nil? @@ -2367,7 +2367,7 @@ module ApplicationHelper end end else - link_to "提交(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" + link_to "作品(#{homework.student_works.count})",student_work_index_path(:homework => homework.id),:class => "c_blue" end end From 1b2bbdc577570c7488a8bb0c1a7b85370289e165 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 16 Oct 2015 16:56:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E6=8D=A2=E8=A1=8C=E7=9A=84=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=B0=86=E6=8D=A2=E8=A1=8C=E5=8F=98=E6=88=90?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=20=E5=A6=82=E6=9E=9C=E8=81=9A=E7=84=A6?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=AD=A6=E6=A0=A1id?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E8=AF=9D=EF=BC=8C=E9=82=A3=E4=B9=88?= =?UTF-8?q?=E5=B0=B1=E4=B8=8D=E9=9C=80=E8=A6=81=E5=8E=BB=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=BA=86=E3=80=82=20=E5=A6=82=E6=9E=9C=E6=98=AF=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E5=AD=A6=E6=A0=A1=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E7=BC=98=E6=95=85=EF=BC=8C=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E8=AF=B4=E6=98=8E=E5=AD=A6=E6=A0=A1=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E6=98=AF=E4=BB=8E=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index d0125cd3b..b991ee32a 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -527,7 +527,7 @@ } function changeValue(value,data){ //console.log(value+","+data) - $("input[name='province']").val(value); + $("input[name='province']").val(value); $("input[name='occupation']").val(data); $("#search_school_result_list").hide(); $("#hint").hide(); @@ -570,7 +570,7 @@ var i = 0; $("#search_school_result_list").html(''); for (; i < data.length; i++) { - link = '' + data[i].school.name + '
'; + link = '' + data[i].school.name + '
'; $("#search_school_result_list").append(link); } $("#search_school_result_list").css('left', $(e.target).offset().left); @@ -601,7 +601,10 @@ } }) $("input[name='province']").on('focus', function (e) { - if($(e.target).val() == ''){ + if($(e.target).val() == ''){ // + return; + } + if( $("input[name='occupation']").val() != ''){ //如果已经有id了。肯定存在,不用去找了。 return; } $.ajax({ @@ -612,7 +615,7 @@ var i = 0; $("#search_school_result_list").html(''); for (; i < data.length; i++) { - link = '' + data[i].school.name + '
'; + link = '' + data[i].school.name + '
'; $("#search_school_result_list").append(link); } $("#search_school_result_list").css('left', $(e.target).offset().left); @@ -658,8 +661,10 @@ <% if( !@act.nil? && @act == 'password') %> $("#users_tb_2").click(); <% end %> - $('#my_account_form_link').click(function(){ + $('#my_account_form_link').click(function(e){ if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话 + $("#hint").html('学校必须是从下拉列表中选择的').show(); + e.stopImmediatePropagation(); return; } $('#my_account_form_btn').click(); From f25015c6b8f2695ccb4d0af273fea0b14aa1d6b3 Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Fri, 16 Oct 2015 16:59:00 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E5=90=8D=E5=AD=97?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E6=8D=A2=E8=A1=8C=E7=9A=84=E8=AF=9D=EF=BC=8C?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=B0=86=E6=8D=A2=E8=A1=8C=E5=8F=98=E6=88=90?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=20=E5=A6=82=E6=9E=9C=E8=81=9A=E7=84=A6?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E5=AD=A6=E6=A0=A1id?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=9A=84=E8=AF=9D=EF=BC=8C=E9=82=A3=E4=B9=88?= =?UTF-8?q?=E5=B0=B1=E4=B8=8D=E9=9C=80=E8=A6=81=E5=8E=BB=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E4=BA=86=E3=80=82=20=E5=A6=82=E6=9E=9C=E6=98=AF=E5=9B=A0?= =?UTF-8?q?=E4=B8=BA=E5=AD=A6=E6=A0=A1=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84?= =?UTF-8?q?=E7=BC=98=E6=95=85=EF=BC=8C=E7=BB=99=E5=87=BA=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=EF=BC=8C=E8=AF=B4=E6=98=8E=E5=AD=A6=E6=A0=A1=E5=BF=85=E9=A1=BB?= =?UTF-8?q?=E6=98=AF=E4=BB=8E=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/my/account.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index b991ee32a..b439adaac 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -663,7 +663,7 @@ <% end %> $('#my_account_form_link').click(function(e){ if( $("input[name='province']").val().trim() != '' && $("input[name='occupation']").val().trim() == ''){ //学校名字和id不对的话 - $("#hint").html('学校必须是从下拉列表中选择的').show(); + $("#hint").html('学校必须是从下拉列表中选择的,不能手动修改').show(); e.stopImmediatePropagation(); return; }