From 482847fc97748b67fd8ab93b5b589ab3824f6d02 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 07 Apr 2021 10:28:56 +0800
Subject: [PATCH] 20210407 签到
---
zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html | 71 +++++++++++++++--------------------
1 files changed, 30 insertions(+), 41 deletions(-)
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html
index 346b695..2896219 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/operate/trainingMaterialsManage-form.html
@@ -13,14 +13,14 @@
th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
<script type="text/javascript" th:src="@{/js/systools/MBase.js}"></script>
<!-- 富文本编辑器 -->
- <link rel="stylesheet"
- th:href="@{/plugin/kindeditor/themes/default/default.css}"/>
- <link rel="stylesheet"
- th:href="@{/plugin/kindeditor/plugins/code/prettify.css}"/>
- <script th:src="@{/plugin/kindeditor/kindeditor.js}"></script>
- <script th:src="@{/plugin/kindeditor/lang/zh_CN.js}"></script>
- <script
- th:src="@{/plugin/kindeditor/plugins/code/prettify.js}"></script>
+ <script type="text/javascript" charset="utf-8"
+ th:src="@{/plugin/beditor/ueditor.config.js}"></script>
+ <script type="text/javascript" charset="utf-8"
+ th:src="@{/plugin/beditor/ueditor.all.js}">
+ </script>
+ <script type="text/javascript" charset="utf-8"
+ th:src="@{/plugin/beditor/lang/zh-cn/zh-cn.js}"></script>
+
<style type="text/css">
#projBox {
max-height: 400px;
@@ -58,10 +58,10 @@
th:value="${obj?.title }" datatype="*" nullmsg="标题不能为空">
</div>
<div class="Validform_checktip"></div>
- <label class="col-sm-2 control-label">排序<span class="text-danger">*</span></label>
+ <label class="col-sm-2 control-label">排序</label>
<div class="col-sm-3">
<input autocomplete="off" type="text" class="form-control" name="sort"
- th:value="${obj?.sort }" datatype="n" nullmsg="序号不能为空"
+ th:value="${obj?.sort }" datatype="n" ignore="ignore"
errormsg="序号只能为数字">
</div>
<div class="Validform_checktip"></div>
@@ -86,10 +86,16 @@
<div class="col-sm-3">
<div th:if="${obj ne null }" class="checkbox checkbox-inline">
- <input autocomplete="off" name="isPublish" type="radio" id="inlineCheckbox1" value="是" >
+
+ <input autocomplete="off" th:if="${obj.isPublish eq '是' }" checked name="isPublish" type="radio" id="inlineCheckbox1" value="是" >
+ <input autocomplete="off" th:if="${obj.isPublish eq '否' }" name="isPublish" type="radio" id="inlineCheckbox1" value="是" >
<label for="inlineCheckbox1">是 </label>
- <input autocomplete="off" name="isPublish" type="radio" id="inlineCheckbox2" value="否">
+
+ <input autocomplete="off" th:if="${obj.isPublish eq '是' }" name="isPublish" type="radio" id="inlineCheckbox2" value="否">
+ <input autocomplete="off" th:if="${obj.isPublish eq '否' }" checked name="isPublish" type="radio" id="inlineCheckbox2" value="否">
<label for="inlineCheckbox2">否 </label>
+
+
</div>
<div th:if="${obj eq null }" class="checkbox checkbox-inline">
@@ -105,30 +111,11 @@
<div class="form-group">
<label class="col-sm-2 control-label">文章内容</label>
<div class="col-sm-8">
- <textarea name="content" id="artcontent" th:text="${obj?.content}">
-
- </textarea>
+ <script style="width: 100%; height: 500px" id="artcontent" name="content"
+ type="text/plain" th:utext="${obj?.content}" ></script>
</div>
<div class="Validform_checktip"></div>
</div>
- <!--
- <div class="form-group">
- <label class="col-sm-2 control-label">上传图片</label>
- <div class="col-sm-9">
- <input autocomplete="off" onclick="MTools.chooesFile('#fileText')"
- class="input-text upload-url radius form-control" type="text" id="showFileName"
- readonly style="width: 30%;display: inline;">
- <a onclick="MTools.chooesFile('#fileText')" class="btn btn-success radius">
- <i class="fa fa-cloud-upload"></i> 浏览文件 </a>
- <input autocomplete="off" type="button" class='btn btn-success radius'
- onclick="MTools.upFile('#submitBtn')" value="上传">
- <a id="selectInServices" class="btn btn-success radius">
- <i class="fa fa-cloud"></i> 远程图库
- </a>
- </div>
- </div> -->
-
-
<div class="form-group ">
<div class="col-sm-12 text-center">
@@ -143,11 +130,14 @@
<script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script>
<script th:inline="javascript">
var obj=[[${obj}]];
- var editor = null;
+
+ //百度编辑器
+ var ue = {};
+
var myForm=MForm.initForm({
invokeUrl:basePath+"/admin/article/addOrModify",
beforeSubmit:function(){
- editor.sync();
+
},
afterSubmit:function(){
parent.myGrid.serchData();
@@ -156,11 +146,10 @@
$(function() {
$(".select2").select2({'width':'100%'});
- MUI.createEdit("content", '100%', '400px', 'editor');
- MUI.openServiceImgSpace(function(url) {
- $("#img_1").attr("src", url).show();
- $("#hiddenImg").val(url);
- }, "#selectInServices");
+
+ //初始化编辑器
+ ue = UE.getEditor('artcontent');
+
initFunctionList();
});
@@ -185,7 +174,7 @@
function autoZy() {
- var text = editor.text();
+ var text = ue.getContentTxt();
$("#zy-input").val(text.substring(0, 100));
}
function cleanZy() {
--
Gitblit v1.9.1