<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/taglib/c.tld" prefix="c"%>
<%@ include file="../../common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="../../common/top.jsp"%>
<link rel="stylesheet" type="text/css" href="${ctx}/static/admin/js/ztree/css/zTreeStyle/zTreeStyle.css" >
<script type="text/javascript" src="${ctx}/static/admin/js/jquery.nano.js"></script>
<script type="text/javascript" src="${ctx}/static/admin/js/ztree/js/jquery.ztree.core-3.5.min.js"></script>
<script type="text/javascript" src="${ctx}/static/admin/js/ztree/js/jquery.ztree.exedit-3.5.min.js"></script>
</head>
<body class="easyui-layout">
	<%@ include file="../../common/header.jsp"%>
	<%@ include file="../../leftMenu/exam-admin.jsp"%>
	<div data-options="region:'center',title:'首页 -【考试管理】- 主观题设置'">
		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'north',border:false" class="domain">
				<%@ include file="../../common/message.jsp"%>
				<div id="block-search-div">
					<form class="form-inline" action="${ctx}/admin/exam-param/subjective" method="post" id="search-form"> 
						<%@ include file="../../common/subjectClassTypeSelect.jsp"%>
						<button type="submit" class="btn">
							<i class="icon-search"></i> 查询
						</button>
					</form>
				</div>
			</div>
			
			<div class="border" data-options="region:'center'">
				<div class="Marking-cont row-fluid" id="main-div">
					<c:if test="${subjectId!=null && classTypeValue!=null}">
						<div class="span4 Marking-cont-middle">
							<div class="Marking-cont-middle-title">大题列表</div>
							<div class="Marking-cont-middle-tab">
								<c:if test="${flag==false}">
								<div class="btn-group btn-mr">
									<a class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#"> 
										添加 <span class="caret"></span> 
									</a>
									<ul class="dropdown-menu">
										<li id="add-block-li">
											<a id="add-block-button" href="#">主观大题</a>
										</li>
										<li id="add-group-li">
											<a id="add-group-button" href="#">选做题组</a>
										</li>
									</ul>
								</div>
								<a id="save-all-button" href="javascript:void(0)" class="btn btn-success">保存</a> 
								<a id="clear-all-button" href="javascript:void(0)" class="btn btn-danger">清空</a>
								</c:if>
								
								<div class="easyui-panel">
									<ul id="block-tree" class="ztree"></ul>
								</div>
								<form id="submit-form" action="${ctx}/admin/exam-param/subjective/update" method="post">
									<input type="hidden" name="subjectId" value="${subjectId}" /> 
									<input type="hidden" name="classTypeValue" value="${classTypeValue}" />
									<input type="hidden" name="blockValue" value="" /> 
									<input type="hidden" name="groupValue" value="" />
								</form>
							</div>
						</div>
						
						<!-- 主观题评卷块属性编辑区域 -->
						<div class="span8 Marking-cont-right hide" id="block-info-div">
							<div class="Marking-cont-right-title" id="block-info-div-title">主观大题--属性编辑</div>
							<div class="Marking-cont-right-content">
								<form id="block-form" class="form-horizontal mr-t3" action="" method="post">
									<c:if test="${subject!=null && subject.type.value==1}">
									<div class="control-group">
										<label class="control-label" for="">小科目</label>
										<div class="controls">
											<select name="baseSubjectId" <c:if test="${flag==true}">disabled</c:if>>
											<c:forEach var="baseSubject" items="${baseSubjectList}">
												<option value="${baseSubject.id}">${baseSubject.name}</option>
											</c:forEach>
											</select>
										</div>
									</div>
									</c:if>
									<div class="control-group">
										<label class="control-label" for="">标题</label>
										<div class="controls">
											<input type="text" name="title" class="info-input" <c:if test="${flag==true}">disabled</c:if>/>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">满分</label>
										<div class="controls">
											<input type="text" name="totalScore" data-gt="0" class="info-input required-input number-input"  <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">误差值</label>
										<div class="controls">
											<input type="text" name="mistakeValue" data-min="0" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">双评比例</label>
										<div class="controls">
											<input type="text" name="reMarkPercent" data-min="0" data-max="1" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">标准卷频度</label>
										<div class="controls">
											<input type="text" name="standardFrequency" data-min="0" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">自评频度</label>
										<div class="controls">
											<input type="text" name="markSelfFrequency" data-min="0" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">是否允许查看整图</label>
										<div class="controls">
											<select name="canViewTotal" <c:if test="${flag==true}">disabled</c:if>>
												<option value="1">是</option>
												<option value="0">否</option>
											</select>
										</div>
									</div>
									<div class="board-text">
										<a class="board-text-color" href="javascript:void(0)" id="mark-link">设置给分板</a>
										<a class="board-text-color" href="javascript:void(0)" id="picture-link">题卡图片划块</a>
									</div>
								</form>
							</div>
						</div>
						<!-- 选做题组编辑区域 -->
						<div class="span8 Marking-cont-right hide" id="group-info-div">
							<div class="Marking-cont-right-title" id="group-info-div-title">选做题组--属性编辑</div>
							<div class="Marking-cont-right-content">
								<form id="group-form" class="form-horizontal mr-t3" action="" method="post">
									<div class="control-group">
										<label class="control-label" for="">标题</label>
										<div class="controls">
											<input type="text" name="title" class="info-input" <c:if test="${flag==true}">disable</c:if>/>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">大题个数</label>
										<div class="controls">
											<input type="text" name="blockCount" data-min="1" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
									<div class="control-group">
										<label class="control-label" for="">必选个数</label>
										<div class="controls">
											<input type="text" name="selectCount" data-min="1" class="info-input required-input number-input" <c:if test="${flag==true}">disabled</c:if>/>
											<i class="text-error">*</i>
											<span class="help-inline"></span>
										</div>
									</div>
								</form>
							</div>
						</div>
					</c:if>
				</div>
				
				<%@ include file="edit-step.jsp"%>
				<%@ include file="edit-picture.jsp"%>
			</div>
		</div>
	</div>
</body>
<%@ include file="script.jsp"%>
</html>