15 lines
805 B
Plaintext
15 lines
805 B
Plaintext
<% if @state == 1 %>
|
|
hideModal();
|
|
alert("您还未登录,请先登录");
|
|
<% elsif @state == 2 %>
|
|
$("#ajax-modal").html('<%= escape_javascript( render :partial => 'users/apply_for_resource', :locals => {:attachment => @attachment, :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","50%").css("position","fixed").css("border","3px solid #269ac9");
|
|
$("#homework_apply_status_<%= @attachment.id %>").html("等待回复");
|
|
<% elsif @state == 3 %>
|
|
hideModal();
|
|
alert("您已申请过该资源");
|
|
<% end %> |