网站和主题单独菜单管理
This commit is contained in:
167
src/main/webapp/WEB-INF/views/basics/dictForm.jsp
Normal file
167
src/main/webapp/WEB-INF/views/basics/dictForm.jsp
Normal file
@@ -0,0 +1,167 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>用户管理</title>
|
||||
<style type="text/css">
|
||||
#items p input{
|
||||
margin-left:0px;
|
||||
width:80px;
|
||||
}
|
||||
#items p select{
|
||||
width:50px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var $inputForm = $("#inputForm");
|
||||
var $error = $('.alert-error', $inputForm);
|
||||
var $success = $('.alert-success', $inputForm);
|
||||
$inputForm.validate({
|
||||
rules: {
|
||||
'itemValue':{
|
||||
required:true
|
||||
},
|
||||
'itemCode':{
|
||||
digits:true
|
||||
}
|
||||
|
||||
},
|
||||
submitHandler: function(form){
|
||||
if(!validateItem()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
|
||||
}/* ,
|
||||
errorContainer: "#messageBox",
|
||||
errorPlacement: function(error, element) {
|
||||
$("#messageBox").text("<spring:message code='enter_error'/>");
|
||||
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
|
||||
error.appendTo(element.parent().parent());
|
||||
} else {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
} */
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function validateItem(){
|
||||
var isValid=true;
|
||||
var itemCode=$("input[name='itemCode']").val();
|
||||
var dictionaryId=$("input[name='dictionaryId']").val();
|
||||
var id=$("input[name='id']").val();
|
||||
if(itemCode != null && itemCode !=''){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/sys/dict/checkItemCode',
|
||||
data:{"itemCode":itemCode,"dictionaryId":dictionaryId,"id":id},
|
||||
dataType:'text',
|
||||
async:false,
|
||||
success:function (data){
|
||||
if(data=='true'){
|
||||
$("#messageBox").addClass("hidden");
|
||||
isValid= true;
|
||||
}else {
|
||||
$("#messageBox").text("<spring:message code='duplicate'/> <spring:message code='item_code'/>");
|
||||
$("#messageBox").removeClass("hidden");
|
||||
isValid= false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
return isValid;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<div class="row">
|
||||
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<button type="button" class="btn btn-default" onclick="history.go(-1)"><spring:message code="back"/></button>
|
||||
</div>
|
||||
<%-- <h3 class="page-title">
|
||||
<spring:message code="dictManage"/>
|
||||
</h3> --%>
|
||||
<div class="col-md-12">
|
||||
|
||||
<%-- <ul class="nav nav-tabs">
|
||||
<li><a href="${ctx}/sys/dict/list">字典列表</a></li>
|
||||
<li class="active"><a href="${ctx}/sys/dict/form?id=${sysDataDictionaryName.id}">字典
|
||||
<shiro:hasPermission name="sys:dict:edit"></shiro:hasPermission>${not empty sysDataDictionaryName.id?'修改':'添加'}
|
||||
<shiro:lacksPermission name="sys:dict:edit">查看</shiro:lacksPermission>
|
||||
</a></li>
|
||||
</ul><br/> --%>
|
||||
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i><c:if test="${not empty sysDataDictionaryItem.id}"><spring:message code="edit"/></c:if><c:if test="${empty sysDataDictionaryItem.id}"><spring:message code="add"/></c:if></div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
|
||||
<form:form id="inputForm" modelAttribute="sysDataDictionaryItem" action="${ctx}/sys/dict/saveOrUpdateItem" method="post" class="form-horizontal">
|
||||
|
||||
<form:hidden path="id"/>
|
||||
<form:hidden path="dictionaryId"/>
|
||||
<form:hidden path="status" value="1"/>
|
||||
<form:hidden path="type" value="1"/>
|
||||
<sys:message content="${message}" type="${messageType }"/>
|
||||
|
||||
<div id="messageBox" class="alert alert-error hidden"></div>
|
||||
<div class="alert alert-error hide">
|
||||
<button class="close" data-dismiss="alert"></button>
|
||||
<spring:message code="submit_error"/>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success hide">
|
||||
|
||||
<button class="close" data-dismiss="alert"></button>
|
||||
<spring:message code="form_validate"/>
|
||||
</div>
|
||||
<div class="form-body">
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="item_code"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="itemCode" htmlEscape="false" maxlength="50" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-md-3 control-label"><spring:message code="item_value"/>:</label>
|
||||
<div class="col-md-4">
|
||||
<form:input path="itemValue" htmlEscape="false" maxlength="50" class="required form-control"/>
|
||||
</div>
|
||||
<span class="help-inline"><font color="red">*</font> </span>
|
||||
</div>
|
||||
<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" rows="3" maxlength="200" class="span6 form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button type="submit" class="btn btn-circle blue"><spring:message code="submit"></spring:message></button>
|
||||
<button type="button" class="btn btn-circle grey-salsa btn-outline" onclick="history.go(-1)"><spring:message code="cancel"></spring:message></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
130
src/main/webapp/WEB-INF/views/basics/dictList.jsp
Normal file
130
src/main/webapp/WEB-INF/views/basics/dictList.jsp
Normal file
@@ -0,0 +1,130 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title>字典管理</title>
|
||||
<style type="text/css">
|
||||
|
||||
.revisionBox {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
span.label.label-success{
|
||||
width: 250px;
|
||||
}
|
||||
.popover {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.btn.purple-stripe {
|
||||
border-left: 3px solid #852B99;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function page(n,s){
|
||||
if(n) $("#pageNo").val(n);
|
||||
if(s) $("#pageSize").val(s);
|
||||
$("#searchForm").attr("action","${ctx}/sys/dict/topicAndWebsiteList");
|
||||
$("#searchForm").submit();
|
||||
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}/sys/dict/dictItemForm?dictionaryId=${sysDataDictionaryItem.dictionaryId }'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"/></button>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="dictManage"></spring:message>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<form:form id="searchForm" action="${ctx}/sys/dict/topicAndWebsiteList" 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="dictionaryId" name="dictionaryId" type="hidden" value="${sysDataDictionaryItem.dictionaryId}"/>
|
||||
<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="row">
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="item_code"/>:</label>
|
||||
<input id="itemCode" name="itemCode" type="text" maxlength="50" class="form-control" value="${sysDataDictionaryItem.itemCode}"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="item_value"/>:</label>
|
||||
<input id="itemValue" name="itemValue" type="text" maxlength="50" class="form-control" value="${sysDataDictionaryItem.itemValue}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
|
||||
<div class="form-group">
|
||||
<label><spring:message code="desc"/>:</label>
|
||||
<input id="itemDesc" name="itemDesc" type="text" maxlength="50" class="form-control" value="${sysDataDictionaryItem.itemDesc}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<button type="submit" class="btn blue form-control"><i class="fa fa-search"></i><spring:message code="search" /></button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form:form>
|
||||
</div>
|
||||
|
||||
<sys:message content="${message}" type="${messageType }" />
|
||||
<br>
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="sort-column item_code" width="15%"><spring:message code="itemCode"/></th>
|
||||
<th class="sort-column item_value" width="20%"><spring:message code="itemValue"/></th>
|
||||
<th class="sort-column item_desc" width="15%"><spring:message code="itemDesc"/></th>
|
||||
<th width="15%"><spring:message code="operation"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list}" var="dict">
|
||||
<tr>
|
||||
|
||||
<td>${dict.itemCode}</td>
|
||||
<td>${dict.itemValue}</td>
|
||||
<td title="${dict.itemDesc }">${fns:abbr(dict.itemDesc,200)}</td>
|
||||
<td><a href="${ctx}/sys/dict/dictItemForm?dictionaryId=${sysDataDictionaryItem.dictionaryId}&id=${dict.id}">update</a>
|
||||
<a href="${ctx}/sys/dict/deleteItem?dictionaryId=${sysDataDictionaryItem.dictionaryId}&id=${dict.id}">delete</a></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user