2014-05-21 19:30:49 +08:00
|
|
|
<% selector = ".#{applied_css(@project)}" %>
|
2015-03-21 10:20:04 +08:00
|
|
|
<% id_selector = "#{applied_css(@project)}" %>
|
|
|
|
if($("<%= selector %>").get(0) == undefined)
|
|
|
|
{
|
|
|
|
$("#<%= id_selector %>").each(function(){$(this).replaceWith("<%= escape_javascript join_in_project_link(@project, User.current) %>")});
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$("<%= selector %>").each(function(){$(this).replaceWith("<%= escape_javascript applied_link(@project, User.current) %>")});
|
|
|
|
}
|
|
|
|
|
2014-05-22 15:33:38 +08:00
|
|
|
if (window.Messenger) {
|
|
|
|
Messenger.options = {
|
|
|
|
extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
|
|
|
|
theme: 'flat'
|
|
|
|
}
|
|
|
|
Messenger().post({
|
|
|
|
id: "label_apply_project_waiting",
|
|
|
|
message: "<%= l(:label_apply_project_waiting) %>",
|
2015-07-30 16:02:41 +08:00
|
|
|
showCloseButton: true
|
2014-05-22 15:33:38 +08:00
|
|
|
});
|
|
|
|
};
|
2015-07-30 16:02:41 +08:00
|
|
|
|
|
|
|
$("#applied_project_link_<%= @project.id%>").replaceWith("<%= escape_javascript(link_to "加入项目",appliedproject_path(:user_id => User.current.id,:project_id => @project.id,:project_join => true),:class => "blue_n_btn fr mt20", :remote => "true",:method => "post",:id => "applied_project_link_#{@project.id}") %>");
|