增加配置保护名单管理功能.
This commit is contained in:
106
src/main/webapp/WEB-INF/views/basics/protectionInfoForm.jsp
Normal file
106
src/main/webapp/WEB-INF/views/basics/protectionInfoForm.jsp
Normal file
@@ -0,0 +1,106 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="protection_list_manage"/>
|
||||
</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.proId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.proId}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form:form id="cfgFrom" modelAttribute="_cfg" action="${ctx}/basics/innerProtectionList/saveOrUpdate" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="proId" value="${_cfg.proId}">
|
||||
<div class="form-body">
|
||||
<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="keywords"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="keyword" value="${_cfg.keyword}">
|
||||
</div>
|
||||
<div for="keyword"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="type"/></label>
|
||||
<div class="col-md-6">
|
||||
<%-- <input class="form-control required" type="text" name="targetType" value="${_cfg.targetType}"> --%>
|
||||
<select name="targetType" class="selectpicker show-tick form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="urlCheck" <c:if test="${_cfg.targetType eq 'urlCheck'}">selected</c:if>><spring:message code="URL"/></option>
|
||||
<option value="domainCheck" <c:if test="${_cfg.targetType eq 'domainCheck'}">selected</c:if>><spring:message code="domain"/></option>
|
||||
<option value="keywordSign" <c:if test="${_cfg.targetType eq 'keywordSign'}">selected</c:if>><spring:message code="keywords"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="targetType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="desc"/>:</label>
|
||||
<div class="col-md-6">
|
||||
<form:textarea path="description" htmlEscape="false" maxlength="128" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
260
src/main/webapp/WEB-INF/views/basics/protectionInfoList.jsp
Normal file
260
src/main/webapp/WEB-INF/views/basics/protectionInfoList.jsp
Normal file
@@ -0,0 +1,260 @@
|
||||
<%@
|
||||
page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.keyword}"){
|
||||
$("#intype").val("${cfg.keyword}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
// 处理 Type下拉检索条件----------------+
|
||||
if($("#seltype").val() == "targetType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
}else{
|
||||
$("#targetType").selectpicker("hide");
|
||||
}
|
||||
|
||||
$("#seltype").change(function(){
|
||||
if($(this).val() == "targetType"){
|
||||
$("#intype").hide();// 隐藏输入框
|
||||
$("#intype").val("");// 清空input条件
|
||||
$("#targetType").find("option").removeAttr("selected",false);
|
||||
$("#targetType").selectpicker("refresh");
|
||||
$("#targetType").selectpicker("show");
|
||||
}else{
|
||||
$("#targetType").find("option:first").attr("selected",true);
|
||||
$("#targetType").selectpicker("hide");// 隐藏下拉框
|
||||
}
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
// 处理 Type下拉检索条件----------------+
|
||||
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
if($("#seltype").find("option:first").val() == "targetType"){
|
||||
$("#intype").hide();
|
||||
$("#targetType").selectpicker("show");
|
||||
return false;
|
||||
}
|
||||
if($("#seltype").val() == "targetType"){
|
||||
$("#intype").show();
|
||||
$("#intype").attr("placeholder",$.validator.messages.input+$("#seltype").find("option:first").text());
|
||||
$("#targetType").selectpicker("hide");
|
||||
};
|
||||
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
function deletes(url){
|
||||
var checkboxes=$("tbody tr td input.i-checks:checkbox");
|
||||
var ids="";
|
||||
var str="";
|
||||
checkboxes.each(function(){
|
||||
if(true == $(this).is(':checked')){
|
||||
|
||||
str+=$(this).attr("id")+",";
|
||||
}
|
||||
});
|
||||
if(str.substr(str.length-1)== ','){
|
||||
ids = str.substr(0,str.length-1);
|
||||
}
|
||||
|
||||
var canDel=true;
|
||||
if(canDel){
|
||||
var added = "";
|
||||
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>"+added,"<spring:message code='info'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
window.location = url+"&ids="+ids;
|
||||
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}else{
|
||||
$.jBox.tip(tip);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-primary" onClick="javascript:window.location='${ctx}/basics/innerProtectionList/form'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="protection_list_manage"/>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/basics/innerProtectionList/list" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<%-- <input id="groupType" name="groupType" type="hidden" value="${cfg.groupType}"/> --%>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="keyword"><spring:message code="keywords"></spring:message></form:option>
|
||||
<form:option value="targetType"><spring:message code="type"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
<div class="input-group-btn">
|
||||
<form:select id="targetType" path="targetType" class="selectpicker select2 input-small" >
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<form:option value="urlCheck"><spring:message code="URL"/></form:option>
|
||||
<form:option value="domainCheck"><spring:message code="domain"/></form:option>
|
||||
<form:option value="keywordSign"><spring:message code="keywords"/></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<sys:delRow url="${ctx}/basics/innerProtectionList/form" id="contentTable" label="update"></sys:delRow>
|
||||
<a href="javascript:void(0);" class="btn btn-default" onclick="deletes('${ctx}/basics/innerProtectionList/delete?isValid=-1&functionId=${cfg.functionId }')" data-toggle="tooltip" data-placement="top">
|
||||
<i class="fa fa-trash"> <spring:message code="delete"/></i>
|
||||
</a>
|
||||
<%-- <sys:delRow url="${ctx}/basics/asn/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow> --%>
|
||||
|
||||
<%-- <div class="btn-group"> 导出
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right" style="min-width: 110px;" >
|
||||
<li><sys:delRow url="${ctx}/basics/policyGroup/exportGroup?exType=excel" searchUrl="${ctx}/basics/policyGroup/policyGroupList" id="contentTable" maxRow="5" label="cfg_excel"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/basics/policyGroup/exportGroup?exType=csv" searchUrl="${ctx}/basics/policyGroup/policyGroupList" id="contentTable" maxRow="5" label="cfg_csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div> --%>
|
||||
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th column="keyword" ><spring:message code="keywords"/></th>
|
||||
<th column="targetType" ><spring:message code="type"/></th>
|
||||
<th column="desc" ><spring:message code="desc"/></th>
|
||||
<th column="creator" ><spring:message code="creator"/></th>
|
||||
<th column="config_time" class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th column="editor" ><spring:message code="editor"/></th>
|
||||
<th column="edit_time" class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td><input type="checkbox" class="i-checks child-checks" id="${cfg.proId}"></td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${cfg.keyword}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(cfg.keyword,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.targetType eq 'urlCheck'}"><spring:message code="URL"/></c:if>
|
||||
<c:if test="${cfg.targetType eq 'domainCheck'}"><spring:message code="domain"/></c:if>
|
||||
<c:if test="${cfg.targetType eq 'keywordSign'}"><spring:message code="keywords"/></c:if>
|
||||
</td>
|
||||
<td title="${cfg.description }">${fns:abbr(cfg.description,20)}</td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user