mirror of
https://gitee.com/mingSoft/MCMS.git
synced 2026-05-07 01:00:35 +08:00
chore(deps): 更新项目依赖版本- 将 spring-boot-starter-parent 从 3.4.2 升级到 3.5.6
- 将项目版本从 6.0.3 升级到 6.1.0 - 更新 ms-base、ms-basic、ms-mdiy 和 store-client 依赖版本至 3.0.4 - 移除了 EditorFileVerifyAop 中的冗余版权注释 - 简化 UploadConfigBean 构造函数调用,移除多余的 null 参数 - 优化 CmsParserUtil 中的文件路径处理逻辑,去除多余的 File.separator - 移除了 CategoryAction 中的分页初始化代码 - 新增 ueditor 插件的完整 demo 页面文件 index.html
This commit is contained in:
12
pom.xml
12
pom.xml
@@ -5,12 +5,12 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.2</version>
|
||||
<version>3.5.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-mcms</artifactId>
|
||||
<version>6.0.3</version>
|
||||
<version>6.1.0</version>
|
||||
<name>${project.groupId}:${project.artifactId}</name>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
@@ -21,22 +21,22 @@
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-base</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>3.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-basic</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>3.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>ms-mdiy</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>3.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.mingsoft</groupId>
|
||||
<artifactId>store-client</artifactId>
|
||||
<version>3.0.3</version>
|
||||
<version>3.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
|
||||
@@ -158,7 +158,7 @@ public class BaseAction extends BaseFileAction {
|
||||
return new EditorStateBean(false, "上传涂鸦图片失败").toString();
|
||||
}
|
||||
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, file, null, true);
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, file, true);
|
||||
bean.setFileSize(bytes.length);
|
||||
bean.setFileName(file.getName());
|
||||
EditorStateBean state = new EditorStateBean();
|
||||
@@ -200,7 +200,7 @@ public class BaseAction extends BaseFileAction {
|
||||
continue;
|
||||
}
|
||||
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, file, null, true);
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, file, true);
|
||||
bean.setFileSize(file.getSize());
|
||||
bean.setFileName(file.getName());
|
||||
|
||||
@@ -236,7 +236,7 @@ public class BaseAction extends BaseFileAction {
|
||||
return new EditorStateBean(false, getResString("err.error", getResString("file.name"))).toString();
|
||||
}
|
||||
// 组装uploadConfigBean上传使用
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, upfile, null, true);
|
||||
UploadConfigBean bean = new UploadConfigBean(uploadPath, upfile, true);
|
||||
bean.setFileSize(upfile.getSize());
|
||||
bean.setFileName(upfile.getOriginalFilename());
|
||||
try {
|
||||
|
||||
@@ -83,7 +83,6 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
|
||||
@PostMapping(value="/list")
|
||||
@ResponseBody
|
||||
public ResultData list(@ModelAttribute @Parameter(hidden = true) CategoryEntity category) {
|
||||
BasicUtil.startPage();
|
||||
category.setSqlWhere("");
|
||||
List categoryList = categoryBiz.query(category);
|
||||
return ResultData.build().success(new EUListBean(categoryList,(int)BasicUtil.endPage(categoryList).getTotal()));
|
||||
|
||||
@@ -1,24 +1,3 @@
|
||||
/**
|
||||
* The MIT License (MIT)
|
||||
* Copyright (c) 2012-present 铭软科技(mingsoft.net)
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
* <p>
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
* <p>
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.mingsoft.cms.aop;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
@@ -163,7 +163,7 @@ public class CmsParserUtil {
|
||||
columnListPath = ParserUtil.buildHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.INDEX, htmlDir, parserParams.get(ParserUtil.APP_DIR).toString());
|
||||
// 设置分页的起始位置
|
||||
page.setPageNo(pageNo);
|
||||
String read = ParserUtil.rendering(File.separator + column.getCategoryListUrl(), parserParams);
|
||||
String read = ParserUtil.rendering(column.getCategoryListUrl(), parserParams);
|
||||
FileUtil.writeString(read, columnListPath, Const.UTF8);
|
||||
|
||||
} else {
|
||||
@@ -181,7 +181,7 @@ public class CmsParserUtil {
|
||||
}
|
||||
// 设置分页的起始位置
|
||||
page.setPageNo(pageNo);
|
||||
String read = ParserUtil.rendering(File.separator + column.getCategoryListUrl(), parserParams);
|
||||
String read = ParserUtil.rendering(column.getCategoryListUrl(), parserParams);
|
||||
FileUtil.writeString(read, columnListPath, Const.UTF8);
|
||||
pageNo++;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4.0 KiB |
175
src/main/webapp/static/plugins/ueditor/1.4.3.3/index.html
Normal file
175
src/main/webapp/static/plugins/ueditor/1.4.3.3/index.html
Normal file
@@ -0,0 +1,175 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>完整demo</title>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
|
||||
<script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>
|
||||
<!--建议手动加在语言,避免在ie下有时因为加载语言失败导致编辑器加载失败-->
|
||||
<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型,比如你在配置项目里配置的是英文,这里加载的中文,那最后就是中文-->
|
||||
<script type="text/javascript" charset="utf-8" src="lang/zh-cn/zh-cn.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
div{
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>完整demo</h1>
|
||||
<script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
|
||||
</div>
|
||||
<div id="btns">
|
||||
<div>
|
||||
<button onclick="getAllHtml()">获得整个html的内容</button>
|
||||
<button onclick="getContent()">获得内容</button>
|
||||
<button onclick="setContent()">写入内容</button>
|
||||
<button onclick="setContent(true)">追加内容</button>
|
||||
<button onclick="getContentTxt()">获得纯文本</button>
|
||||
<button onclick="getPlainTxt()">获得带格式的纯文本</button>
|
||||
<button onclick="hasContent()">判断是否有内容</button>
|
||||
<button onclick="setFocus()">使编辑器获得焦点</button>
|
||||
<button onmousedown="isFocus(event)">编辑器是否获得焦点</button>
|
||||
<button onmousedown="setblur(event)" >编辑器失去焦点</button>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="getText()">获得当前选中的文本</button>
|
||||
<button onclick="insertHtml()">插入给定的内容</button>
|
||||
<button id="enable" onclick="setEnabled()">可以编辑</button>
|
||||
<button onclick="setDisabled()">不可编辑</button>
|
||||
<button onclick=" UE.getEditor('editor').setHide()">隐藏编辑器</button>
|
||||
<button onclick=" UE.getEditor('editor').setShow()">显示编辑器</button>
|
||||
<button onclick=" UE.getEditor('editor').setHeight(300)">设置高度为300默认关闭了自动长高</button>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button onclick="getLocalData()" >获取草稿箱内容</button>
|
||||
<button onclick="clearLocalData()" >清空草稿箱</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<button onclick="createEditor()">
|
||||
创建编辑器</button>
|
||||
<button onclick="deleteEditor()">
|
||||
删除编辑器</button>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
//实例化编辑器
|
||||
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
|
||||
var ue = UE.getEditor('editor');
|
||||
|
||||
|
||||
function isFocus(e){
|
||||
alert(UE.getEditor('editor').isFocus());
|
||||
UE.dom.domUtils.preventDefault(e)
|
||||
}
|
||||
function setblur(e){
|
||||
UE.getEditor('editor').blur();
|
||||
UE.dom.domUtils.preventDefault(e)
|
||||
}
|
||||
function insertHtml() {
|
||||
var value = prompt('插入html代码', '');
|
||||
UE.getEditor('editor').execCommand('insertHtml', value)
|
||||
}
|
||||
function createEditor() {
|
||||
enableBtn();
|
||||
UE.getEditor('editor');
|
||||
}
|
||||
function getAllHtml() {
|
||||
alert(UE.getEditor('editor').getAllHtml())
|
||||
}
|
||||
function getContent() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.getContent()方法可以获得编辑器的内容");
|
||||
arr.push("内容为:");
|
||||
arr.push(UE.getEditor('editor').getContent());
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function getPlainTxt() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
|
||||
arr.push("内容为:");
|
||||
arr.push(UE.getEditor('editor').getPlainTxt());
|
||||
alert(arr.join('\n'))
|
||||
}
|
||||
function setContent(isAppendTo) {
|
||||
var arr = [];
|
||||
arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
|
||||
UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function setDisabled() {
|
||||
UE.getEditor('editor').setDisabled('fullscreen');
|
||||
disableBtn("enable");
|
||||
}
|
||||
|
||||
function setEnabled() {
|
||||
UE.getEditor('editor').setEnabled();
|
||||
enableBtn();
|
||||
}
|
||||
|
||||
function getText() {
|
||||
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
|
||||
var range = UE.getEditor('editor').selection.getRange();
|
||||
range.select();
|
||||
var txt = UE.getEditor('editor').selection.getText();
|
||||
alert(txt)
|
||||
}
|
||||
|
||||
function getContentTxt() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
|
||||
arr.push("编辑器的纯文本内容为:");
|
||||
arr.push(UE.getEditor('editor').getContentTxt());
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function hasContent() {
|
||||
var arr = [];
|
||||
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
|
||||
arr.push("判断结果为:");
|
||||
arr.push(UE.getEditor('editor').hasContents());
|
||||
alert(arr.join("\n"));
|
||||
}
|
||||
function setFocus() {
|
||||
UE.getEditor('editor').focus();
|
||||
}
|
||||
function deleteEditor() {
|
||||
disableBtn();
|
||||
UE.getEditor('editor').destroy();
|
||||
}
|
||||
function disableBtn(str) {
|
||||
var div = document.getElementById('btns');
|
||||
var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
|
||||
for (var i = 0, btn; btn = btns[i++];) {
|
||||
if (btn.id == str) {
|
||||
UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
|
||||
} else {
|
||||
btn.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
}
|
||||
function enableBtn() {
|
||||
var div = document.getElementById('btns');
|
||||
var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
|
||||
for (var i = 0, btn; btn = btns[i++];) {
|
||||
UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
|
||||
}
|
||||
}
|
||||
|
||||
function getLocalData () {
|
||||
alert(UE.getEditor('editor').execCommand( "getlocaldata" ));
|
||||
}
|
||||
|
||||
function clearLocalData () {
|
||||
UE.getEditor('editor').execCommand( "clearlocaldata" );
|
||||
alert("已清空草稿箱")
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user