123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>党建资讯管理</title>
- <meta name="decorator" content="ani"/>
- <!-- SUMMERNOTE -->
- <%@include file="/webpage/include/summernote.jsp" %>
- <script type="text/javascript">
- $(document).ready(function() {
- <c:if test="${mode=='view'}">
- $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
- $(".table.table-bordered").find("input[type=checkbox]").attr("disabled","disabled");
- $('#content').summernote({
- height: 300
- })
- $('#content').summernote('disable');
- </c:if>
- //富文本初始化
- $('#content').summernote({
- height: 300,
- lang: 'zh-CN',
- callbacks: {
- onChange: function(contents, $editable) {
- $("input[name='content']").val($('#content').summernote('code'));//取富文本的值
- }
- }
- });
- });
- function save() {
- var isValidate = jp.validateForm('#inputForm');//校验表单
- if(!isValidate){
- return false;
- }else{
- jp.loading();
- jp.post("${ctx}/app/news/appConsultation/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="appConsultation" class="form-horizontal">
- <form:hidden path="id"/>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="width-15 active"><label class="pull-right"><font color="red">*</font>资讯类别:</label></td>
- <td class="width-35">
- <form:select path="typeId" class="form-control required">
- <form:option value="" label=""/>
- <form:options items="${typeList}" itemLabel="title" itemValue="id" htmlEscape="false"/>
- </form:select>
- </td>
- <td class="width-15 active" rowspan="3"><label class="pull-right">资讯图片:</label></td>
- <td class="width-35" rowspan="3">
- <c:choose>
- <c:when test="${appConsultation.cover =='' ||appConsultation.cover ==undefined}">
- </c:when>
- <c:otherwise>
- <img alt="image" src="${appConsultation.cover}" height="150" width="250"/>
- </c:otherwise>
- </c:choose>
- <c:if test="${mode != 'view'}">
- <sys:fileUpload path="cover" value="${appConsultation.cover}" uploadPath="/app/news/appConsultation"
- type="image" fileNumLimit="1" fileSizeLimit="2048" />
- </c:if>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right">资讯来源:</label></td>
- <td class="width-35">
- <form:input path="newsResource" htmlEscape="false" maxlength="50" class="form-control "/>
- </td>
- </tr>
- <tr>
- <td class="width-15 active"><label class="pull-right">首页显示:</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 class="width-35" colspan="3">
- <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 class="width-35" colspan="3">
- <input type="hidden" name="content" value=" ${appConsultation.content}"/>
- <div id="content">
- ${fns:unescapeHtml(appConsultation.content)}
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|