socialforge/app/views/users/choose_user_course.js.erb

17 lines
1.1 KiB
Plaintext

<% if @status == 1 %>
alert("您的申请尚未通过审核,暂时不可发送至课程");
<% elsif @status == 2 %>
alert("该作业是私有的,请先提交申请并通过审核后再发送");
<% else %>
<% if params[:is_observe].nil? %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/send_homework_to_course', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>');
showModal('ajax-modal', '452px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='hideModal();' style='margin-left: 435px;' class='resourceClose'></a>");
$('#ajax-modal').parent().css("top","50%").css("left","50%");
$('#ajax-modal').parent().addClass("popbox").addClass("resourceUploadPopup");
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
<% else %>
$("#send_homework_to_course_form").html("<%= escape_javascript(render :partial => 'users/send_homework_to_course_form', :locals => {:courses => @course, :user => @user, :send_id => @send_id}) %>");
<% end %>
<% end %>