From f9d12758d45c4342f46d3ae25a2c2b70605207bb Mon Sep 17 00:00:00 2001 From: cxt Date: Tue, 22 Nov 2016 11:29:45 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8F=AD=E7=BA=A7=E5=88=86=E7=8F=AD=EF=BC=9A?= =?UTF-8?q?=E5=A6=82=E5=9B=BE=E5=9C=A8=E6=9F=90=E5=85=B7=E4=BD=93=E5=88=86?= =?UTF-8?q?=E7=8F=AD=E4=B8=AD=EF=BC=8C=E7=BC=96=E8=BE=91=E6=9F=90=E6=88=90?= =?UTF-8?q?=E5=91=98=E5=88=86=E7=8F=AD=E4=B8=BA=E2=80=9C=E6=9A=82=E6=97=A0?= =?UTF-8?q?=E2=80=9D=E6=88=96=E5=85=B6=E4=BB=96=E5=88=86=E7=8F=AD=EF=BC=8C?= =?UTF-8?q?=E5=8E=9F=E5=A7=8B=E5=88=86=E7=8F=AD=E5=88=97=E8=A1=A8=E6=9C=AA?= =?UTF-8?q?=E8=87=AA=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/teacher_assign_group.js.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/courses/teacher_assign_group.js.erb b/app/views/courses/teacher_assign_group.js.erb index 4df0924ea..503c530cd 100644 --- a/app/views/courses/teacher_assign_group.js.erb +++ b/app/views/courses/teacher_assign_group.js.erb @@ -1,5 +1,9 @@ <% if params[:group_id] != "0" %> -$("#member_li_<%=@member.id %>").html(""); +var all_indexes = $("#member_li_<%=@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_<%=@member.id %>").remove(); <% end %> <% if @group && @group != "-1" %> //$("#member_content").html("<%#= escape_javascript( render :partial => 'new_member_list', :locals => {:members => @results})%>");