123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- <%--
- Created by IntelliJ IDEA.
- User: Administrator
- Date: 2020/4/17
- Time: 14:43
- To change this template use File | Settings | File Templates.
- --%>
- <%--
- Created by IntelliJ IDEA.
- User: Administrator
- Date: 2020/4/17
- Time: 14:00
- To change this template use File | Settings | File Templates.
- --%>
- <%@ page import="com.thinkgem.jeesite.common.config.Global" %>
- <%@ page contentType="text/html;charset=UTF-8" language="java" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>编辑帮助页</title>
- <meta name="decorator" content="default"/>
- <style>
- .red{color:red;}
- .blue{color:rgb(0, 100, 180);}
- #inputForm{max-width: 1200px;width: 100%;}
- #inputForm table{width:100%;line-height:18px;margin-bottom:50px;}
- #inputForm th,#inputForm td{ font-weight: normal; text-align: left; padding: 8px 5px; border-bottom: 1px solid rgb(238, 238, 238); }
- #inputForm th{width:15%;text-align:right;white-space:nowrap;font-weight:bold;}
- #inputForm td{width:35%;}
- #inputForm td input[type="text"]{width:320px;height:16px; line-height:16px; }
- #inputForm td input.short{width:120px;}
- #inputForm td b.line{margin:0 15px 0 20px;font-weight:normal}
- #allAreaInput {padding: 10px 0 0 100px;}
- #inputForm .item{line-height:28px;}
- #ladderPriceBox{border-top:1px solid rgb(238, 238, 238);margin-top:8px;padding-top:8px;}
- #ladderPriceBox>div {margin-bottom: 5px;}
- .priceIcon:before{content:'\2729';color: #aaa;font-size: 18px;font-style:normal;}
- .priceIcon.full:before{content:'\272E';color: #ffbd14;}
- </style>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li><a href="${ctx}/help/list">帮助页</a></li>
- <li class="active"><a href="${ctx}/help/form?id=${helppage.helpPageID}">编辑</a></li>
- </ul>
- <form:form id="inputForm" modelAttribute="helppage" action="${ctx}/help/save" method="post" class="form-horizontal">
- <form:hidden path="id"/>
- <sys:message content="${message}"/>
- <table border="0" cellspacing="0" cellpadding="0" width="100%">
- <tr>
- <th><span class="red">*</span>标题:</th>
- <td colspan="3">
- <form:input path="title" maxlength="20" class="input-small required"/>
- </td>
- </tr>
- <tr>
- <th><span class="red">*</span>帮助页信息类型:</th>
- <td colspan="3">
- <form:select path="helpPageTypeID" class="input-small required">
- <form:option value="" label="请选择"/>
- <c:forEach items="${typeList}" var="type">
- <form:option value="${type.id}" label="${type.typeName}"/>
- </c:forEach>
- </form:select>
- </td>
- </tr>
- <tr>
- <th><span class="red">*</span>在帮助中心左侧列表显示:</th>
- <td colspan="3">
- <input type="radio" name="showFlag" value="1" ${helppage.showFlag == "1" ? "checked" : ""} />是<b class="line">|</b>
- <input type="radio" name="showFlag" value="0" ${helppage.showFlag == "1" ? "" : "checked"} />否
- </td>
- </tr>
- <tr>
- <th>内容:</th>
- <td colspan="3">
- <!-- 富文本编辑器 -->
- <form:textarea path="content" class="input-xlarge hide"/>
- <div id="contentEditor">${helppage.content}</div>
- </td>
- </tr>
- <tr><td colspan="4" style="text-align:center;">
- <input id="btnSave" class="btn btn-primary" type="submit" value="保 存" onclick="checkInfo()"/>
- <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
- </td></tr>
- </table>
- </form:form>
- <!-- 富文本编辑器 -->
- <% request.setAttribute("caimeiCore", Global.getConfig("caimei.core"));%>
- <script type="text/javascript" src="${ctxStatic}/ckeditor5-new/ckeditor.js"></script>
- <script type="text/javascript">
- //富文本框编辑
- function checkInfo(){
- // var content=CKEDITOR.instances.content.getData();
- var content = contentEditor.getData();
- $("#content").val(content);
- console.log(data);
- }
- $(document).ready(function() {
- //富文本框
- // CKEDITOR.replace('content');
- ClassicEditor.create(document.querySelector('#contentEditor'), {
- ckfinder: {
- uploadUrl: '${caimeiCore}/tools/image/upload/ckeditor'
- }
- }).then(function(editor) {
- window.contentEditor = editor;
- }).catch(function(error){
- console.log(error);
- });
- // 提交
- $("#inputForm").validate({
- submitHandler: function(form){
- loading('正在提交,请稍等...');
- form.submit();
- },
- errorContainer: "#messageBox",
- errorPlacement: function(error, element) {
- $("#messageBox").text("输入有误,请先更正。");
- error.appendTo(element.parent());
- }
- });
- });
- </script>
- </body>
- </html>
|