开启匿评、关闭匿评js

This commit is contained in:
sw 2015-04-09 11:31:41 +08:00
parent a737342a66
commit 503d1fc2ee
2 changed files with 3 additions and 4 deletions

View File

@ -1,9 +1,8 @@
<% if @statue == 1%>
alert('启动成功');
$("#<%= @bid.id %>_start_anonymous_comment").remove();
$("#<%= @bid.id %>_anonymous_comment").append('<%= link_to "关闭匿评", alert_anonymous_comment_bid_path(@bid), remote: true, id:"#{@bid.id}_stop_anonymous_comment" %>');
$("#<%= @bid.id %>_start_anonymous_comment").replaceWith('<%= escape_javascript(link_to "关闭匿评", alert_anonymous_comment_bid_path(@bid), remote: true, id:"#{@bid.id}_stop_anonymous_comment",:class => "fr mr10 work_edit")%>');
<% elsif @statue == 2 %>
alert('启动失败\n作业总数大于等于2份时才能启动匿评');
<% elsif @statue == 3%>
alert("已开启匿评,请务重复开启");
<% end %>
<% end %>

View File

@ -1,2 +1,2 @@
alert('关闭成功');
$("#<%= @bid.id %>_anonymous_comment").html('<a href="javascript:" style="background:#8e8e8e;">匿评结束</a>');
$("#<%= @bid.id %>_stop_anonymous_comment").replaceWith('<a class="fr pr_join_span mr10" title="匿评结束">匿评结束</a>');