|
@@ -0,0 +1,213 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
|
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
+<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
|
|
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
|
+<%
|
|
|
+ String base = pageContext.getServletContext().getContextPath();
|
|
|
+%>
|
|
|
+<!--_meta 作为公共模版分离出去-->
|
|
|
+<!DOCTYPE HTML>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <meta charset="utf-8">
|
|
|
+ <script type="text/javascript">
|
|
|
+ window.UEDITOR_SERVER_URL = '<%=base%>';
|
|
|
+ </script>
|
|
|
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
+ <meta name="viewport"
|
|
|
+ content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
|
|
|
+ <meta http-equiv="Cache-Control" content="no-siteapp"/>
|
|
|
+ <LINK rel="Bookmark" href="/favicon.ico">
|
|
|
+ <LINK rel="Shortcut Icon" href="/favicon.ico"/>
|
|
|
+
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
+ href="${pageContext.request.contextPath}/static/admin/index/h-ui/css/H-ui.min.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
+ href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/H-ui.admin.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
+ href="${pageContext.request.contextPath}/static/admin/index/Hui-iconfont/1.0.8/iconfont.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/admin/icheck/icheck.css"/>
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
+ href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/skin/default/skin.css" id="skin"/>
|
|
|
+ <link rel="stylesheet" type="text/css"
|
|
|
+ href="${pageContext.request.contextPath}/static/admin/index/h-ui.admin/css/style.css"/>
|
|
|
+
|
|
|
+ <script type="text/javascript"
|
|
|
+ src="${pageContext.request.contextPath}/static/admin/index/jquery/1.9.1/jquery.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/index/layer/layer.js"></script>
|
|
|
+ <script type="text/javascript"
|
|
|
+ src="${pageContext.request.contextPath}/static/admin/js/jquery.validate.min.js"></script>
|
|
|
+ <script type="text/javascript"
|
|
|
+ src="${pageContext.request.contextPath}/static/admin/js/validate-methods.js"></script>
|
|
|
+ <script type="text/javascript" src="${pageContext.request.contextPath}/static/admin/js/messages_zh.min.js"></script>
|
|
|
+ <script type="text/javascript"
|
|
|
+ src="${pageContext.request.contextPath}/static/admin/icheck/jquery.icheck.min.js"></script>
|
|
|
+ <script src="${pageContext.request.contextPath}/static/admin/manage/js/WdatePicker.js"></script>
|
|
|
+
|
|
|
+ <script type="text/javascript">
|
|
|
+ $(function () {
|
|
|
+ $("#sub").click(function () {
|
|
|
+ var id = $("#id").val();
|
|
|
+ var explain = $("#roleName").val();
|
|
|
+ /*var discription = $("#discription").val();*/
|
|
|
+ if (id == null || id== '') {
|
|
|
+ layer.msg("请选择父级角色~");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (explain == null || explain == '') {
|
|
|
+ layer.msg("角色名称不能为空~");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ /* if (discription == null || discription == '') {
|
|
|
+ layer.msg("角色名称不能为空~");
|
|
|
+ return false;
|
|
|
+ }*/
|
|
|
+ var formData = new FormData();
|
|
|
+ formData.append("id",$("#id").val());//父类id
|
|
|
+ formData.append("pid",$("#pid").val());//父类id
|
|
|
+ formData.append("roleName",$("#roleName").val());//角色名称
|
|
|
+ formData.append("discription",$("#discription").val());//描述
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type:"POST",
|
|
|
+ url:"adminRoleUpdates.html",
|
|
|
+ data:formData,
|
|
|
+ dataType:"json",
|
|
|
+ cache: false,
|
|
|
+ async : false,
|
|
|
+ processData: false,
|
|
|
+ contentType: false,
|
|
|
+
|
|
|
+ success:function (ajax) {
|
|
|
+ if (ajax.is){
|
|
|
+ layer.msg(ajax.msg);
|
|
|
+ layer.alert(ajax.msg, {skin: 'layui-layer-molv', closeBtn: 0, anim: 4}, function () {
|
|
|
+ var index = parent.layer.getFrameIndex(window.name);
|
|
|
+ parent.layer.close(index);
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ layer.msg(ajax.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ });
|
|
|
+ });
|
|
|
+ </script>
|
|
|
+
|
|
|
+ <title>管理员管理</title>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<nav class="breadcrumb">
|
|
|
+ <i class="Hui-iconfont"></i> 首页 <span class="c-gray en">></span><a href="javascript:history.go(-1)" title="角色列表">角色列表</a><span class="c-gray en">></span> 添加
|
|
|
+ <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px"
|
|
|
+ href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont"></i></a>
|
|
|
+</nav>
|
|
|
+<article class="page-container">
|
|
|
+ <form class="form form-horizontal" id="subform">
|
|
|
+
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>父级角色:</label>
|
|
|
+ <div class="formControls col-xs-8 col-sm-9">
|
|
|
+ <select name="pId" id="pid" class="input-text" <c:if test="${adminRole.id == 1}">disabled</c:if> >
|
|
|
+ <%--<option value="">请选择</option>--%>
|
|
|
+ <c:if test="${adminRole.id==1}"><option value="0">没有父级角色</option></c:if>
|
|
|
+ <c:forEach items="${adminRoleList}" var="role">
|
|
|
+ <option value="${role.id}"<c:if test="${role.id == adminRole.pid}"> selected </c:if>>
|
|
|
+ <c:if test="${adminRole.id!=1}">${role.roleName}</c:if>
|
|
|
+ </option>
|
|
|
+
|
|
|
+ </c:forEach>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-xs-4 col-sm-1"><span class="c-red">*</span>角色名称:</label>
|
|
|
+ <div class="formControls col-xs-8 col-sm-9">
|
|
|
+ <input type="text" class="input-text" name="roleName" id="roleName" value="${adminRole.roleName}">
|
|
|
+ <input type="text" class="input-text" hidden name="id" id="id" value="${adminRole.id}">
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <label class="form-label col-xs-4 col-sm-1"><span class="c-red"></span>描述:</label>
|
|
|
+ <div class="formControls col-xs-8 col-sm-9">
|
|
|
+ <textarea name="discription" id="discription" cols="" rows="" class="textarea">${adminRole.discription}</textarea>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <div class="row cl">
|
|
|
+ <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-1">
|
|
|
+ <button type="button" class="btn btn-primary radius" id="sub" name="admin-role-save"><i class="Hui-iconfont"></i> 提交</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+</article>
|
|
|
+
|
|
|
+<!--请在下方写此页面业务相关的脚本-->
|
|
|
+<!-- 百度文本编辑器 引用文件 -->
|
|
|
+<link href="<%=base%>/static/ue/themes/default/css/ueditor.css" type="text/css" rel="stylesheet">
|
|
|
+<script src="<%=base%>/static/ue/ueditor.config.js" type="text/javascript"></script>
|
|
|
+<script src="<%=base%>/static/ue/ueditor.all.js" type="text/javascript"></script>
|
|
|
+<script type="text/javascript" src="<%=base%>/static/ue/lang/zh-cn/zh-cn.js"></script>
|
|
|
+
|
|
|
+<!-- 百度文本编辑器 js -->
|
|
|
+<script type="text/javascript">
|
|
|
+ $(function () {
|
|
|
+ var ue = UE.getEditor('introduction', {
|
|
|
+ //关闭字数统计
|
|
|
+ wordCount: false,
|
|
|
+ toolbars: [['fullscreen', 'source', '|', 'undo', 'redo', '|',
|
|
|
+ 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
|
|
|
+ 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
|
|
|
+ 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
|
|
|
+ 'directionalityltr', 'directionalityrtl', 'indent', '|',
|
|
|
+ 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
|
|
|
+ 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
|
|
|
+ 'insertimage', 'emotion', 'insertvideo', 'attachment', 'map', 'template', 'background', '|',
|
|
|
+ 'horizontal', 'date', 'time', 'spechars', 'wordimage', '|',
|
|
|
+ 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
|
|
|
+ 'print', 'preview', 'searchreplace', 'help'
|
|
|
+ ]],
|
|
|
+ //关闭elementPath
|
|
|
+ elementPathEnabled: false,
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ var currentBrowserId;
|
|
|
+
|
|
|
+ function browserImage(targetId) {
|
|
|
+ currentBrowserId = targetId;
|
|
|
+ var weboxTemp = $.webox({
|
|
|
+ height: 600,
|
|
|
+ width: 1024,
|
|
|
+ bgvisibel: true,
|
|
|
+ title: '图片管理',
|
|
|
+ iframe: '<%=base%>/admin/image/imgbox.html?' + Math.random()
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function setImagepath(imgPath) {
|
|
|
+ $('#' + currentBrowserId).val(imgPath);
|
|
|
+ }
|
|
|
+
|
|
|
+ function closeFrame() {
|
|
|
+ $('#locked .span').click();
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+
|
|
|
+<!--请在下方写此页面业务相关的脚本-->
|
|
|
+<script type="text/javascript">
|
|
|
+</script>
|
|
|
+<!--/请在上方写此页面业务相关的脚本-->
|
|
|
+</body>
|
|
|
+</html>
|