This commit is contained in:
高久奇 2021-12-17 18:04:05 +08:00
parent 4269ea2894
commit d7e54c9d87
7 changed files with 155 additions and 114 deletions

File diff suppressed because one or more lines are too long

View File

@ -1003,6 +1003,8 @@ function _mediaImg(blankPath, attrs) {
return html; return html;
} }
function _tmpl(str, data) { function _tmpl(str, data) {
var fn = new Function("obj", var fn = new Function("obj",
"var p=[],print=function(){p.push.apply(p,arguments);};" + "var p=[],print=function(){p.push.apply(p,arguments);};" +
@ -2688,6 +2690,9 @@ function _isEmptyNode(knode) {
} }
return knode.html().replace(/<[^>]+>/g, '') === ''; return knode.html().replace(/<[^>]+>/g, '') === '';
} }
function _mergeWrapper(a, b) { function _mergeWrapper(a, b) {
a = a.clone(true); a = a.clone(true);
var lastA = _getInnerNode(a), childA = a, merged = false; var lastA = _getInnerNode(a), childA = a, merged = false;
@ -4826,6 +4831,7 @@ function _addBookmarkToStack(stack, bookmark) {
} }
} }
function _undoToRedo(fromStack, toStack) { function _undoToRedo(fromStack, toStack) {
var self = this, edit = self.edit, var self = this, edit = self.edit,
body = edit.doc.body, body = edit.doc.body,
@ -6656,6 +6662,7 @@ KindEditor.plugin('clearhtml', function(K) {
* @licence http://www.kindsoft.net/license.php * @licence http://www.kindsoft.net/license.php
*******************************************************************************/ *******************************************************************************/
KindEditor.plugin('code', function(K) { KindEditor.plugin('code', function(K) {
var self = this, name = 'code'; var self = this, name = 'code';
self.clickToolbar(name, function() { self.clickToolbar(name, function() {

View File

@ -968,6 +968,8 @@ function _mediaImg(blankPath, attrs) {
return html; return html;
} }
function _tmpl(str, data) { function _tmpl(str, data) {
var fn = new Function("obj", var fn = new Function("obj",
"var p=[],print=function(){p.push.apply(p,arguments);};" + "var p=[],print=function(){p.push.apply(p,arguments);};" +
@ -2653,6 +2655,9 @@ function _isEmptyNode(knode) {
} }
return knode.html().replace(/<[^>]+>/g, '') === ''; return knode.html().replace(/<[^>]+>/g, '') === '';
} }
function _mergeWrapper(a, b) { function _mergeWrapper(a, b) {
a = a.clone(true); a = a.clone(true);
var lastA = _getInnerNode(a), childA = a, merged = false; var lastA = _getInnerNode(a), childA = a, merged = false;
@ -4791,6 +4796,7 @@ function _addBookmarkToStack(stack, bookmark) {
} }
} }
function _undoToRedo(fromStack, toStack) { function _undoToRedo(fromStack, toStack) {
var self = this, edit = self.edit, var self = this, edit = self.edit,
body = edit.doc.body, body = edit.doc.body,
@ -5411,6 +5417,9 @@ KEditor.prototype = {
if (_IE && self.cmd) { if (_IE && self.cmd) {
self.cmd.select(); self.cmd.select();
} }
console.log(e)
e.preventDefault();
$(".ui-tooltip").remove()
} }
}); });
options.noBtn = _undef(options.noBtn, { options.noBtn = _undef(options.noBtn, {
@ -5420,6 +5429,7 @@ KEditor.prototype = {
if (_IE && self.cmd) { if (_IE && self.cmd) {
self.cmd.select(); self.cmd.select();
} }
$(".ui-tooltip").remove()
} }
}); });
if (self.dialogAlignType != 'page') { if (self.dialogAlignType != 'page') {
@ -6297,6 +6307,7 @@ KindEditor.plugin('anchor', function(K) {
yesBtn : { yesBtn : {
name : self.lang('yes'), name : self.lang('yes'),
click : function(e) { click : function(e) {
$(".ui-tooltip").remove()
self.insertHtml('<a name="' + nameBox.val() + '">').hideDialog().focus(); self.insertHtml('<a name="' + nameBox.val() + '">').hideDialog().focus();
} }
} }
@ -6620,6 +6631,7 @@ KindEditor.plugin('clearhtml', function(K) {
* @licence http://www.kindsoft.net/license.php * @licence http://www.kindsoft.net/license.php
*******************************************************************************/ *******************************************************************************/
KindEditor.plugin('code', function(K) { KindEditor.plugin('code', function(K) {
var self = this, name = 'code'; var self = this, name = 'code';
self.clickToolbar(name, function() { self.clickToolbar(name, function() {

View File

@ -221,7 +221,7 @@
var editFlag = "[[${@perms.hasPerm('cases-h5')}]]"; var editFlag = "[[${@perms.hasPerm('cases-h5')}]]";
var delFlag = "[[${@perms.hasPerm('cases-h5')}]]"; var delFlag = "[[${@perms.hasPerm('cases-h5')}]]";
var columns = [ var columns = [
{checkbox: true }, {checkbox: true},
{field: 'id', title: '案例编号', align : "center"}, {field: 'id', title: '案例编号', align : "center"},
//{field: 'title', title: '标题', align : "center", width: "155"}, //{field: 'title', title: '标题', align : "center", width: "155"},
{field: 'title', title: '标题', align : "center", formatter: function(value, row, index) { {field: 'title', title: '标题', align : "center", formatter: function(value, row, index) {

View File

@ -92,6 +92,18 @@
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-sm-2 control-label">附件:</label>
<div class="col-sm-2">
<label class="btn btn-info" for="attachment_file" style="color:white;vertical-align:top;">上传</label>
<input type="file" id="attachment_file" name="file" style="display: none;">
<input type="hidden" id="attachment" name="attachment" th:value="${attachment}" style="display: none;">
<div style="height: 20px; line-height: 20px;">
<a class="a_viewfile" href="javascript:;" target="_blank" title="点击下载" style="height: 34px; line-height: 34px;"></a>
</div>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-2 control-label"><font color="red">*</font> 封面图:</label> <label class="col-sm-2 control-label"><font color="red">*</font> 封面图:</label>
<div class="col-sm-2"> <div class="col-sm-2">
@ -101,16 +113,6 @@
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
<span><img style="display:none;" id="img_listicon" th:src="${listicon}" width="70px" height="70px"></span> <span><img style="display:none;" id="img_listicon" th:src="${listicon}" width="70px" height="70px"></span>
</div> </div>
<label class="col-sm-5 control-label">附件:</label>
<div class="col-sm-2">
<label class="btn btn-info" for="attachment_file" style="color:white;vertical-align:top;">上传</label>
<input type="file" id="attachment_file" name="file" style="display: none;">
<input type="hidden" id="attachment" name="attachment" th:value="${attachment}" style="display: none;">
<div style="height: 20px; line-height: 20px;">
<a class="a_viewfile" href="javascript:;" target="_blank" title="点击下载" style="height: 34px; line-height: 34px;"></a>
</div>
</div>
</div> </div>
<!--<div class="form-group img-group" style="display: '';"> <!--<div class="form-group img-group" style="display: '';">
@ -158,7 +160,7 @@
<script th:inline="javascript"> <script th:inline="javascript">
var caseType = [[${caseType}]]; var caseType = [[${caseType}]];
</script> </script>
<script charset="utf-8" type="text/javascript" th:src="@{/libs/kindeditor/kindeditor-all-custom-min.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{/libs/kindeditor/kindeditor-all.js}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/libs/kindeditor/lang/zh-CN.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{/libs/kindeditor/lang/zh-CN.js}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/libs/jquery.form/jquery.form.min.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{/libs/jquery.form/jquery.form.min.js}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{/js/cases/content.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{/js/cases/content.js}"></script>
@ -178,10 +180,28 @@ var caseType = [[${caseType}]];
afterUpload: function(){this.sync();}, // 图片上传后将上传内容同步到textarea中 afterUpload: function(){this.sync();}, // 图片上传后将上传内容同步到textarea中
afterBlur: function(){this.sync();}, // 失去焦点时将上传内容同步到textarea中 afterBlur: function(){this.sync();}, // 失去焦点时将上传内容同步到textarea中
afterCreate: function(){ afterCreate: function(){
console.log("xxx")
console.log($( ".ke-dialog-content" ))
$( ".ke-dialog-simple" ).tooltip( "disable" );
$( ".ke-dialog" ).tooltip( "disable" );
$( ".ke-dialog" ).tooltip({
disabled: true
});
$( ".ke-dialog" ).tooltip( "option", "hide" );
// $(".ke-toolbar").tooltip();
// console.log('after Create'); // console.log('after Create');
// let _styles = '<style> .ke-content img{max-width:100%;} </style>' // let _styles = '<style> .ke-content img{max-width:100%;} </style>'
// $(".ke-edit-iframe").contents().find("body").append(_styles); // $(".ke-edit-iframe").contents().find("body").append(_styles);
}, },
afterDialogCreate: function (){
console.log($(".ke-dialog-icon-close"))
$(".ke-dialog-icon-close").bind("click",function(){
alert("我的id为text你点击时触发");
});
// $(".ke-dialog-icon-close").click(function (){
// alert("jjsjjs")
// })
},
resizeMode: 1 resizeMode: 1
}); });
// editor.ready(function() { // editor.ready(function() {
@ -287,7 +307,6 @@ var caseType = [[${caseType}]];
// 上传附件 // 上传附件
function uploadAttrFile() { function uploadAttrFile() {
alert(111)
$('#newsForm').ajaxSubmit({ $('#newsForm').ajaxSubmit({
url: '[[@{/console/tool/oss/uploadFile}]]?category=attachment&caseType=[[${caseType}]]', url: '[[@{/console/tool/oss/uploadFile}]]?category=attachment&caseType=[[${caseType}]]',
type: 'post', type: 'post',
@ -474,7 +493,6 @@ var caseType = [[${caseType}]];
if($("#result").val() > 0){ if($("#result").val() > 0){
$("#btn_save").hide(); $("#btn_save").hide();
} }
initLoad(); initLoad();
$('#tagNames').tagsInput({ $('#tagNames').tagsInput({
@ -622,4 +640,12 @@ var caseType = [[${caseType}]];
-webkit-box-pack: justify; -webkit-box-pack: justify;
justify-content: space-between;!important; justify-content: space-between;!important;
} }
.btn-info{
background-color: #48a4f7!important;
border-color: #48a4f7!important;
}
</style> </style>

View File

@ -220,7 +220,7 @@
var editFlag = "[[${@perms.hasPerm('cases-h5')}]]"; var editFlag = "[[${@perms.hasPerm('cases-h5')}]]";
var delFlag = "[[${@perms.hasPerm('cases-h5')}]]"; var delFlag = "[[${@perms.hasPerm('cases-h5')}]]";
var columns = [ var columns = [
{checkbox: true }, {checkbox: true},
{field: 'id', title: '案例编号', align : "center"}, {field: 'id', title: '案例编号', align : "center"},
//{field: 'title', title: '标题', align : "left", width: "155"}, //{field: 'title', title: '标题', align : "left", width: "155"},
{field: 'title', title: '标题', align : "center", formatter: function(value, row, index) { {field: 'title', title: '标题', align : "center", formatter: function(value, row, index) {

View File

@ -17,7 +17,7 @@
<link rel="stylesheet" th:href="@{/libs/treegrid/jquery.treegrid.css}"/> <link rel="stylesheet" th:href="@{/libs/treegrid/jquery.treegrid.css}"/>
<link rel="stylesheet" th:href="@{/libs/ztree/css/ztree-bootstrap.css}"/> <link rel="stylesheet" th:href="@{/libs/ztree/css/ztree-bootstrap.css}"/>
<!-- tagsinput引用css --> <!-- tagsinput引用css -->
<link rel="stylesheet" th:href="@{https://s0.pstatp.com/cdn/expire-1-M/jqueryui/1.12.1/jquery-ui.min.css}"/> <link rel="stylesheet" th:href="@{/libs/jquery.ui/jquery-ui.min.css}"/>
<link rel="stylesheet" th:href="@{https://s0.pstatp.com/cdn/expire-1-M/jquery-tagsinput/1.3.6/jquery.tagsinput.min.css}"/> <link rel="stylesheet" th:href="@{https://s0.pstatp.com/cdn/expire-1-M/jquery-tagsinput/1.3.6/jquery.tagsinput.min.css}"/>
<!-- <link rel="stylesheet" th:href="@{https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css}"/>--> <!-- <link rel="stylesheet" th:href="@{https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css}"/>-->
<link rel="stylesheet" th:href="@{/libs/select2/select2.min.css}"/> <link rel="stylesheet" th:href="@{/libs/select2/select2.min.css}"/>
@ -47,17 +47,13 @@
<script th:src="@{/libs/ztree/js/jquery.ztree.excheck.js}"></script> <script th:src="@{/libs/ztree/js/jquery.ztree.excheck.js}"></script>
<script th:src="@{/libs/ztree/js/jquery.ztree.exedit.js}"></script> <script th:src="@{/libs/ztree/js/jquery.ztree.exedit.js}"></script>
<!-- tagsinput引用JS --> <!-- tagsinput引用JS -->
<script charset="utf-8" type="text/javascript" th:src="@{https://s0.pstatp.com/cdn/expire-1-M/jqueryui/1.12.1/jquery-ui.min.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{/libs/jquery.ui/jquery-ui.min.js}"></script>
<script charset="utf-8" type="text/javascript" th:src="@{https://s0.pstatp.com/cdn/expire-1-M/jquery-tagsinput/1.3.6/jquery.tagsinput.min.js}"></script> <script charset="utf-8" type="text/javascript" th:src="@{https://s0.pstatp.com/cdn/expire-1-M/jquery-tagsinput/1.3.6/jquery.tagsinput.min.js}"></script>
<!-- 引入 echarts.js --> <!-- 引入 echarts.js -->
<script th:src="@{https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js}"></script> <script th:src="@{https://cdn.jsdelivr.net/npm/echarts@5.2.2/dist/echarts.min.js}"></script>
<script th:src="@{/js/core.js}"></script> <script th:src="@{/js/core.js}"></script>
</head> </head>
<style>
.ui-tooltip{
display: none !important;
}
</style>
<body class="hold-transition skin-blue-light sidebar-mini fixed" onhashchange="loadContent()"> <body class="hold-transition skin-blue-light sidebar-mini fixed" onhashchange="loadContent()">
<div class="wrapper"> <div class="wrapper">
<div th:replace="fragments/navbar :: navbar"></div> <div th:replace="fragments/navbar :: navbar"></div>