diff --git a/blog-admin/src/main/resources/static/assets/js/zhyd.core.js b/blog-admin/src/main/resources/static/assets/js/zhyd.core.js index 2e405d4f2118b0e13474c12a211fef57e0da4495..3a336a1f33569c34c678777106227019b29cd9fa 100644 --- a/blog-admin/src/main/resources/static/assets/js/zhyd.core.js +++ b/blog-admin/src/main/resources/static/assets/js/zhyd.core.js @@ -1,25 +1,4 @@ /** - * MIT License - * - * Copyright (c) 2018 yadong.zhang - * - * 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: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * 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. * * 项目核心Js类,负责项目前端模板方面的初始化等操作 * @@ -32,237 +11,6 @@ var editor = null, simplemde = null; var zhyd = window.zhyd || { - initSidebar: function () { - var a = function () { - $RIGHT_COL.css("min-height", $(window).height()); - var a = $BODY.outerHeight(), - b = $BODY.hasClass("footer_fixed") ? -10 : $FOOTER.height(), - c = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(), - d = a < c ? c : a; - d -= $NAV_MENU.height() + b, $RIGHT_COL.css("min-height", d) - }; - $SIDEBAR_MENU.find("a").on("click", function (b) { - var c = $(this).parent(); - c.is(".active") ? (c.removeClass("active active-sm"), $("ul:first", c).slideUp(function () { - a() - })) : (c.parent().is(".child_menu") ? $BODY.is(".nav-sm") && ($SIDEBAR_MENU.find("li").removeClass("active active-sm"), $SIDEBAR_MENU.find("li ul").slideUp()) : ($SIDEBAR_MENU.find("li").removeClass("active active-sm"), $SIDEBAR_MENU.find("li ul").slideUp()), c.addClass("active"), $("ul:first", c).slideDown(function () { - a() - })) - }), $MENU_TOGGLE.on("click", function () { - $BODY.hasClass("nav-md") ? ($SIDEBAR_MENU.find("li.active ul").hide(), $SIDEBAR_MENU.find("li.active").addClass("active-sm").removeClass("active")) : ($SIDEBAR_MENU.find("li.active-sm ul").show(), $SIDEBAR_MENU.find("li.active-sm").addClass("active").removeClass("active-sm")), $BODY.toggleClass("nav-md nav-sm"), a() - }), $SIDEBAR_MENU.find('a[href="' + CURRENT_URL + '"]').parent("li").addClass("current-page"), $SIDEBAR_MENU.find("a").filter(function () { - return this.href == CURRENT_URL - }).parent("li").addClass("current-page").parents("ul").slideDown(function () { - a() - }).parent().addClass("active"), $(window).smartresize(function () { - a() - }), a(), $.fn.mCustomScrollbar && $(".menu_fixed").mCustomScrollbar({ - autoHideScrollbar: !0, - theme: "minimal", - mouseWheel: { - preventDefault: !0 - } - }) - }, - initDaterangepicker: function () { - $('.myDatepicker').datetimepicker({ - format: 'YYYY-MM-DD HH:mm:ss', - ignoreReadonly: true, - allowInputToggle: true - }); - }, - initValidator: function () { - "undefined" != typeof validator && (console.log("zhyd.initValidator"), validator.message.date = "not a real date", $("form").on("blur", "input[required], input.optional, select.required", validator.checkField).on("change", "select.required", validator.checkField).on("keypress", "input[required][pattern]", validator.keypress), $(".multi.required").on("keyup blur", "input", function () { - validator.checkField.apply($(this).siblings().last()[0]) - }), $("form").submit(function (a) { - a.preventDefault(); - var b = !0; - return validator.checkAll($(this)) || (b = !1), b && this.submit(), !1 - })); - }, - initHelloMsg: function () { - var $helloMsg = $("#hello_msg"); - var now = new Date(); - var nowHours = now.getHours(); - $helloMsg.html((nowHours >= 0 && nowHours <= 5) ? "凌晨好" : (nowHours > 5 && nowHours <= 9) ? "早上好" : ((nowHours > 9 && nowHours <= 12) ? "上午好" : ((nowHours > 12 && nowHours <= 13) ? "中午好" : ((nowHours > 13 && nowHours <= 18) ? "下午好" : "晚上好")))); - }, - initWangEditor: function (options) { - // 全屏插件 - window.wangEditor.fullscreen = { - init: function (editorSelector) { - $(editorSelector + " .w-e-toolbar").append('
') - }, - toggleFullscreen: function (editorSelector) { - $(editorSelector).toggleClass('fullscreen-editor'); - var $a = $(editorSelector + ' ._wangEditor_btn_fullscreen'); - var $i = $a.find("i:first-child"); - if ($i.hasClass("fa-expand")) { - $a.attr("data-original-title", "退出全屏"); - $i.removeClass("fa-expand").addClass("fa-compress") - } else { - $a.attr("data-original-title", "全屏编辑"); - $i.removeClass("fa-compress").addClass("fa-expand") - } - } - }; - var $op = $.extend({ - id: "wangEditor", - contentId: "content", - uploadUrl: "", - uploadFileName: "file" - }, options); - var E = window.wangEditor; - editor = new E('#' + $op.id); - // 关闭粘贴样式的过滤 - editor.customConfig.pasteFilterStyle = false; - editor.customConfig.zIndex = 100; - - var $content = $('#' + $op.contentId); - editor.customConfig.onchange = function (html) { - // 监控变化,同步更新到 textarea - $content.val(html); - }; - - if ($op.uploadUrl) { - // 上传图片到服务器 - editor.customConfig.uploadImgServer = $op.uploadUrl; - editor.customConfig.uploadFileName = 'file'; - // 将图片大小限制为 5M - editor.customConfig.uploadImgMaxSize = 5 * 1024 * 1024; - editor.customConfig.customAlert = function (info) { - // info 是需要提示的内容 - $.alert.error(info); - }; - editor.customConfig.uploadImgHooks = { - error: function (xhr, editor) { - $.alert.error("图片上传出错"); - }, - timeout: function (xhr, editor) { - $.alert.error("请求超时"); - }, - customInsert: function (insertImg, result, editor) { - // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!) - // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果 - console.log('customInsert:' + insertImg, result, editor); - if (result.status == 200) { - console.log(result.data); - var imgFullPath = appConfig.qiniuPath + result.data + appConfig.qiniuImgStyle; - editor.txt.append(''); - // 解决上传完图片如果未进行其他操作,则不会触发编辑器的“change”事件,导致实际文章内容中缺少最后上传的图片文件 2018-07-13 - $content.val(editor.txt.html()); - } else { - $.alert.error(result.message); - } - } - }; - } - editor.create(); - E.fullscreen.init('#' + $op.id); - // 修改编辑器大小 - editor.$textContainerElem.css('max-height', '115px').css('height', '100%'); - }, - initMdEditor: function (options) { - var $op = $.extend({ - id: "mdEditor", - uniqueId: "mdEditor_1", - uploadUrl: "" - }, options); - // js实现aop切面编程,实时保存文章内容 - Function.prototype.after = function (afterfn) { - var __self = this; - //保存原函数的引用 - return function () { - //返回包含了原函数和新函数的"代理"函数 - afterfn.apply(this, arguments);//(1) - //执行新函数,且保证this不被劫持,新函数接受的参数 - //也会被原封不动地传入原函数,新函数在原函数之前执行 - return __self.apply(this, arguments);//(2) - //执行原函数并返回原函数的执行结果 - //并且保证this不被劫持 - } - }; - var showMsg = function () { - var $div = $('
'); - $div.css({ - 'position': 'absolute', - 'right': '10px', - 'top': 0, - 'padding': '5px', - 'font-size': '12px', - 'color': '#ccc', - 'opacity': 0 - }); - $div.html("自动保存完成"); - $div.appendTo($(".CodeMirror")); - $div.animate({opacity: 1}, 1000, function () { - $div.animate({opacity: 0}, 1000, function () { - $(this).remove(); - }) - }) - }; - SimpleMDE.prototype.autosave = SimpleMDE.prototype.autosave.after(showMsg); - - // Powered by https://github.com/sparksuite/simplemde-markdown-editor - simplemde = new SimpleMDE({ - // textarea的DOM对象 - element: document.getElementById($op.id), - // 自动下载FontAwesome,设为false为不下载(如果设为false则必须手动引入) - autoDownloadFontAwesome: false, - // 自动聚焦输入框 - autofocus: true, - // 是否自动保存正在编写的文本 - autosave: { - // 启用自动保存功能 - enabled: true, - // 自动保存的间隔,以毫秒为单位。默认为10000(10s) - delay: 15000, - // 唯一的字符串标识符(保证每个SimpleMDE编辑器的uniqueId唯一) - uniqueId: $op.uniqueId, - msg: "自动保存成功了" - }, - placeholder: "请输入文本内容", - // 如果设置为true,则会出现JS警报窗口,询问链接或图像URL(插入图片或链接弹窗)。默认为false - promptURLs: true, - renderingConfig: { - // 如果设置为true,将使用highlight.js高亮显示。默认为false - codeSyntaxHighlighting: true - }, - showIcons: ["code", "table", "clean-block", "horizontal-rule"], - tabSize: 4, - // 编辑器底部的状态栏 - status: true, - status: ["autosave", "lines", "words", "cursor"], // Optional usage - status: ["autosave", "lines", "words", "cursor", { - className: "keystrokes", - defaultValue: function (el) { - this.keystrokes = 0; - el.innerHTML = "0 Keystrokes"; - }, - onUpdate: function (el) { - el.innerHTML = ++this.keystrokes + " Keystrokes"; - } - }] - - }); - var $fullscreen = $(".editor-toolbar a.fa-arrows-alt, .editor-toolbar a.fa-columns"); - $fullscreen.click(function () { - var $this = $(this); - if ($fullscreen.hasClass("active")) { - $(".CodeMirror, .CodeMirror-scroll").css('max-height', 'none'); - } else { - $(".CodeMirror, .CodeMirror-scroll").css('max-height', '200px'); - } - }); - if ($op.uploadUrl) { - inlineAttachment.editors.codemirror4.attach(simplemde.codemirror, { - uploadUrl: $op.uploadUrl - }); - } - $(".editor-preview-side").addClass("markdown-body"); - }, - /** - * 下拉框组件, 支持自动填充option - */ combox: { init: function () { $('select[target=combox]').each(function (e) { @@ -286,17 +34,6 @@ var zhyd = window.zhyd || { }) } }, - initSwitchery: function (delay) { - setTimeout(function () { - var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch')); - elems.forEach(function (html) { - var switchery = new Switchery(html, { - color: '#26B99A', - size: 'small' - }); - }); - }, delay || 0); - }, initCommentNotify: function () { $.ajax({ cache: false, @@ -359,103 +96,243 @@ var zhyd = window.zhyd || { if ($("#scrolldiv")) { $("#scrolldiv").textSlider({line: 1, speed: 300, timer: 10000}); } - } -}; + }, + wangEditor: { + _instance: window.wangEditor, + defaultConfig: { + container: "#editor", + textareaName: "content", + uploadUrl: "", + uploadFileName: "file", + uploadType: "", + customCss: {} -function gd(a, b, c) { - return new Date(a, b - 1, c).getTime() -} + }, + init: function (options) { + var config = $.extend(zhyd.wangEditor.defaultConfig, options); + var E = window.wangEditor; + editor = new E(config.container); + // 配置编辑器 start + // 关闭粘贴样式的过滤 + editor.customConfig.pasteFilterStyle = false; + editor.customConfig.zIndex = 100; + if(config.textareaName) { + $('').insertAfter($(config.container)); + } + var $contentBox = $('textarea[name=' + config.textareaName + ']'); + editor.customConfig.onchange = function (html) { + // 监控变化,同步更新到 textarea + $contentBox.val(html); + }; + // 注册上传文件插件 + zhyd.wangEditor.plugins.registerUpload(editor, config.uploadUrl, config.uploadFileName, config.uploadType, function(result, curEditor) { + // 图片上传并返回结果,自定义插入图片的事件(而不是编辑器自动插入图片!!!) + // insertImg 是插入图片的函数,editor 是编辑器对象,result 是服务器端返回的结果 + if (result.status == 200) { + var imgFullPath = appConfig.qiniuPath + result.data + appConfig.qiniuImgStyle; + curEditor.txt.append(''); + // 解决上传完图片如果未进行其他操作,则不会触发编辑器的“change”事件,导致实际文章内容中缺少最后上传的图片文件 2018-07-13 + $contentBox.val(editor.txt.html()); + } else { + $.alert.error(result.message); + } + }); + // 配置编辑器 end + editor.create(); + // 注册全屏插件 + zhyd.wangEditor.plugins.registerFullscreen(config.container); -!function (a, b) { - var c = function (a, b, c) { - var d; - return function () { - function h() { - c || a.apply(f, g), d = null + if(config.customCss) { + // 自定义编辑器的样式 + for (var key in config.customCss) { + var value = config.customCss[key]; + editor.$textContainerElem.css(key, value); + } } + }, + plugins: { + registerFullscreen: function () { + var E = zhyd.wangEditor._instance; + // 全屏插件 + E.fullscreen = { + init: function(editorBox) { + $(editorBox + " .w-e-toolbar").append('
') + }, + toggleFullscreen: function(editorSelector) { + $(editorSelector).toggleClass('fullscreen-editor'); + var $a = $(editorSelector + ' ._wangEditor_btn_fullscreen'); + var $i = $a.find("i:first-child"); + if ($i.hasClass("fa-expand")) { + $a.attr("data-original-title", "退出全屏"); + $i.removeClass("fa-expand").addClass("fa-compress") + } else { + $a.attr("data-original-title", "全屏编辑"); + $i.removeClass("fa-compress").addClass("fa-expand") + } + } + }; - var f = this, - g = arguments; - d ? clearTimeout(d) : c && a.apply(f, g), d = setTimeout(h, b || 100) + // 初始化全屏插件 + var n = arguments.length; + for(var i = 0; i < n; i ++){ + E.fullscreen.init(arguments[i]); + } + }, + registerUpload: function (editor, uploadUrl, uploadFileName, uploadType, callback) { + if (uploadUrl) { + // 上传图片到服务器 + editor.customConfig.uploadImgServer = uploadUrl; + editor.customConfig.uploadFileName = uploadFileName; + // 将图片大小限制为 50M + editor.customConfig.uploadImgMaxSize = 50 * 1024 * 1024; + // 超时时间 + editor.customConfig.uploadImgTimeout = 10000; + // 自定义上传参数 + editor.customConfig.uploadImgParams = { + // 如果版本 <=v3.1.0 ,属性值会自动进行 encode ,此处无需 encode + // 如果版本 >=v3.1.1 ,属性值不会自动 encode ,如有需要自己手动 encode + uploadType: uploadType + }; + editor.customConfig.customAlert = function (msg) { + $.alert.error(msg); + }; + editor.customConfig.uploadImgHooks = { + error: function (xhr, editor) { + $.alert.error("图片上传出错"); + }, + timeout: function (xhr, editor) { + $.alert.error("请求超时"); + }, + customInsert: function (insertImg, result, editor) { + if(callback) { + callback(result, editor); + } else { + console.log('upload callback:' + insertImg, result, editor); + } + } + }; + } + } } - }; - jQuery.fn[b] = function (a) { - return a ? this.bind("resize", c(a)) : this.trigger(b) - } -}(jQuery, "smartresize"); + }, + simpleMDE: { + defaultConfig: { + id: "mdEditor", + uploadUrl: "", + uploadType: "", + uniqueId: "mdEditor_1" + }, + init: function (options) { + var $op = $.extend(zhyd.wangEditor.defaultConfig, options); + zhyd.simpleMDE.plugins.registerAutosave(); + // Powered by https://github.com/sparksuite/simplemde-markdown-editor + simplemde = new SimpleMDE({ + // textarea的DOM对象 + element: document.getElementById($op.id), + // 自动下载FontAwesome,设为false为不下载(如果设为false则必须手动引入) + autoDownloadFontAwesome: false, + // 自动聚焦输入框 + autofocus: true, + // 是否自动保存正在编写的文本 + autosave: { + // 启用自动保存功能 + enabled: true, + // 自动保存的间隔,以毫秒为单位。默认为15000(15s) + delay: 15000, + // 唯一的字符串标识符(保证每个SimpleMDE编辑器的uniqueId唯一) + uniqueId: $op.uniqueId, + msg: "自动保存成功了" + }, + placeholder: "请输入文本内容", + // 如果设置为true,则会出现JS警报窗口,询问链接或图像URL(插入图片或链接弹窗)。默认为false + promptURLs: true, + renderingConfig: { + // 如果设置为true,将使用highlight.js高亮显示。默认为false + codeSyntaxHighlighting: true + }, + showIcons: ["code", "table", "clean-block", "horizontal-rule"], + tabSize: 4, + // 编辑器底部的状态栏 + status: true, + status: ["autosave", "lines", "words", "cursor"], // Optional usage + status: ["autosave", "lines", "words", "cursor", { + className: "keystrokes", + defaultValue: function (el) { + this.keystrokes = 0; + el.innerHTML = "0 Keystrokes"; + }, + onUpdate: function (el) { + el.innerHTML = ++this.keystrokes + " Keystrokes"; + } + }] -var CURRENT_URL = window.location.href.split("#")[0].split("?")[0], - $BODY = $("body"), - $MENU_TOGGLE = $("#menu_toggle"), - $SIDEBAR_MENU = $("#sidebar-menu"), - $SIDEBAR_FOOTER = $(".sidebar-footer"), - $LEFT_COL = $(".left_col"), - $RIGHT_COL = $(".right_col"), - $NAV_MENU = $(".nav_menu"), - $FOOTER = $("footer"), - randNum = function () { - return Math.floor(21 * Math.random()) + 20 - }; -$(document).ready(function () { - $(".collapse-link").on("click", function () { - var a = $(this).closest(".x_panel"), - b = $(this).find("i"), - c = a.find(".x_content"); - a.attr("style") ? c.slideToggle(200, function () { - a.removeAttr("style") - }) : (c.slideToggle(200), a.css("height", "auto")), b.toggleClass("fa-chevron-up fa-chevron-down") - }), $(".close-link").click(function () { - var a = $(this).closest(".x_panel"); - a.remove() - }); -}), $(document).ready(function () { - $('[data-toggle="tooltip"]').tooltip({ - container: "body" - }) -}), $(".progress .progress-bar")[0] && $(".progress .progress-bar").progressbar(), $(document).ready(function () { - if ($(".js-switch")[0]) { - var a = Array.prototype.slice.call(document.querySelectorAll(".js-switch")); - a.forEach(function (a) { - new Switchery(a, { - color: "#26B99A" - }) - }) + }); + + zhyd.simpleMDE.plugins.registerFullscreen(); + zhyd.simpleMDE.plugins.registerUpload($op.uploadUrl, simplemde); + + $(".editor-preview-side").addClass("markdown-body"); + }, + plugins: { + registerAutosave: function () { + // js实现aop切面编程,实时保存文章内容 + Function.prototype.after = function (afterfn) { + var __self = this; + //保存原函数的引用 + return function () { + //返回包含了原函数和新函数的"代理"函数 + afterfn.apply(this, arguments);//(1) + //执行新函数,且保证this不被劫持,新函数接受的参数 + //也会被原封不动地传入原函数,新函数在原函数之前执行 + return __self.apply(this, arguments);//(2) + //执行原函数并返回原函数的执行结果 + //并且保证this不被劫持 + } + }; + var showMsg = function () { + var $div = $('
'); + $div.css({ + 'position': 'absolute', + 'right': '10px', + 'top': 0, + 'padding': '5px', + 'font-size': '12px', + 'color': '#ccc', + 'opacity': 0 + }); + $div.html("自动保存完成"); + $div.appendTo($(".CodeMirror")); + $div.animate({opacity: 1}, 1000, function () { + $div.animate({opacity: 0}, 1000, function () { + $(this).remove(); + }) + }) + }; + SimpleMDE.prototype.autosave = SimpleMDE.prototype.autosave.after(showMsg); + }, + registerFullscreen: function () { + var $fullscreen = $(".editor-toolbar a.fa-arrows-alt, .editor-toolbar a.fa-columns"); + $fullscreen.click(function () { + var $this = $(this); + if ($fullscreen.hasClass("active")) { + $(".CodeMirror, .CodeMirror-scroll").css('max-height', 'none'); + } else { + $(".CodeMirror, .CodeMirror-scroll").css('max-height', '200px'); + } + }); + }, + registerUpload: function (uploadUrl, simplemde) { + if (uploadUrl) { + inlineAttachment.editors.codemirror4.attach(simplemde.codemirror, { + uploadUrl: uploadUrl + }); + } + } + } } -}), $(document).ready(function () { - $("input[type=checkbox], input[type=radio]").iCheck({ - checkboxClass: 'icheckbox_square-green', - radioClass: 'iradio_square-green', - increaseArea: '20%' // optional - }); -}); -"undefined" != typeof NProgress && ($(document).ready(function () { - NProgress.start() -}), $(window).load(function () { - NProgress.done() -})); -$(document).ready(function () { - // 工具提示 - $('[data-toggle="tooltip"]').tooltip(); - // 图片预览 - $(".showImage").fancybox(); - /* 自定义下拉 div */ - $(".custom-dropdown").on("click", function () { - var a = $(this).closest(".custom-panel"), - b = $(this).find("i"), - c = a.find(".custom-container"); - a.attr("style") ? c.slideToggle(200, function () { - a.removeAttr("style") - }) : (c.slideToggle(200), a.css("height", "auto")), b.toggleClass("fa-angle-double-up fa-angle-double-down") - }); +}; - $(".showContent").click(function () { - $(this).toggleClass('fa-plus-square fa-minus-square'); - $(".disable-content").slideToggle(400); - }); - zhyd.initDaterangepicker(); - zhyd.initValidator(); - zhyd.initSidebar(); - zhyd.initHelloMsg(); +$(document).ready(function () { zhyd.initCommentNotify(); zhyd.initTextSlider(); diff --git a/blog-admin/src/main/resources/static/assets/js/zhyd.upload-preview.js b/blog-admin/src/main/resources/static/assets/js/zhyd.upload-preview.js index cbb3083e3da340a9fbc3f4025c633980c6cd5432..7a3d2689e7578b9694b1974623dcddb62b2a5c50 100644 --- a/blog-admin/src/main/resources/static/assets/js/zhyd.upload-preview.js +++ b/blog-admin/src/main/resources/static/assets/js/zhyd.upload-preview.js @@ -1,25 +1,4 @@ /** - * MIT License - * - * Copyright (c) 2018 yadong.zhang - * - * 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: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * 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. * * 图片预览 * diff --git a/blog-admin/src/main/resources/static/assets/js/zyd.table.js b/blog-admin/src/main/resources/static/assets/js/zyd.table.js index c0c8c60b9b60013c6e043145536807fa56e8de42..0f0e99e1454c8e15527bd2c864e46df32336e24b 100644 --- a/blog-admin/src/main/resources/static/assets/js/zyd.table.js +++ b/blog-admin/src/main/resources/static/assets/js/zyd.table.js @@ -1,25 +1,4 @@ /** - * MIT License - * - * Copyright (c) 2018 yadong.zhang - * - * 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: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * 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. * * bootstrap-table工具类 * @@ -105,7 +84,7 @@ columns: options.columns }); $tablelist.on('load-success.bs.table', function (data) { - zhyd.initSwitchery(); + gentelella.initSwitchery(); }); }, queryParams: function (params) { diff --git a/blog-admin/src/main/resources/static/assets/js/zyd.tool.js b/blog-admin/src/main/resources/static/assets/js/zyd.tool.js index ccfc524665939d50e07e31aafea2fd435d8985e1..fd1eeee5cbcd42a237dbb995634ce4e57f7c136e 100644 --- a/blog-admin/src/main/resources/static/assets/js/zyd.tool.js +++ b/blog-admin/src/main/resources/static/assets/js/zyd.tool.js @@ -1,25 +1,4 @@ /** - * MIT License - * - * Copyright (c) 2018 yadong.zhang - * - * 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: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * 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. * * 项目工具类 * diff --git a/blog-admin/src/main/resources/templates/article/publish-md.ftl b/blog-admin/src/main/resources/templates/article/publish-md.ftl index 597b9abaccf9dfe58874a41864bdfd6335ff4152..a113377df3b51b8842969fb3d5c3aa36726b530d 100644 --- a/blog-admin/src/main/resources/templates/article/publish-md.ftl +++ b/blog-admin/src/main/resources/templates/article/publish-md.ftl @@ -85,7 +85,7 @@
-
+