<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
	<title>会议模板</title>
	<meta name="decorator" content="default"/>
	 <%--<link href="${ctxStatic}/summernotenew/summernote.css" rel="stylesheet">--%>
	 <%--<link href="${ctxStatic}/summernotenew/summernote-bs3.css" rel="stylesheet">--%>
	<%--<script src="${ctxStatic}/summernotenew/summernote.min.js"></script>--%>
	<%--<script src="${ctxStatic}/summernotenew/lang/summernote-zh-CN.js"></script>--%>
	<script src="${ctxStatic}/kindeditor/kindeditor-all.js"></script>
	<script type="text/javascript">
		var validateForm;
		function doSubmit(){//回调函数，在编辑和保存动作时，供openDialog调用提交表单。
		  if(validateForm.form()){
			  $("#inputForm").submit();
			  return true;
		  }
	
		  return false;
		}
		$(document).ready(function() {


			// if($("#startDate").val()==null || $("#startDate").val()==''){
			// 	$("#startDate").val(getNowFormatDate());
			// }
			validateForm = $("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			
			// 	//富文本初始化
			// $('.summernote').summernote({
            //     lang: 'zh-CN',
			// 	height:'300px'
            // });
            // getCurrentDocumentHei();

			// laydate.render({
			// 	elem: '#startDate', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
			// 	format: 'yyyy-MM-dd',
			// 	type : 'date'
			// });

			// $("#attachment_btn").click(function () {
			// 	$("#attachment_file").click();
			// });
		});
        // function getCurrentDocumentHei(){
        //     var height = $(document).outerHeight();
        //     parent.$("#controltype").attr("height",height +"px")
		// }






	</script>
	<%--<style>--%>
		<%--.note-editor .panel-heading{--%>
			<%--padding:3px 5px;--%>
		<%--}--%>
	<%--</style>--%>
</head>
<body>
<div class="single-form">
		<form:form id="inputForm" modelAttribute="workMeeting" action="${ctx}/workmeeting/workMeeting/save" method="post" class="form-horizontal">
			<form:hidden path="id"/>
			<sys:message content="${message}"/>
			<input type="hidden" name="projectId" id="projectId">

			<div class="form-group layui-row first">
				<div class="form-group-label"><h2>会议</h2></div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">类型：</label>
					<div class="layui-input-block">
						<input id="logType" name="workLog.logType" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.logType}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">创建日期：</label>
					<div class="layui-input-block">
						<input id="startDate" name="workLog.startDate" type="text"  maxlength="20" class="laydate-icondate form-control layer-date required layui-input laydate-icon"
							   value="<fmt:formatDate value="${projectControlTable.workLog.startDate}" pattern="yyyy-MM-dd"/>"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6 ">
					<label class="layui-form-label">地区：</label>
					<div class="layui-input-block  with-icon">
						<sys:treeselect id="area" name="workLog.area.id" value="${projectControlTable.workLog.area.id}" labelName="area.name" labelValue="${projectControlTable.workLog.area.name}"
										title="区域" url="/sys/area/treeData" cssClass="form-control layui-input" allowClear="true" notAllowSelectParent="ture"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>详细地址：</label>
					<div class="layui-input-block">
						<input id="address" name="workLog.address" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.address}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>天气：</label>
					<div class="layui-input-block">
						<input id="weather" name="workLog.weather" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.weather}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>温度：</label>
					<div class="layui-input-block">
						<input id="lowTem" name="workLog.lowTem" htmlEscape="false"   class="form-control required layui-input query-group" value="${projectControlTable.workLog.lowTem}"/>
						<span class="group-sep">-</span>
						<input id="highTem" name="workLog.highTem" htmlEscape="false"   class="form-control required layui-input query-group" value="${projectControlTable.workLog.highTem}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label">风向：</label>
					<div class="layui-input-block">
						<input id="wind1" name="workMeeting.wind" htmlEscape="false"    class="form-control  layui-input" value="${projectControlTable.workMeeting.wind}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm6">
					<label class="layui-form-label"><span class="require-item">*</span>会议主题：</label>
					<div class="layui-input-block">
						<input id="theme" name="workLog.theme" htmlEscape="false"    class="form-control required layui-input" value="${projectControlTable.workLog.theme}"/>
					</div>
				</div>
				<div class="layui-item layui-col-sm12">
					<label class="layui-form-label"><span class="require-item">*</span>内容：</label>
					<div class="layui-input-block">
						<textarea id="content" name="workLog.content" style="width:700px;height:300px;" class="form-control  required" placeholder="内容" required>${projectControlTable.workLog.content}</textarea>
					</div>
				</div>
				<script type="text/javascript">
					var editor;
					KindEditor.ready(function(K) {
						editor = K.create('textarea[name="workLog.content"]', {
							resizeType: 1,
							//图片路径
							filePostName: "uploadFile",
							uploadJson: '${ctxp}/static/kindeditor/jsp/upload_json.jsp',
							allowPreviewEmoticons: false,
							afterBlur:function(){
								this.sync('textarea[name="workLog.content"]');
							}
						});
					});

				</script>
			</div>

		</form:form>
</div>
</body>
</html>
