学生列表的删除和编辑按钮的对齐显示、删除学生时刷新班级头部的学生数

This commit is contained in:
cxt 2016-11-11 17:55:25 +08:00
parent 18bfb26689
commit c352fb5604
3 changed files with 10 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<% is_teacher = User.current.allowed_to?(:as_teacher, @course) || User.current.admin? %>
<% if members.any? %>
<table class="sy_new_table clear sy_new_table_width" cellpadding="0" cellspacing="0">
<table class="sy_new_table clear sy_new_table_width" cellpadding="0" cellspacing="0" id="student_list_table">
<thead>
<tr class="clear">
<th class="sy_th6">序号</th>
@ -123,7 +123,7 @@
<%= form_tag({:controller => 'courses', :action => 'teacher_assign_group', :id => @course.id,:user_id => member.user_id, :group_id => @group && @group != -1 ? @group.id : -1},:remote=>'true', :method => 'post', :id=>"join_group_form_#{member.id}", :class => 'query_form') do %>
<div class="select-class-option">
<span class="hidden" style="display:inline-block; vertical-align:middle; max-width:70px;"><%=member.course_group_id == 0 ? "暂无" : member.course_group.name %></span>
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon" alt="编辑" style="background-position:0 5px;"></a>
<a href="javascript:void(0)" class="sy_icons_edit pic_edit_icon fr mt9 options_show_or_hide" alt="编辑" style="background-position:0 5px;"></a>
</div>
<%= select( :name,:group_id, course_group_option(@course),
{ :include_blank => false,:selected => member.course_group_id},
@ -136,7 +136,7 @@
</td>
<% if is_teacher %>
<td>
<a href="javascript:void(0)" onClick="delete_confirm_box('<%=delete_member_course_path(@course, :member_id => member.id) %>', '确认删除该成员吗?');" class="sy_icons_del fl"></a>
<a href="javascript:void(0)" onClick="delete_confirm_box('<%=delete_member_course_path(@course, :member_id => member.id) %>', '确认删除该成员吗?');" class="sy_icons_del fl options_show_or_hide"></a>
</td>
<% end %>
</tr>
@ -159,6 +159,11 @@
<script>
$(document).ready(function(){
// $("#student_list_table").mouseover(function(){
// $(".options_show_or_hide").show();
// }).mouseout(function(){
// $(".options_show_or_hide").hide();
// });
$(".pic_edit_icon").click(function(){
$(this).parent().hide();
$(this).parent().next().show();

View File

@ -2,3 +2,4 @@ hideModal();
$("#member_li_<%=params[:member_id] %>").html("");
$("#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) %>");

View File

@ -195,6 +195,7 @@ h4{ font-size:14px;}/*color:#3b3b3b;*/
.mt6{ margin-top:6px;}
.mt7 {margin-top:7px;}
.mt8{ margin-top:8px !important;}
.mt9{ margin-top:9px !important;}
.mt10{ margin-top:10px !important;}
.mt12 { margin-top:12px !important;}
.mt15 {margin-top:15px;}