<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set scope="application" var="ROOT_PATH" value="${pageContext.request.contextPath}"></c:set>
<c:set scope="application" var="STATIC_VERSION" value="0.01"></c:set>

<link rel="stylesheet" href="${ROOT_PATH}/public/css/fonts/linecons/css/linecons.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/fonts/fontawesome/css/font-awesome.min.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/bootstrap.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/xenon-core.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/xenon-forms.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/xenon-components.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/xenon-skins.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/custom.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/plugin/prettyPhoto-3.1.5/css/prettyPhoto.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/video/video-js.css">
<link rel="stylesheet" href="${ROOT_PATH}/public/css/video/video-js-cdn.min.css">

<script src="${ROOT_PATH}/public/js/jquery-1.11.1.min.js"></script>

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
	<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->

<!-- Bottom Scripts -->
<script src="${ROOT_PATH}/public/js/bootstrap.min.js"></script>
<script src="${ROOT_PATH}/public/js/TweenMax.min.js"></script>
<script src="${ROOT_PATH}/public/js/resizeable.js"></script>
<script src="${ROOT_PATH}/public/js/joinable.js"></script>
<script src="${ROOT_PATH}/public/js/xenon-api.js"></script>
<script src="${ROOT_PATH}/public/js/xenon-toggles.js"></script>
<script src="${ROOT_PATH}/public/plugin/jquery-validate/jquery.validate.min.js"></script>
<script src="${ROOT_PATH}/public/plugin/toastr/toastr.min.js"></script>
<script src="${ROOT_PATH}/public/plugin/prettyPhoto-3.1.5/js/jquery.prettyPhoto.js"></script>
<script src="${ROOT_PATH}/public/plugin/My97DatePicker/WdatePicker.js"></script>

<!-- JavaScripts initializations and stuff -->
<script src="${ROOT_PATH}/public/js/xenon-custom.js"></script>

<!-- Imported styles on this page -->
<link rel="stylesheet" href="${ROOT_PATH}/public/plugin/datatables/dataTables.bootstrap.css">

<!-- Bottom Scripts -->
<script src="${ROOT_PATH}/public/plugin/datatables/js/jquery.dataTables.min.js"></script>

<!-- Imported scripts on this page -->
<script src="${ROOT_PATH}/public/plugin/datatables/dataTables.bootstrap.js"></script>
<script src="${ROOT_PATH}/public/plugin/datatables/yadcf/jquery.dataTables.yadcf.js"></script>
<script src="${ROOT_PATH}/public/plugin/datatables/tabletools/dataTables.tableTools.min.js"></script>
<script src="${ROOT_PATH}/public/js/jquery.form.js"></script>
<script src="${ROOT_PATH}/public/js/common.js?v=${STATIC_VERSION}"></script>

<!-- kindeditor -->
<script type="text/javascript" src="${ROOT_PATH}/public/plugin/kindeditor-4.1.7/kindeditor-min.js"></script>
<script type="text/javascript" src="${ROOT_PATH}/public/plugin/kindeditor-4.1.7/lang/zh_CN.js"></script>
<link rel="stylesheet" href="${ROOT_PATH}/public/plugin/kindeditor-4.1.7/themes/default/default.css" type="text/css" media="screen" />
<style>
	table {
		font-size: 13px;
	}
	
	#toast-container.toast-top-full-width > div {
		width: 300px;
	}
	
	.sidebar-menu .logo-env {
		padding: 30px 12px;
	}
	
	.sidebar-menu {
		width: 200px;
	}
	
	.sidebar-menu .main-menu {
		padding-left: 10px;
		padding-right: 25px;
	}
	
	.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, 
	.col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, 
	.col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, 
	.col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, 
	.col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, 
	.col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, 
	.col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, 
	.col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, 
	.col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, 
	.col-sm-12, .col-md-12, .col-lg-12 {
		padding-left: 0;
	}
</style>
<script type="text/javascript">
	var Constants = {
		reloadTime: 1000,
		rootPath : "${ROOT_PATH}",
		netError : "操作失败，网络异常",
		imageError : "请上传图片（格式BMP、JPG、JPEG、PNG、GIF）",
		mp4Error : "请上传视频（格式MP4）",
		loadingMsg : "保存中，请稍等",
		emailReg : /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
		phoneReg : /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/
	};
	
	var opts = {
		"closeButton": true,
		"debug": false,
		"positionClass": "toast-top-full-width",
		"onclick": null,
		"showDuration": "300",
		"hideDuration": "1000",
		"timeOut": "5000",
		"extendedTimeOut": "1000",
		"showEasing": "swing",
		"hideEasing": "linear",
		"showMethod": "fadeIn",
		"hideMethod": "fadeOut"
	};
	
	function enableBtn(id) {
		$(id).removeAttr("disabled"); 
	}

	function checkStr(str){
		if(str == null || str == ""){
			return false;
		}
		var re = /^\s+$/;
		if(re.exec(str)) {
			return false;
		}
		return true;
	}
	
	function createKindEditor(id){
		return KindEditor.create('textarea[name="' + id + '"]', {
			themeType : 'simple',
			uploadJson : '${ROOT_PATH}/kindEditorUpload/fileUpload',
 			resizeType : 1,
			allowImageUpload : true,
			filterMode : false,
			items : [
				'source', '|', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
				'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
				'insertunorderedlist', '|', 'emoticons', 'image', 'link'
			]
		});
	}
	
	function getCheckedValue(name){
		var chk_value = ''; 
		$('input[name="' + name + '"]:checked').each(function(){ 
			chk_value += $(this).val() + ','; 
		});
		if(chk_value.length > 0){
			chk_value = chk_value.substring(0, chk_value.length - 1);
		}
		return chk_value;
	}
	
	function isNumber(val){
		var r = /^\d+$/; // 非负整数
		return r.test(val);
	}
	
	function isDouble(val){
		var r = /^\d+(\.\d+)?$/; // 非负数
		return r.test(val);
	}
</script>