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

12 lines
762 B
Plaintext

<% if @state == 1 %>
hideModal();
alert("您还未登录");
<% elsif @state == 2 || @state == 3 %>
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_for_homework', :locals => {:homework => @homework, :state => @state}) %>');
showModal('ajax-modal', '500px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
"<a href='javascript:' onclick='hideModal();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
$('#ajax-modal').parent().css("top","30%").css("left","30%").css("position","fixed").css("border","3px solid #269ac9");
$("#homework_apply_status_<%=@homework.id %>").html("等待回复");
<% end %>