2015-01-13 15:59:02 +08:00
|
|
|
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
2015-01-20 16:50:16 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
function republish_poll(poll_id)
|
|
|
|
{
|
|
|
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
|
|
|
"<div class='upload_con'>" +
|
|
|
|
"<div class='upload_box'>" +
|
|
|
|
"<p class='polls_box_p'>取消发布后问卷统计结果将会被清空<br />是否确定取消发布该问卷?</p>" +
|
|
|
|
"<div class='polls_btn_box'>" +
|
|
|
|
"<a href='/poll/"+ poll_id +"/republish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
|
|
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
|
|
|
"</div>" +
|
|
|
|
"<div class='cl'></div>" +
|
|
|
|
"</div>" +
|
|
|
|
"</div>" +
|
|
|
|
"</div>");
|
|
|
|
showModal('ajax-modal', '310px');
|
2015-01-26 14:09:56 +08:00
|
|
|
$('#ajax-modal').css('height','120px');
|
2015-01-20 16:50:16 +08:00
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
"<a onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
|
|
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
|
|
}
|
|
|
|
|
|
|
|
function clickCanel(){hideModal("#popbox02");}
|
2015-01-21 11:14:01 +08:00
|
|
|
|
2015-01-23 14:43:40 +08:00
|
|
|
function poll_submit(poll_id,poll_name)
|
2015-01-21 11:14:01 +08:00
|
|
|
{
|
2015-01-23 14:43:40 +08:00
|
|
|
if(poll_name == 0)
|
|
|
|
{
|
|
|
|
alert("问卷标题不能为空");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
|
|
|
"<div class='upload_con'>" +
|
|
|
|
"<div class='upload_box'>" +
|
2015-01-21 11:14:01 +08:00
|
|
|
"<p class='polls_box_p'>问卷发布后将不能对问卷进行修改,<br />是否确定发布该问卷?</p>" +
|
|
|
|
"<div class='polls_btn_box'>" +
|
2015-01-23 14:43:40 +08:00
|
|
|
"<a href='/poll/"+ poll_id +"/publish_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
|
|
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
2015-01-21 11:14:01 +08:00
|
|
|
"</div>" +
|
|
|
|
"<div class='cl'></div>" +
|
2015-01-23 14:43:40 +08:00
|
|
|
"</div>" +
|
|
|
|
"</div>" +
|
|
|
|
"</div>");
|
|
|
|
showModal('ajax-modal', '310px');
|
2015-01-26 14:09:56 +08:00
|
|
|
$('#ajax-modal').css('height','120px');
|
2015-01-23 14:43:40 +08:00
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
2015-03-25 10:21:33 +08:00
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
2015-01-23 14:43:40 +08:00
|
|
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
|
|
}
|
2015-01-21 11:14:01 +08:00
|
|
|
}
|
2015-01-27 09:45:15 +08:00
|
|
|
|
|
|
|
function close_poll(poll_id)
|
|
|
|
{
|
|
|
|
$('#ajax-modal').html("<div id='popbox02'>" +
|
|
|
|
"<div class='upload_con'>" +
|
|
|
|
"<div class='upload_box'>" +
|
|
|
|
"<p class='polls_box_p'>问卷关闭后学生将不能继续提交问卷,<br />是否确定关闭该问卷?</p>" +
|
|
|
|
"<div class='polls_btn_box'>" +
|
|
|
|
"<a href='/poll/"+ poll_id +"/close_poll' class='upload_btn' onclick='clickCanel();' data-remote='true'>确 定</a>" +
|
|
|
|
"<a class='upload_btn upload_btn_grey' onclick='clickCanel();'>取 消</a>" +
|
|
|
|
"</div>" +
|
|
|
|
"<div class='cl'></div>" +
|
|
|
|
"</div>" +
|
|
|
|
"</div>" +
|
|
|
|
"</div>");
|
|
|
|
showModal('ajax-modal', '310px');
|
|
|
|
$('#ajax-modal').css('height','120px');
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
2015-03-25 10:21:33 +08:00
|
|
|
"<a href='javascript:' onclick='clickCanel();'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
2015-01-27 09:45:15 +08:00
|
|
|
$('#ajax-modal').parent().removeClass("alert_praise");
|
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
|
|
}
|
2015-08-10 09:12:26 +08:00
|
|
|
|
|
|
|
function closeModal()
|
|
|
|
{
|
|
|
|
hideModal($("#popbox_upload"));
|
|
|
|
}
|
2015-01-20 16:50:16 +08:00
|
|
|
</script>
|
2015-03-24 15:46:23 +08:00
|
|
|
<div class="polls_content02" id="polls">
|
2015-01-29 17:33:10 +08:00
|
|
|
<%= render :partial => 'poll_list'%>
|
2015-01-13 15:59:02 +08:00
|
|
|
</div><!--问卷内容end-->
|