From f9209db7d2b60589536200305aa733c2da5a613e Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 8 Sep 2017 18:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=B7=AF=E5=BE=84=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E7=AB=A0=E8=8A=82=E5=90=8E=EF=BC=8C=E5=90=8E=E9=9D=A2?= =?UTF-8?q?=E7=9A=84=E7=AB=A0=E8=8A=82=E6=95=B0=E5=AD=97=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=AE=9E=E6=97=B6=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/stages/destroy.js.erb | 3 +++ app/views/subjects/show.html.erb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/stages/destroy.js.erb b/app/views/stages/destroy.js.erb index 6fb2a2c29..a111c8e88 100644 --- a/app/views/stages/destroy.js.erb +++ b/app/views/stages/destroy.js.erb @@ -1,5 +1,8 @@ <% if @status == 1 %> $("#stage_div_<%= @stage.id %>").remove(); +<% @subject.stages.each do |stage| %> + $("#stage_div_<%= stage.id %>").find(".subject_stage_index").html("<%= stage.position %>"); +<% end %> $("#subject_top").html("<%= j(render :partial => 'subjects/subject_top') %>"); <% else %> notice_box("删除失败"); diff --git a/app/views/subjects/show.html.erb b/app/views/subjects/show.html.erb index 2f3f3693a..c92282443 100644 --- a/app/views/subjects/show.html.erb +++ b/app/views/subjects/show.html.erb @@ -20,7 +20,7 @@

- 第<%= s_index + 1 %>章  <%= stage.name %> + <%= s_index + 1 %>章  <%= stage.name %> <% if User.current.manager_of_subject?(@subject) %>