From 9690dc41f657007415e71500d73e77e5f1bdb7e6 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Mon, 18 May 2015 17:03:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug#2606=20:IE=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E5=99=A8=EF=BC=9A=E6=B5=8B=E8=AF=95=E7=89=88=E2=80=94?= =?UTF-8?q?=E4=B8=AD=E5=9B=BD=E9=AB=98=E6=A0=A1=EF=BC=9A=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E5=AD=A6=E6=A0=A1=E6=97=B6ajax=E9=93=BE=E6=8E=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/school/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/school/index.html.erb b/app/views/school/index.html.erb index 00f419aab..cdd87e723 100644 --- a/app/views/school/index.html.erb +++ b/app/views/school/index.html.erb @@ -53,7 +53,7 @@ } $.ajax({ type :"POST", - url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+province, + url :prefix + '/school/search_school/?key_word='+encodeURIComponent(value)+'&province='+encodeURIComponent(province), data :'text', success: function(data){ $("#schoollist").html(data); From ff6173c5f544e243f18016b2290afc9f48699961 Mon Sep 17 00:00:00 2001 From: yutao <283765470@qq.com> Date: Tue, 19 May 2015 09:04:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug#2623:=E7=95=99?= =?UTF-8?q?=E8=A8=80=E2=80=94=E5=88=A0=E9=99=A4=E7=95=99=E8=A8=80=EF=BC=9A?= =?UTF-8?q?=E5=BD=93=E7=95=99=E8=A8=80=E6=88=90=E5=8A=9F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E7=95=99=E8=A8=80=E7=9A=84=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E6=89=8B=E5=8A=A8=E5=88=B7=E6=96=B0=E6=89=8D?= =?UTF-8?q?=E4=BC=9A=E6=94=B9=E5=8F=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/words_controller.rb | 3 +++ app/views/words/destroy.js.erb | 2 ++ 2 files changed, 5 insertions(+) diff --git a/app/controllers/words_controller.rb b/app/controllers/words_controller.rb index 3d6772ea8..cc6c4f47e 100644 --- a/app/controllers/words_controller.rb +++ b/app/controllers/words_controller.rb @@ -85,6 +85,9 @@ class WordsController < ApplicationController elsif @journal_destroyed.jour_type == "Course" @course = Course.find @journal_destroyed.jour_id @jours_count = @course.journals_for_messages.where('m_parent_id IS NULL').count + elsif @journal_destroyed.jour_type == "Principal" + @user = User.find(@journal_destroyed.jour_id) + @jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count end respond_to do |format| format.js diff --git a/app/views/words/destroy.js.erb b/app/views/words/destroy.js.erb index 43da9a7d8..dabd3a8c7 100644 --- a/app/views/words/destroy.js.erb +++ b/app/views/words/destroy.js.erb @@ -5,6 +5,8 @@ $('#jours_count').html("<%= @jours_count %>"); <% elsif @course && @jours_count%> $('#course_jour_count').html("(<%= @jours_count %>)"); + <% elsif @user && @jours_count%> + $('#jour_count').html("<%= @jours_count %>"); <% end %> var destroyedItem = $('#word_li_<%=@journal_destroyed.id%>') destroyedItem.fadeOut(600,function(){