123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>新闻管理</title>
- <meta name="decorator" content="ani"/>
- <style>
- .contents {
- width: 950px;
- }
- </style>
- <!-- SUMMERNOTE -->
- <%@include file="/webpage/include/ueditor.jsp" %>
- <script type="text/javascript">
- var contents = null;
- $(document).ready(function() {
- });
- function save() {
- var isValidate = jp.validateForm('#inputForm');//校验表单
- contents = editor.getContent();
- if(contents == ''){
- alert("内容不能为空!");
- return false;
- };
- $("#content").val(contents);
- if(!isValidate){
- return false;
- }else{
- jp.loading();
- jp.post("${ctx}/base/eduNews/save",$('#inputForm').serialize(),function(data){
- if(data.success){
- jp.getParent().refresh();
- var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
- parent.layer.close(dialogIndex);
- jp.success(data.msg)
- }else{
- jp.error(data.msg);
- }
- })
- }
- }
- </script>
- </head>
- <body class="bg-white">
- <form:form id="inputForm" modelAttribute="eduNews" class="form-horizontal">
- <form:hidden path="id"/>
- <form:hidden path="typeId" />
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>标题:</label></td>
- <td >
- <form:input path="title" htmlEscape="false" maxlength="100" class="form-control required"/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right">来源:</label></td>
- <td >
- <form:input path="source" htmlEscape="false" maxlength="50" class="form-control "/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active" ><label class="pull-right"><font color="red">*</font>封面:</label></td>
- <td >
- <c:choose>
- <c:when test="${eduNews.oprType ==null || eduNews.oprType==''}">
- <sys:fileUpload path="cover" fileNumLimit="1" allowedExtensions="jpeg,jpg,png,bmp" value="${eduNews.cover}" uploadPath="/base/eduNews" type="images" required="required"/>
- </c:when>
- <c:otherwise>
- <img src="${eduNews.cover}" width="230" height="100">
- </c:otherwise>
- </c:choose>
- </td>
- <%-- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>在轮播图中显示:</label></td>
- <td class="width-35">
- <form:radiobuttons path="display" items="${fns:getDictList('yes_no')}" itemLabel="label" itemValue="value" htmlEscape="false" class="i-checks required"/>
- </td>--%>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>内容:</label></td>
- <td >
- <!--<input type="hidden" name="content" value=" ${eduNews.content}"/> -->
- <div class="contents">
- <script id="container" name="content" type="text/plain">${fns:unescapeHtml(eduNews.content)}</script>
- <script type="text/javascript">
- var editor = UE.getEditor('container');
- editor.ready(function() {
- editor.setHeight(310);
- });
- </script>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|