socialforge/app/views/applied_project/applied_join_project.js.erb

14 lines
818 B
Plaintext
Raw Normal View History

// @status: 0 该项目不存在1 不重复加入2 成功加入; 3 已是项目成员;其它 加入失败
2015-01-23 17:10:21 +08:00
<% if @status == 0%>
2015-04-10 16:59:45 +08:00
alert("<%= l('project.join.tips.notexist') %>");
2015-01-23 17:10:21 +08:00
<% elsif @status == 1%>
2015-04-10 16:59:45 +08:00
alert("<%= l('project.join.tips.repeat') %>");
2015-01-26 15:41:10 +08:00
<% elsif @status == 2%>
2015-04-10 16:59:45 +08:00
alert("<%= l('project.join.tips.success') %>");
hideModal($("#popbox"));
$("#applied_project_link_<%= @project.id%>").replaceWith("<%=escape_javascript(link_to '取消申请',appliedproject_applied_path(:project_id => @project.id,:user_id => User.current.id),:class => "blue_n_btn fr mt20", :remote => "true",:method => "delete",:id => "applied_project_link_#{@project.id}")%>");
<% elsif @status == 3%>
2015-04-10 16:59:45 +08:00
alert("<%= l('project.join.tips.has') %>");
2015-01-23 17:10:21 +08:00
<%else%>
2015-04-10 16:59:45 +08:00
alert("<%= l('project.join.tips.fail') %>");
2015-01-23 17:10:21 +08:00
<%end%>