1、错误异常界面国际化;2、服务请求异常国际化;3、文件样例界面样式修改。
This commit is contained in:
@@ -25,6 +25,18 @@ $(function(){
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpType($(this));
|
||||
});
|
||||
$("#uploadSrc,#srcFileInfo").on('click',function(){
|
||||
$("#srcFile").trigger("click");
|
||||
});
|
||||
$("#srcFile").on('change',function(){
|
||||
$("#srcFileInfo").val($("#srcFile").val());
|
||||
});
|
||||
$("#uploadSample,#sampleFileInfo").on('click',function(){
|
||||
$("#sampleFile").trigger("click");
|
||||
});
|
||||
$("#sampleFile").on('change',function(){
|
||||
$("#sampleFileInfo").val($("#sampleFile").val());
|
||||
});
|
||||
$("input[name='areaType']").on('change',function(){
|
||||
var val=$(this).val();
|
||||
if($(this).is(":visible")){
|
||||
@@ -128,10 +140,20 @@ $(function(){
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_url"/></label>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="src_file"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required" type="text" name="srcUrl" value="${_cfg.srcUrl }"> --%>
|
||||
<input id="srcFile" name="srcFile" type="file" style="width: 330px" />
|
||||
<input id="srcFile" name="srcFile" type="file" style="width: 330px;display:none" />
|
||||
<div class="input-group">
|
||||
<input id="srcFileInfo" name="srcFileInfo" readonly="readonly" data-msg-required=""
|
||||
placeholder="<spring:message code="select_file"/>" class="required form-control" style=" background-color:transparent"
|
||||
aria-required="true" type="text" value="${_cfg.srcUrl }">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<a id="uploadSrc" class="btn btn-default btn-search" href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
<%-- <span id="srcFileInfo" style="margin-top:20px;margin-left:10px;">${_cfg.srcUrl }</span> --%>
|
||||
</div>
|
||||
<input id="srcUrl" name="srcUrl" type="hidden" value="${_cfg.srcUrl }"/>
|
||||
</div>
|
||||
<div for="srcFile"></div>
|
||||
@@ -139,10 +161,22 @@ $(function(){
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="sample_url"/></label>
|
||||
<label class="control-label col-md-3"><spring:message code="sample_file"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required" type="text" name="sampleUrl" value="${_cfg.sampleUrl}"> --%>
|
||||
<input id="sampleFile" name="sampleFile" type="file"style="width: 330px" />
|
||||
<input id="sampleFile" name="sampleFile" type="file"style="width: 330px;display:none" />
|
||||
<div class="input-group">
|
||||
<input id="sampleFileInfo" name="sampleFileInfo" readonly="readonly" data-msg-required=""
|
||||
placeholder="<spring:message code="select_file"/>" class="required form-control" style=" background-color:transparent"
|
||||
aria-required="true" type="text" value="${_cfg.sampleUrl }">
|
||||
|
||||
<div class="input-group-btn">
|
||||
<a id="uploadSample" class="btn btn-default btn-search" href="javascript:" style=""><i class="fa fa-search"></i></a>
|
||||
</div>
|
||||
<%-- <span id="srcFileInfo" style="margin-top:20px;margin-left:10px;">${_cfg.srcUrl }</span> --%>
|
||||
</div>
|
||||
<%-- <button id="uploadSample" type="button" class="btn btn-default btn-search"><spring:message code="select_file"/></button>
|
||||
<span id="sampleFileInfo">${_cfg.sampleUrl }</span> --%>
|
||||
<input id="sampleUrl" name="sampleUrl" type="hidden" value="${_cfg.sampleUrl }" />
|
||||
</div>
|
||||
<div for="sampleFile"></div>
|
||||
|
||||
@@ -267,8 +267,8 @@
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<%-- <th><spring:message code="seq"/></th> --%>
|
||||
<th><spring:message code="src_url"/></th>
|
||||
<th><spring:message code="sample_url"/></th>
|
||||
<th><spring:message code="src_file"/></th>
|
||||
<th><spring:message code="sample_file"/></th>
|
||||
<th><spring:message code="harm_level"/></th>
|
||||
<th><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="block_type"/></th>
|
||||
|
||||
@@ -5,7 +5,7 @@ response.setStatus(400);
|
||||
Throwable ex = Exceptions.getThrowable(request);
|
||||
|
||||
// 编译错误信息
|
||||
StringBuilder sb = new StringBuilder("(400)错误信息:\n");
|
||||
StringBuilder sb = new StringBuilder("(400)<spring:message code=\"exception_info\"/>:\n");
|
||||
if (ex != null) {
|
||||
if (ex instanceof BindException) {
|
||||
for (ObjectError e : ((BindException)ex).getGlobalErrors()){
|
||||
@@ -24,7 +24,7 @@ if (ex != null) {
|
||||
sb.append("☆" + ex.getMessage());
|
||||
}
|
||||
} else {
|
||||
sb.append("未知错误.\n\n");
|
||||
sb.append("<spring:message code=\"unkown_error\"/>.\n\n");
|
||||
}
|
||||
|
||||
// 如果是异步请求或是手机端,则直接返回信息
|
||||
@@ -47,16 +47,16 @@ else {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>400 - 请求出错</title>
|
||||
<title>400 - <spring:message code="request_error"/></title>
|
||||
<%@include file="/WEB-INF/include/header.jsp" %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header"><h1>参数有误,服务器无法解析.</h1></div>
|
||||
<div class="page-header"><h1><spring:message code="param_error"/><!-- 参数有误,服务器无法解析. --></h1></div>
|
||||
<div class="errorMessage">
|
||||
<%=StringUtils.toHtml(sb.toString())%> <br/>
|
||||
</div>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a>
|
||||
<br/> <br/>
|
||||
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
|
||||
</div>
|
||||
|
||||
@@ -24,18 +24,18 @@ else {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 - 操作权限不足</title>
|
||||
<title>403 - <spring:message code="no_permission"/></title>
|
||||
<%@include file="/WEB-INF/include/header.jsp" %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header"><h1>操作权限不足-403.</h1></div>
|
||||
<div class="page-header"><h1><spring:message code="no_permission"/>-403.</h1></div>
|
||||
<%
|
||||
if (ex!=null && StringUtils.startsWith(ex.getMessage(), "msg:")){
|
||||
out.print("<div>"+StringUtils.replace(ex.getMessage(), "msg:", "")+" <br/> <br/></div>");
|
||||
}
|
||||
%>
|
||||
<div><a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a></div>
|
||||
<div><a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a></div>
|
||||
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -3,7 +3,7 @@ response.setStatus(404);
|
||||
|
||||
// 如果是异步请求或是手机端,则直接返回信息
|
||||
if (Servlets.isAjaxRequest(request)) {
|
||||
out.print("页面不存在.");
|
||||
out.print("<spring:message code=\"notfound_page\"/>.");
|
||||
}
|
||||
|
||||
//输出异常信息页面
|
||||
@@ -15,13 +15,13 @@ else {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>404 - 页面不存在</title>
|
||||
<title>404 - <spring:message code="notfound_page"/></title>
|
||||
<%@include file="/WEB-INF/include/header.jsp" %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header"><h1>404-页面不存在.</h1></div>
|
||||
<div><a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a></div>
|
||||
<div class="page-header"><h1>404-<spring:message code="notfound_page"/>.</h1></div>
|
||||
<div><a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a></div>
|
||||
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
@@ -8,11 +8,11 @@ if (ex != null){
|
||||
}
|
||||
|
||||
// 编译错误信息
|
||||
StringBuilder sb = new StringBuilder("错误信息:\n");
|
||||
StringBuilder sb = new StringBuilder("<spring:message code=\"exception_info\"/>:\n");
|
||||
if (ex != null) {
|
||||
sb.append(Exceptions.getStackTraceAsString(ex));
|
||||
} else {
|
||||
sb.append("未知错误.\n\n");
|
||||
sb.append("<spring:message code=\"unkown_error\"/>.\n\n");
|
||||
}
|
||||
|
||||
// 如果是异步请求或是手机端,则直接返回信息
|
||||
@@ -32,22 +32,23 @@ else {
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>500 - 系统内部错误</title>
|
||||
<title>500 - <spring:message code="system_error"/></title>
|
||||
<%@include file="/WEB-INF/include/header.jsp" %>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
<div class="page-header"><h1>500-系统内部错误.</h1></div>
|
||||
<div class="page-header"><h1>500-<spring:message code="system_error"/>.</h1></div>
|
||||
<div class="errorMessage">
|
||||
错误信息:<%=ex==null?"未知错误.":StringUtils.toHtml(ex.getMessage())%> <br/> <br/>
|
||||
请点击“查看详细信息”按钮,将详细错误信息发送给系统管理员,谢谢!<br/> <br/>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a>
|
||||
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn">查看详细信息</a>
|
||||
<spring:message code="exception_info"/>:<%=ex==null?"<spring:message code=\"unkown_error\"/>.":StringUtils.toHtml(ex.getMessage())%> <br/> <br/>
|
||||
<!-- 请点击“查看详细信息”按钮,将详细错误信息发送给系统管理员,谢谢! -->
|
||||
<spring:message code="click_detail"/><br/> <br/>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a>
|
||||
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn"><spring:message code="show_detail"/></a>
|
||||
</div>
|
||||
<div class="errorMessage hide">
|
||||
<%=StringUtils.toHtml(sb.toString())%> <br/>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn">返回上一页</a>
|
||||
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn">隐藏详细信息</a>
|
||||
<a href="javascript:" onclick="history.go(-1);" class="btn"><spring:message code="return_lastpage"/></a>
|
||||
<a href="javascript:" onclick="$('.errorMessage').toggle();" class="btn"><spring:message code="hidden_detail"/></a>
|
||||
<br/> <br/>
|
||||
</div>
|
||||
<script>try{top.$.jBox.closeTip();}catch(e){}</script>
|
||||
|
||||
Reference in New Issue
Block a user