socialforge/app/views/watchers/watch.js.erb

8 lines
378 B
Plaintext

<% if @project %>
$('#fans_num').html('<%= @project.watcher_users.count %>');
// $('#project-'+'<%=@project.id%>'+'-watcher').html('取消关注');
$('#project-'+'<%=@project.id%>'+'-watcher').replaceWith("<%= escape_javascript watcher_link_for_project(@project, User.current)%>");
<% else %>
$('#fans_num').html('<%= j(@user.watcher_users.count) %>');
<% end %>