Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
duandongmei
2018-08-08 19:00:56 +08:00
14 changed files with 45 additions and 29 deletions

View File

@@ -280,9 +280,6 @@ public class BaseController {
binder.registerCustomEditor(String.class, new PropertyEditorSupport() {
@Override
public void setAsText(String text) {
Pattern p = Pattern.compile("\t|\r|\n");
Matcher m = p.matcher(text);
text = m.replaceAll("");
setValue(text == null ? null : StringEscapeUtils.escapeHtml4(text.trim()));
}
@Override

View File

@@ -104,7 +104,7 @@ public class DomainService extends CrudService<DomainDao,HttpUrlCfg> {
}
this.saveIpBatch(cfg.getAreaCfg());
}
if(cfg instanceof HttpUrlCfg){
if(cfg instanceof HttpUrlCfg && cfg.getCfgId() == null){
domainDao.insert((HttpUrlCfg)cfg);
}else{
stringCfgDao.update(cfg);

View File

@@ -28,7 +28,7 @@
<%@ attribute name="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点ps关联父子p关联父s关联子,都不关联为空"%>
<div class="input-group">
<input id="${id}Id" name="${name}" class="${cssClass} singleClass" type="hidden" value="${value}" />
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="${labelValue}" data-msg-required="${dataMsgRequired}" placeholder="${value}"
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="<spring:message code='${labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${value}"
class="${cssClass}" style="${cssStyle} background-color:transparent"/>
<div class="input-group-btn">

View File

@@ -108,7 +108,7 @@
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="desc"/>:</label>
<div class="col-md-4">
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control" readonly="readonly"/>
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control" readonly="true"/>
</div>
</div>
</form:form>

View File

@@ -112,7 +112,7 @@
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="desc"/>:</label>
<div class="col-md-4">
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control" readonly="readonly"/>
<form:textarea path="itemDesc" htmlEscape="false" maxlength="2000" class="form-control" readonly="true"/>
</div>
</div>
</form:form>

View File

@@ -52,7 +52,9 @@ $(function(){
}
if(flag){
var maxTtl=$("[name=maxTtl]").val();
maxTtl = parseInt(maxTtl);
var minTtl=$("[name=minTtl]").val();
minTtl = parseInt(minTtl);
if(minTtl>maxTtl){
message="<spring:message code='max_shouldnot_less_than_min'/>";
$("div[for=maxTtl]").html("<label for=\"maxTtl\" class=\"error\" id=\"maxTtl-error\">"+message+"</label>");

View File

@@ -45,7 +45,8 @@
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><spring:message code="menu"/><shiro:hasPermission name="sys:menu:edit">${not empty menu.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit"><spring:message code="show"/></shiro:lacksPermission></div>
<i class="fa fa-gift"></i><shiro:hasPermission name="sys:menu:edit"><c:if test="${not empty menu.id}"><spring:message code="edit"/></c:if><c:if test="${empty menu.id}"><spring:message code="add"/></c:if></shiro:hasPermission><shiro:lacksPermission name="sys:menu:edit"><spring:message code="show"/></shiro:lacksPermission></div>
</div>
<div class="portlet-body form">
@@ -60,8 +61,8 @@
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="parent_menu"></spring:message>:</label>
<div class="col-md-4">
<sys:treeselect id="menu" name="parent.id" value="${menu.parent.id}" labelName="parent.name" labelValue="${menu.parent.name}"
title="menu" url="/sys/menu/treeData" extId="${menu.id}" cssClass="required form-control"/>
<sys:treeselect id="menu" name="parent.id" value="${menu.parent.id}" labelName="parent.name" labelValue="${menu.parent.code}"
title="${menu.parent.code}" url="/sys/menu/treeData" extId="${menu.id}" cssClass="required form-control"/>
</div>
</div>
<div class="form-group">

View File

@@ -40,7 +40,7 @@
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<tr><th><spring:message code="role_name"/></th><th><spring:message code="data_range"/></th><th><spring:message code="describe"/></th><shiro:hasPermission name="sys:role:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr>
<tr><th><spring:message code="role_name"/></th><th><spring:message code="data_range"/></th><th><spring:message code="desc"/></th><shiro:hasPermission name="sys:role:edit"><th><spring:message code="operation"/></th></shiro:hasPermission></tr>
<c:forEach items="${list}" var="role">
<tr>
<td><a href="form?id=${role.id}">${role.name}</a></td>
@@ -49,7 +49,7 @@
<shiro:hasPermission name="sys:role:edit"><td>
<%--<a href="${ctx}/sys/role/assign?id=${role.id}"><spring:message code="allot"/></a> --%>
<a href="${ctx}/sys/role/form?id=${role.id}"><spring:message code="edit"/></a>
<a href="${ctx}/sys/role/delete?id=${role.id}" onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete"/></a>
<a href="${ctx}/sys/role/delete?id=${role.id}" onclick="return confirmx('<spring:message code="sure_delete"/>', this.href)"><spring:message code="delete"/></a>
</td></shiro:hasPermission>
</tr>
</c:forEach>

View File

@@ -83,32 +83,32 @@
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
callback="page();" />
<div class="col-md-12 filter-action-select-panle"
style="background-color: transparent">
<div class="col-md-12">
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="login_name"></spring:message></label>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-btn">
<span class="form-control"><spring:message code="login_name"/></span>
</div>
<form:input path="loginId" htmlEscape="false" maxlength="50"
class="form-control" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="name"></spring:message></label>
<div class="col-md-3">
<div class="input-group">
<div class="input-group-btn">
<span class="form-control"><spring:message code="name"/></span>
</div>
<form:input path="name" htmlEscape="false" maxlength="50"
class="form-control" />
</div>
</div>
<div class="col-md-1">
<div class="form-group">
<label>&nbsp;</label>
<button type="submit" class="btn blue form-control" onclick="return page();">
<div class="pull-left">
<span>&nbsp;</span>
<button type="submit" class="btn blue" onclick="return page();">
<i class="fa fa-search"></i>
<spring:message code="search" />
</button>
</div>
</div>
</div>
</div>

View File

@@ -173,6 +173,14 @@ jQuery.validator.addMethod("compareDate", function(value, element, param) {
return true;
}, "结束时间不能早于开始时间");
jQuery.validator.addMethod("invisibleChar", function(value, element) {
var reg = new RegExp(/\t|\r|\n/);
if (value.match(reg)) {
return false;
}
return true;
}, "请输入可见字符");
//掩码校验超过两位不得以0开头
jQuery.validator.addMethod("notStartZero",function(value, element) {
if(value.length>1&&value.length<6){

View File

@@ -61,6 +61,7 @@
checkParent:"Configuration Type must match it's parent.",
specServiceCodeCheck:"Protocol No is repeat.",
compareDate:"The end time should not be earlier than the start time.",
hexCheck:"Please enter the HEX format chatactar"
hexCheck:"Please enter the HEX format character",
invisibleChar:"Please enter the visible character"
});
}(jQuery));

View File

@@ -59,6 +59,7 @@
checkParent:"Configuration Type must match it's parent.",
specServiceCodeCheck:"Protocol No is repeat.",
compareDate:"The end time should not be earlier than the start time.",
hexCheck:"Please enter the HEX format chatactar"
hexCheck:"Please enter the HEX format character",
invisibleChar:"Please enter the visible character"
});
}(jQuery));

View File

@@ -63,6 +63,7 @@
checkParent:"配置类型必须与上级配置一致!",
specServiceCodeCheck:"协议号重复",
compareDate:"结束时间不能早于开始时间",
hexCheck:"请输入十六进制字符"
hexCheck:"请输入十六进制字符",
invisibleChar:"请输入可见字符"
});
}(jQuery));

View File

@@ -407,6 +407,11 @@ $(function(){
form.submit();
}
});
$("#ipCfgFrom input, #cfgForm input, #cfgFrom input").change(function(){
var s = $(this).val();
var ns = s.replace(/\t|\r|\n/mg, "");
$(this).val(ns);
});
});
window.onload=function(){
//日志查询IP类型增加格式提示