修复多域修改时IP配置如果不为空默认不显示的bug
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<h3 class="form-section">
|
||||
<c:choose>
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
@@ -13,7 +10,7 @@
|
||||
</c:when>
|
||||
<c:otherwise>IP<spring:message code="block_config"/></c:otherwise>
|
||||
</c:choose>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect"/> 可选</span><!-- <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span> --></small></h3>
|
||||
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect" <c:if test="${_cfg.ipCfg[mainTable]!= null and _cfg.ipCfg[mainTable].cfgId != null}">checked</c:if> <c:if test="${_cfg.ipCfg[otherTable.tableName]!= null and _cfg.ipCfg[otherTable.tableName].cfgId != null}">checked</c:if>/> 可选</span><!-- <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span> --></small></h3>
|
||||
<div class="row ipCfg collapse">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
@@ -264,15 +261,15 @@
|
||||
<c:when test="${mainTableType eq '1' and otherTable==null}">
|
||||
<select name="ipCfg[${mainTable}].direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].direction==0}">selected</c:if>>0</option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[mainTable].direction==1}">selected</c:if>>1</option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[mainTable].direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
|
||||
<select name="ipCfg[${otherTable.tableName}].direction" class="selectpicker show-tick form-control required" title=<spring:message code="select"/>>
|
||||
<option value="" ><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==0}">selected</c:if>>0</option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==1}">selected</c:if>>1</option>
|
||||
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==0}">selected</c:if>><spring:message code="twoway"/></option>
|
||||
<option value="1" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==1}">selected</c:if>><spring:message code="oneway"/></option>
|
||||
</select>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("[name^='ipCfg']").attr("disabled",true);
|
||||
if($("#ipSelect").is(":checked")){
|
||||
$("[name^='ipCfg']").removeProp("disabled");
|
||||
//解决select插件disbale后无法恢复
|
||||
$(".bootstrap-select").removeClass("disabled");
|
||||
$(".bootstrap-select button").removeClass("disabled");
|
||||
$(".collapse").addClass("in");
|
||||
}
|
||||
//$("[name^='stringCfg']").attr("disabled",true);
|
||||
//$("[name^='complexCfg']").attr("disabled",true);
|
||||
//$("[name^='numCfg']").attr("disabled",true);
|
||||
|
||||
Reference in New Issue
Block a user