From 95b757ba0901cda67104c94ad465cdc4de3c691d Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 6 Feb 2015 09:32:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E5=8D=B7=E5=8F=91?=
=?UTF-8?q?=E5=B8=83=E6=88=90=E5=8A=9F=E5=92=8C=E5=8F=96=E6=B6=88=E5=8F=91?=
=?UTF-8?q?=E5=B8=83=E6=88=90=E5=8A=9F=E5=90=8E=E5=BC=B9=E6=A1=86=E6=8F=90?=
=?UTF-8?q?=E7=A4=BA=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/poll/_alert.html.erb | 27 +++++++++++++++++++++++++++
app/views/poll/publish_poll.js.erb | 10 +++++++++-
app/views/poll/republish_poll.js.erb | 10 +++++++++-
config/locales/zh.yml | 1 +
public/stylesheets/polls.css | 6 ++++++
5 files changed, 52 insertions(+), 2 deletions(-)
create mode 100644 app/views/poll/_alert.html.erb
diff --git a/app/views/poll/_alert.html.erb b/app/views/poll/_alert.html.erb
new file mode 100644
index 000000000..b3de53d1f
--- /dev/null
+++ b/app/views/poll/_alert.html.erb
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/poll/publish_poll.js.erb b/app/views/poll/publish_poll.js.erb
index ad052f8f2..6074df6c6 100644
--- a/app/views/poll/publish_poll.js.erb
+++ b/app/views/poll/publish_poll.js.erb
@@ -1,2 +1,10 @@
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
-alert("发布成功");
\ No newline at end of file
+$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_memo_create_succ)}) %>");
+showModal('ajax-modal', '180px');
+$('#ajax-modal').css('height','111px');
+$('#ajax-modal').siblings().remove();
+$('#ajax-modal').before("" +
+ "");
+$('#ajax-modal').parent().removeClass("alert_praise");
+$('#ajax-modal').parent().css("top","").css("left","");
+$('#ajax-modal').parent().addClass("poll_alert_form");
\ No newline at end of file
diff --git a/app/views/poll/republish_poll.js.erb b/app/views/poll/republish_poll.js.erb
index a2d8e28fa..94369678d 100644
--- a/app/views/poll/republish_poll.js.erb
+++ b/app/views/poll/republish_poll.js.erb
@@ -1,2 +1,10 @@
$("#polls_<%= @poll.id %>").html("<%= escape_javascript(render :partial => 'poll',:locals => {:poll => @poll}) %>");
-alert("取消成功");
\ No newline at end of file
+$('#ajax-modal').html("<%= escape_javascript(render :partial => 'alert', locals: { :message => l(:label_poll_republish_success)}) %>");
+showModal('ajax-modal', '180px');
+$('#ajax-modal').css('height','80px');
+$('#ajax-modal').siblings().remove();
+$('#ajax-modal').before("" +
+ "");
+$('#ajax-modal').parent().removeClass("alert_praise");
+$('#ajax-modal').parent().css("top","").css("left","");
+$('#ajax-modal').parent().addClass("poll_alert_form");
\ No newline at end of file
diff --git a/config/locales/zh.yml b/config/locales/zh.yml
index d5c56fe13..31ec29e18 100644
--- a/config/locales/zh.yml
+++ b/config/locales/zh.yml
@@ -2486,6 +2486,7 @@ zh:
label_poll_result: 问卷调查_问卷统计
label_answer: 答案:
label_poll_answer_valid_result: 以上为有效问答题答案!
+ label_poll_republish_success: 取消成功
label_answer_total: 总计:
label_join_project: 加入项目
label_technical_support: 技术支持:
diff --git a/public/stylesheets/polls.css b/public/stylesheets/polls.css
index f0d670a1d..a0d64645a 100644
--- a/public/stylesheets/polls.css
+++ b/public/stylesheets/polls.css
@@ -145,3 +145,9 @@ a:hover.btn_pu{ background:#3cb761;}
.polls_title_w { width:330px; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
.polls_de_grey{ color:#b1b1b1;padding-left: 5px;}
.ml5{ margin-left:5px;}
+
+/******确定弹框***********/
+.poll_alert_form{width:140px;height:180px;position:fixed;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px; background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
+.polls_alert_btn_box{width: 100%;margin: 0 auto;padding-left: 45px;}
+.polls_alert_upload_box{ width:120px; margin:15px auto;}
+.polls_alert_box_p{ font-size:14px; padding-left: 45px;padding-top: 10px;}