From 503d1fc2eec6f55e74c3f0cdb76d69fb625eda6b Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Thu, 9 Apr 2015 11:31:41 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AF=E5=8C=BF=E8=AF=84=E3=80=81?=
=?UTF-8?q?=E5=85=B3=E9=97=AD=E5=8C=BF=E8=AF=84js?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/bids/start_anonymous_comment.js.erb | 5 ++---
app/views/bids/stop_anonymous_comment.js.erb | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/app/views/bids/start_anonymous_comment.js.erb b/app/views/bids/start_anonymous_comment.js.erb
index 5b13b2f77..431393a0e 100644
--- a/app/views/bids/start_anonymous_comment.js.erb
+++ b/app/views/bids/start_anonymous_comment.js.erb
@@ -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 %>
\ No newline at end of file
diff --git a/app/views/bids/stop_anonymous_comment.js.erb b/app/views/bids/stop_anonymous_comment.js.erb
index cf2096d3b..393bf59f3 100644
--- a/app/views/bids/stop_anonymous_comment.js.erb
+++ b/app/views/bids/stop_anonymous_comment.js.erb
@@ -1,2 +1,2 @@
alert('关闭成功');
-$("#<%= @bid.id %>_anonymous_comment").html('匿评结束');
+$("#<%= @bid.id %>_stop_anonymous_comment").replaceWith('匿评结束');