<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css"
	href="../res/css/plugins/webuploader/webuploader.css">
<%@ include file="../../common/head.jsp"%>
<script src="../res/js/plugins/webuploader/webuploader.min.js"
	type="text/javascript"></script>
<script src="../res/js/plugins/webuploader/uploader.js"
	type="text/javascript"></script>
<!-- jqGrid -->
<script>
<!--
function initUe(){
	$("#newsContent").val(ue.getContent());
}

//-->

$(document).ready(function() {
	$(".upload-img").InitUploader({ sendurl: "uploadPic.cs", swf: "../res/js/plugins/webuploader/uploader.swf" });
});
</script>
</head>
<body>
	<div class="wrapper wrapper-content pull-left">
		<cs:form_validate formId="addNewsForm" />
		<div class="row">
			<div class="col-xs-12 ">
				<form class="form-horizontal" onsubmit="initUe()" action="edit.cs"
					id="addNewsForm" method="POST">
					<input type="hidden" id="id" name="id" value="${bean.id}">
			<%-- 		<div class="form-group">
						<label class="col-sm-3 control-label">类别：</label>
						<div class="col-sm-6">
							<select id="classCode" name="classCode" class="form-control"
								validate="{required:true}" validateMessage="{required:'请选择类别'}">
								<option value="">--选择类别--</option>
								<c:forEach var="dic" items="${dicList}">
									<option value="${dic.code}"
										<c:if test="${dic.code eq bean.classCode}">selected</c:if>>${dic.name}</option>
								</c:forEach>
							</select>
						</div>
					</div> --%>
				<%-- 	<div class="form-group">
						<label class="col-sm-3 control-label">公告图标：</label>
						<div class="col-sm-6">
							<input name="newsImage" type="text" id="newsImage"
								value="${bean.newsImage}" class="input normal upload-path"
								readonly="true" />
							<div class="upload-box upload-img"></div>
						</div>
					</div> --%>
					<div class="form-group">
						<label class="col-sm-3 control-label">标题：</label>
						<div class="col-sm-6">
							<input id="newsTitle" name="newsTitle" value="${bean.newsTitle}"
								readonly="readonly" class="form-control">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">摘要：</label>
						<div class="col-sm-6">
							<input id="newsAbstract" name="newsAbstract"
								readonly="readonly"  value="${bean.newsAbstract}" class="form-control">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">排序：</label>
						<div class="col-sm-6">
							<input id="newsSort" name="newsSort" value="${bean.newsSort}"
								readonly="readonly"  class="form-control">（数字越小越向前排）
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">公告图标：</label>
						<div class="col-sm-6">
							<%-- <cs:file name="newsImage" url="${bean.newsImage}" type="100" num="1"></cs:file> --%>
							<img alt="" src="${bean.newsImage}" style="height:100px; width:100px; cursor: pointer;">
							
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">是否显示：</label>
						<div class="col-sm-6">
							<select id="newsShow" name="newsShow" class="form-control">
								<option value="1"
									<c:if test="${bean.newsShow eq 1}">selected</c:if>>显示</option>
								<option value="2"
									<c:if test="${bean.newsShow eq 2}">selected</c:if>>隐藏</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label">是否公开：</label>
						<div class="col-sm-6">
							<select id="openFlag" name="openFlag" class="form-control">
								<option value="1" <c:if test="${bean.newsShow eq 1}">selected</c:if>>公开</option>
								<option value="0" <c:if test="${bean.newsShow eq 0}">selected</c:if>>内部</option>
							</select>
						</div>
					</div>

					<div class="form-group ">
						<label class="col-xs-3 control-label">详情：</label> <input
							type="hidden" id="newsContent" name="newsContent"
							value='${newsContent }' />
						<div class="col-xs-9">
							<%-- <cs:wordedit name="详情" content='${newsContent}' /> --%>
							${newsContent}
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-4 col-sm-offset-3 pull-left">
							<button class="btn btn-default btn-dlg-close">取消</button>
						<!-- 	<button class="btn btn-primary" type="submit">提交</button> -->
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>

