|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
<a class="btn" href="${ctx}/admin/exam/paper">返回</a>
|
|
<a class="btn" href="${ctx}/admin/exam/paper">返回</a>
|
|
|
|
|
|
- <a href="${ctx}/admin/exam/selectiveGroup/clear?subjectCode=${subject.code}" class="delete-button">清空选做题分组设置</a>
|
|
|
|
|
|
+ <a href="${ctx}/admin/exam/selectiveGroup/clear?subjectCode=${subject.code}" class="delete-button btn">清空选做题分组设置</a>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<label>合分数量:</label><input name="selectiveCount" min="1" class="digits" type="number" id="selectiveCount" value="${selectiveCount }"/>
|
|
<label>合分数量:</label><input name="selectiveCount" min="1" class="digits" type="number" id="selectiveCount" value="${selectiveCount }"/>
|
|
@@ -62,14 +62,20 @@ $('#btnSubmit').click(function () {
|
|
alert('请选择题目');
|
|
alert('请选择题目');
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- if(!$("#selectiveCount").val()){
|
|
|
|
|
|
+ var count = $("#selectiveCount").val();
|
|
|
|
+ if(count==null ||count==""){
|
|
alert("合分数量不能为空");
|
|
alert("合分数量不能为空");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if($("#selectiveCount").val()>=check_list.length || $("#selectiveCount").val()<1){
|
|
|
|
|
|
+ if(!(/(^[1-9]\d*$)/.test(count))){
|
|
|
|
+ alert("合分数量必须是正整数");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ if(count>=check_list.length || count<1){
|
|
alert("合分数量必须小于选择的题目数量且大于等于1");
|
|
alert("合分数量必须小于选择的题目数量且大于等于1");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
$('#inputForm').submit();
|
|
$('#inputForm').submit();
|
|
});
|
|
});
|
|
$('.delete-button').click(function () {
|
|
$('.delete-button').click(function () {
|