点击空白处可以让弹出框隐藏
This commit is contained in:
parent
90a416fb2f
commit
d13ab7aa5d
|
@ -16,7 +16,12 @@ $(function(){
|
|||
});
|
||||
})
|
||||
|
||||
|
||||
function dismiss(quest_type,quest_id){
|
||||
popWindow = $("#div_"+quest_type+"_"+quest_id);
|
||||
if(popWindow){
|
||||
popWindow.css('display', 'none');
|
||||
}
|
||||
}
|
||||
function chooseQuestionType(quest_type,quest_id){
|
||||
//quest_type 分为 mc mcq single multi
|
||||
//quest_id 是quetion的id 下同
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
</div>
|
||||
<div id="div_mc_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
|
||||
<ul>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mc',<%=poll_question.id%>);insert_MC('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mc',<%=poll_question.id%>);insert_MCQ('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mc',<%=poll_question.id%>);insert_SINGLE('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mc',<%=poll_question.id%>);insert_MULIT('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MC('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MCQ('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_SINGLE('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mc',<%=poll_question.id%>);insert_MULIT('mc',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -36,9 +36,9 @@
|
|||
</div>
|
||||
<div id="div_mcq_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
|
||||
<ul>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mcq',<%=poll_question.id%>);insert_MC('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mcq',<%=poll_question.id%>);insert_MCQ('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mcq',<%=poll_question.id%>);insert_SINGLE('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mcq',<%=poll_question.id%>);insert_MULIT('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MC('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MCQ('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_SINGLE('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mcq',<%=poll_question.id%>);insert_MULIT('mcq',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -25,9 +25,9 @@
|
|||
</div>
|
||||
<div id="div_mulit_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
|
||||
<ul>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mulit',<%=poll_question.id%>);insert_MC('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mulit',<%=poll_question.id%>);insert_MCQ('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mulit',<%=poll_question.id%>);insert_SINGLE('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('mulit',<%=poll_question.id%>);insert_MULIT('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MC('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MCQ('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_SINGLE('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('mulit',<%=poll_question.id%>);insert_MULIT('mulit',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
</ul>
|
||||
</div>
|
|
@ -23,9 +23,9 @@
|
|||
</div>
|
||||
<div id="div_single_<%=poll_question.id%>" style="width: 50px;border: 1px solid #cbcbcb; display:none;position: absolute;padding: 5px;background: white">
|
||||
<ul>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('single',<%=poll_question.id%>);insert_MC('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('single',<%=poll_question.id%>);insert_MCQ('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('single',<%=poll_question.id%>);insert_SINGLE('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" chooseQuestionType('single',<%=poll_question.id%>);insert_MULIT('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MC('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MCQ('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多选</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_SINGLE('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">单行主观</a></li>
|
||||
<li><a href="javascript:void(0);" onclick=" dismiss('single',<%=poll_question.id%>);insert_MULIT('single',<%=poll_question.question_number%>,<%=poll_question.id%>);">多行主观</a></li>
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in New Issue