123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/webpage/include/taglib.jsp"%>
- <html>
- <head>
- <title>${appBaseNews.typeName}</title>
- <meta name="decorator" content="ani"/>
- <%@include file="/webpage/include/summernote.jsp" %>
- <script type="text/javascript">
- $(document).ready(function() {
- <c:if test="${appBaseNews.oprType !=null && appBaseNews.oprType!=''}">
- $(".table.table-bordered").find("input,textarea,select").attr("disabled", "disabled");
- $("#coverButton").hide();
- $('#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/base/appBaseNews/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="appBaseNews" class="form-horizontal">
- <form:hidden path="id"/>
- <form:hidden path="typeId"/>
- <table class="table table-bordered">
- <tbody>
- <tr>
- <td class="active" style="width: 18%;"><label class="pull-right"><font color="red">*</font>${appBaseNews.typeName}标题:</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"><font color="red">*</font>所属党支部:</label></td>
- <td class="width-35">
- <c:choose>
- <c:when test="${admin}">
- <sys:treeselect id="dept" name="dept.id" value="${appBaseNews.dept.id}" labelName="dept.name" labelValue="${appBaseNews.dept.name}"
- title="所属党支部" url="/leader/org/leaderOrgNo/treeData" extId="${appBaseNews.id}" cssClass="form-control required" allowClear="true"/>
- </c:when>
- <c:otherwise>
- <input id="deptId" name="dept.id" type="hidden" value="${appBaseNews.dept.id}"/>
- <input id="dept" name="dept.name" class="form-control required" value="${appBaseNews.dept.name}" readonly>
- </c:otherwise>
- </c:choose>
- </td>
- <td class="width-15 active" rowspan="2"><label class="pull-right">图片:</label></td>
- <td class="width-35" rowspan="2">
- <c:choose>
- <c:when test="${appBaseNews.cover =='' ||appBaseNews.cover ==undefined}">
- </c:when>
- <c:otherwise>
- <img alt="image" src="${appBaseNews.cover}" height="150" width="250"/>
- </c:otherwise>
- </c:choose>
- <c:if test="${mode != 'view'}">
- <sys:fileUpload path="cover" value="${appBaseNews.cover}" uploadPath="/app/base/appBaseNews"
- type="image" fileNumLimit="1" fileSizeLimit="2048" />
- </c:if>
- </td>
- </tr>
- <tr>
- <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">内容:</label></td>
- <td class="width-35" colspan="3">
- <input type="hidden" name="content" value=" ${appBaseNews.content}"/>
- <div id="content">
- ${fns:unescapeHtml(appBaseNews.content)}
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </form:form>
- </body>
- </html>
|