添加课程成员后不自动刷新

This commit is contained in:
sw 2015-04-17 16:53:04 +08:00
parent cdbe95f6ec
commit 6df1f55ac4
6 changed files with 20 additions and 17 deletions

View File

@ -1,15 +1,4 @@
<div class="search_course fl">
<%= form_tag({:controller => 'courses', :action => 'search_member'},:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %>
<!-- , :onkeyup => "regexQ('#{l(:label_search_conditions_not_null)}');" -->
<%= text_field_tag 'name', params[:name], :placeholder => "昵称、学号、姓名搜索", :class => "search_text fl" %>
<a href="javascript:void(0)" onclick="submitMemberSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white ml10" >
<%= l(:label_search)%>
</a>
<br />
<span id="course_member_name_span" style="float: left"></span>
<% end %>
</div>
<div class="cl"></div>
<div class="members_left">
<ul style=" border-bottom:none;">
<li>

View File

@ -1 +1 @@
$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');

View File

@ -72,7 +72,21 @@
</div>
<div class="hwork_undis" id="tbc_02">
<%= render :partial => "course_members" %>
<div class="search_course fl">
<%= form_tag({:controller => 'courses', :action => 'search_member'},:id => "course_member_search_form", :method => :get, :class => "search_form_course",:remote => true) do %>
<!-- , :onkeyup => "regexQ('#{l(:label_search_conditions_not_null)}');" -->
<%= text_field_tag 'name', params[:name], :placeholder => "昵称、学号、姓名搜索", :class => "search_text fl" %>
<a href="javascript:void(0)" onclick="submitMemberSerch('<%= l(:label_search_conditions_not_null) %>');" class="search_btn fl f14 c_white ml10" >
<%= l(:label_search)%>
</a>
<br />
<span id="course_member_name_span" style="float: left"></span>
<% end %>
</div>
<div class="cl"></div>
<div id="course_members_setting">
<%= render :partial => "course_members" %>
</div>
</div><!---成员结束-->
</div><!--talknew end-->
<div class="cl"></div>

View File

@ -19,7 +19,7 @@ alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => er
<% if @create_member_error_messages%>
alert("<%= @create_member_error_messages%>");
<% else%>
$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
alert("添加成功");
<% end%>
<%end%>

View File

@ -1,6 +1,6 @@
<%if @project%>
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
<%elsif @course%>
$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
<%end%>
hideOnLoad();

View File

@ -2,7 +2,7 @@
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
$("#member-<%= @member.id %>").effect("highlight");
<%elsif @course%>
$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
$('#course_members_setting').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
<%end%>
hideOnLoad();