|
|
|
@ -25,6 +25,10 @@
|
|
|
|
|
}
|
|
|
|
|
//问卷头
|
|
|
|
|
function pollsCancel(){$("#polls_head_edit").hide();$("#polls_head_show").show();}
|
|
|
|
|
function pollsSubmit(doc){
|
|
|
|
|
var title = $.trim($("#polls_title").val());
|
|
|
|
|
if(title.length == 0){alert("问卷标题不能为空");}else{doc.parent().parent().parent().submit();}
|
|
|
|
|
}
|
|
|
|
|
function pollsEdit(){$("#polls_head_edit").show();$("#polls_head_show").hide();}
|
|
|
|
|
//
|
|
|
|
|
function pollQuestionCancel(question_id){
|
|
|
|
@ -57,15 +61,22 @@
|
|
|
|
|
|
|
|
|
|
function poll_submit()
|
|
|
|
|
{
|
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
|
|
|
|
|
showModal('ajax-modal', '310px');
|
|
|
|
|
$('#ajax-modal').css('height','115px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='#' 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");
|
|
|
|
|
var title = $.trim($("#polls_name_h").html());
|
|
|
|
|
if(title.length == 0)
|
|
|
|
|
{
|
|
|
|
|
alert("问卷标题不能为空");
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'poll_submit', locals: { :poll => @poll,:is_remote => false}) %>');
|
|
|
|
|
showModal('ajax-modal', '310px');
|
|
|
|
|
$('#ajax-modal').css('height','115px');
|
|
|
|
|
$('#ajax-modal').siblings().remove();
|
|
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
|
|
|
|
"<a href='#' 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");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|