From fcadf65688dabf8b1a154680e3351142736fdd1c Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 29 Nov 2016 11:14:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=AD=A6=E7=94=9F=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=9A=E5=88=A0=E9=99=A4=E6=88=90=E5=91=98=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E6=9C=AA=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/courses/delete_member.js.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/courses/delete_member.js.erb b/app/views/courses/delete_member.js.erb index 89588f4c1..4e31a87c1 100644 --- a/app/views/courses/delete_member.js.erb +++ b/app/views/courses/delete_member.js.erb @@ -1,5 +1,9 @@ hideModal(); -$("#member_li_<%=params[:member_id] %>").html(""); +var all_indexes = $("#member_li_<%=params[:member_id] %>").nextAll().find("td:first-child"); +for(var i = 0; i < all_indexes.length; i++){ + $(all_indexes[i]).html(parseInt($(all_indexes[i]).html()) - 1); +} +$("#member_li_<%=params[:member_id] %>").remove(); $("#st_groups").html("<%=escape_javascript(render :partial => 'new_groups_name', :locals => {:course_groups => @course_groups}) %>"); $("#group_children_list").html("<%= escape_javascript( render :partial => 'layouts/group_children_list', :locals => {:course => @course})%>"); $("#student_number").html("<%= studentCount(@course) %>");