100 lines
5.3 KiB
Plaintext
100 lines
5.3 KiB
Plaintext
<%= stylesheet_link_tag 'polls', :media => 'all' %>
|
|
<script type="text/javascript">
|
|
function republish_poll(poll_id, index)
|
|
{
|
|
$('#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?index=" + index +"' 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;'>" +
|
|
"<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","").css("border","3px solid #269ac9");
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
}
|
|
|
|
function clickCanel(){hideModal("#popbox02");}
|
|
|
|
function poll_submit(poll_id,poll_name,index)
|
|
{
|
|
if(poll_name == 0)
|
|
{
|
|
alert("问卷标题不能为空");
|
|
}
|
|
else
|
|
{
|
|
$('#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 +"/publish_poll?index=" + index + "' 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;'>" +
|
|
"<a href='javascript:' 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","").css("border","3px solid #269ac9");
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
}
|
|
}
|
|
|
|
function close_poll(poll_id, index)
|
|
{
|
|
$('#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?index=" + index +"' 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;'>" +
|
|
"<a href='javascript:' 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","").css("border","3px solid #269ac9");
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
|
}
|
|
|
|
function delete_exercise(id){
|
|
var htmlvalue = '<div id="muban_popup_box" style="width:300px;"><div class="muban_popup_top"><h3 class="fl">提示</h3><a href="javascript:void(0);" class="muban_icons_close fr"></a></div>'+
|
|
'<div class="clear mt15"><p class="text_c f14">您是否确定删除</p><div class="cl"></div><a href="/poll/'+ id +'" class="fr sy_btn_blue mr90 mt10" data-method="delete" data-remote="true">确定</a>'+
|
|
'<a href="javascript:void(0);" class="fr sy_btn_grey mt10 mr10" onclick="hideModal();">取消</a></div></div>';
|
|
pop_box_new(htmlvalue, 300, 140);
|
|
}
|
|
|
|
function closeModal()
|
|
{
|
|
hideModal($("#popbox_upload"));
|
|
}
|
|
</script>
|
|
<div class="courseRSide fl">
|
|
<div id="polls">
|
|
<%= render :partial => 'poll_list'%>
|
|
</div><!--问卷内容end-->
|
|
</div> |