2014-06-12 16:01:38 +08:00
|
|
|
<%if @project%>
|
2013-08-01 10:33:49 +08:00
|
|
|
$('#tab-content-members').html('<%= escape_javascript(render :partial => 'projects/settings/members') %>');
|
|
|
|
|
2014-05-22 13:40:41 +08:00
|
|
|
<%if !@applied_members%>
|
2015-03-30 14:55:41 +08:00
|
|
|
<% if @members.present? && @members.all? {|m| m.valid? } %>
|
|
|
|
<% @members.each do |member| %>
|
|
|
|
$("#member-<%= member.id %>").effect("highlight");
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% if @members %>
|
|
|
|
<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ')%>
|
|
|
|
alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors || ''))) %>');
|
|
|
|
<% else%>
|
2015-01-30 14:16:32 +08:00
|
|
|
// alert('');
|
2015-03-30 14:55:41 +08:00
|
|
|
<% end%>
|
2013-08-01 10:33:49 +08:00
|
|
|
<% end %>
|
2015-03-30 14:55:41 +08:00
|
|
|
<% end %>
|
|
|
|
<%elsif @course%>
|
|
|
|
<% if @create_member_error_messages%>
|
|
|
|
alert("<%= @create_member_error_messages%>");
|
|
|
|
<% else%>
|
|
|
|
$('#tbc_02').html('<%= escape_javascript(render :partial => 'courses/course_members') %>');
|
|
|
|
alert("添加成功");
|
|
|
|
<% end%>
|
|
|
|
<%end%>
|
|
|
|
|
|
|
|
hideOnLoad();
|