From ed92faaedd3e2ee7412e22f919144dcde55f3281 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Thu, 26 Mar 2015 18:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E8=AF=BE=E7=A8=8B=E4=B8=8E?= =?UTF-8?q?=E9=87=8D=E5=BC=80=E8=AF=BE=E7=A8=8Bjs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 + app/views/courses/finishcourse.js.erb | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 595ed9476..d57802cb7 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -498,6 +498,7 @@ class CoursesController < ApplicationController @issue_custom_fields = IssueCustomField.sorted.all @trackers = Tracker.sorted.all @course = Course.new + @course.op @course.safe_attributes = params[:course] month = Time.now.month render :layout => 'new_base' diff --git a/app/views/courses/finishcourse.js.erb b/app/views/courses/finishcourse.js.erb index 46bc57e32..2399062fd 100644 --- a/app/views/courses/finishcourse.js.erb +++ b/app/views/courses/finishcourse.js.erb @@ -1,10 +1,6 @@ <% if @save_flag %> - <% if Rails.env.development? %> - console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@course.extra).try(:endup_time)%>'); - <% end %> - $('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user, - :memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>"); - $('#finish_course_<%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>"); + $('#finish_course_<%=@course.id%>').replaceWith("<%= escape_javascript(set_course_time(@course_prefs))%>"); +// alert("关闭成功"); <% else %> alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。'); <% end %>