You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
194 lines
5.6 KiB
194 lines
5.6 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
|
<%@ include file="/common/ctx.jsp" %>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
|
<title>景区运营信息</title> <!-- jQuery -->
|
|
<!-- jQuery -->
|
|
<script src="${ctx}/js/jquery-1.11.0.min.js"></script>
|
|
<script src="${ctx}/js/jquery.form.js"></script>
|
|
<!-- checkbox 单选多选美化 -->
|
|
<script src="${ctx}/hbcyjc/resourceNew/js/checkbox.js"></script>
|
|
<script type="text/javascript"> <!-- checkbox 单选多选美化 -->
|
|
$(function () {
|
|
$('input').customInput();
|
|
$('.toggle').each(function () {
|
|
$('div:first', this).addClass('first');
|
|
$('div:last', this).addClass('last');
|
|
});
|
|
});
|
|
</script>
|
|
<%--弹框--%>
|
|
<script src="${ctx}/js/layer/layer.js"></script>
|
|
<%--表单工具--%>
|
|
<script src="${ctx}/js/common/cjy_form.js"></script>
|
|
<script src="${ctx}/js/common/cjy_common.js"></script>
|
|
<%--json工具--%>
|
|
<script type="text/javascript" src="${ctx}/js/common/json_form.js"></script>
|
|
<!-- 字体图标 -->
|
|
<link href="${ctx}/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/assets/ionicon/css/ionicons.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/css/material-design-iconic-font.min.css" rel="stylesheet">
|
|
<!-- 自定义样式 -->
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style.css" rel="stylesheet"/>
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style2.css" rel="stylesheet"/>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
//取消
|
|
function my_cancel() {
|
|
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
parent.layer.close(index) //关闭弹出框
|
|
}
|
|
//表单验证
|
|
function my_Verification(){
|
|
var title = $("#title").val();
|
|
if (isEmpty(title)) {
|
|
layer.msg("请输入标题");
|
|
return;
|
|
}
|
|
|
|
var listTitlename = $("#listTitlename").val();
|
|
if (isEmpty(listTitlename)) {
|
|
layer.msg("请输入配置页显示标题");
|
|
return;
|
|
}
|
|
|
|
var href = $("#href").val();
|
|
if (isEmpty(href)) {
|
|
layer.msg("请输入链接");
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
//验证该链接是否是已经存在
|
|
$.ajax({
|
|
url : "${ctx}/hbcyjclogin/savemenuitem.do", //后台处理程序
|
|
type : "post", //数据发送方式
|
|
dataType : "json", //接受数据格式
|
|
data : {href: href},
|
|
success : function(result) {
|
|
if(result){
|
|
saveSysUser();
|
|
}else{
|
|
layer.msg("用户名已经存在, 请重新输入");
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
//保存用户
|
|
function saveSysUser(){
|
|
var options = {
|
|
type : "post",
|
|
url : "${ctx}/hbcyjclogin/savemenuitem.do",
|
|
dataType : "json",
|
|
data : {},
|
|
success : function(json) {
|
|
mytip("保存成功!");
|
|
},
|
|
error : function() {
|
|
mytip("保存失败!");
|
|
}
|
|
}
|
|
$("#userForm").ajaxSubmit(options);
|
|
}
|
|
|
|
//提示
|
|
function mytip(text) {
|
|
layer.open({
|
|
type : 1,
|
|
content : '<div style="padding: 20px 100px;">' + text + '</div>',
|
|
btn : '确定',
|
|
shade: [0.7, '#333'],
|
|
btnAlign : 'c', //按钮居中
|
|
yes : function() {
|
|
parent.layer.closeAll(); //疯狂模式,关闭所有层
|
|
},
|
|
success: function (index, layero) {
|
|
$(':focus').blur();//让按钮失去焦点
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
function isEmpty(text) {
|
|
if (text != null && text != "null" && text != "" && text != "undefined" && text!=undefined) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
;
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="xingk_nr"></div>
|
|
<div class="header_top">
|
|
<p class="header_xtbt">新增菜单</p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<form class="form_meren" method="post" action="${ctx}/hbcyjclogin/savemenuitem.do" name="userForm" id="userForm">
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label for="logname" class="form_label">首页显示标题:<span class="text-danger">*</span></label>
|
|
<div class="form_input">
|
|
<input class="form-control" id="title" name="title" type="text" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label for="logname" class="form_label">配置页显示标题:<span class="text-danger">*</span></label>
|
|
<div class="form_input">
|
|
<input class="form-control" id="listTitlename" name="listTitlename" type="text" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label for="logname" class="form_label">跳转链接:<span class="text-danger">*</span></label>
|
|
<div class="form_input">
|
|
<input class="form-control" id="href" name="href" type="text" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label for="logname" class="form_label">是否可用:<span class="text-danger">*</span></label>
|
|
<div class="form_input">
|
|
<input class="form-control" id="status" name="status" type="text" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label for="logname" class="form_label">图标:<span class="text-danger">*</span></label>
|
|
<div class="form_input">
|
|
<input class="form-control" id="icon" name="icon" type="text" />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="clear"></div>
|
|
<p class="form-btncz">
|
|
<button class="bttn bttn_bc" type="button" onclick="my_Verification()"><i class="fa fa-save"></i>保存</button>
|
|
<button class="bttn" type="button" onclick="my_cancel()"><i class="fa fa-reply"></i>取消</button>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html> |