diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index eaf77120..d47f1c20 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -391,8 +391,16 @@ shade: 0.3, title: title, content: url, + btn: ['确定', '关闭'], // 弹层外区域关闭 - shadeClose: true + shadeClose: true, + yes: function(index, layero) { + var iframeWin = layero.find('iframe')[0]; + iframeWin.contentWindow.submitHandler(); + }, + cancel: function(index) { + return true; + } }); layer.full(index); }, diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/add.html b/ruoyi-admin/src/main/resources/templates/system/notice/add.html index a60c2a72..b0c4b2e3 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notice/add.html +++ b/ruoyi-admin/src/main/resources/templates/system/notice/add.html @@ -37,12 +37,6 @@ -
-
- - -
-
@@ -61,13 +55,16 @@ noticeTitle:{ required:true, } - }, - submitHandler: function(form) { - var sHTML = $('.summernote').code(); - $("#noticeContent").val(sHTML); - $.operate.save(prefix + "/add", $('#form-notice-add').serialize()); } }); + + function submitHandler() { + if ($.validate.form()) { + var sHTML = $('.summernote').code(); + $("#noticeContent").val(sHTML); + $.operate.save(prefix + "/add", $('#form-notice-add').serialize()); + } + } diff --git a/ruoyi-admin/src/main/resources/templates/system/notice/edit.html b/ruoyi-admin/src/main/resources/templates/system/notice/edit.html index f5eee47e..e1df4d4a 100644 --- a/ruoyi-admin/src/main/resources/templates/system/notice/edit.html +++ b/ruoyi-admin/src/main/resources/templates/system/notice/edit.html @@ -38,12 +38,6 @@ -
-
- - -
-
@@ -66,13 +60,16 @@ xxxx:{ required:true, }, - }, - submitHandler: function(form) { - var sHTML = $('.summernote').code(); - $("#noticeContent").val(sHTML); - $.operate.save(prefix + "/edit", $('#form-notice-edit').serialize()); } }); + + function submitHandler() { + if ($.validate.form()) { + var sHTML = $('.summernote').code(); + $("#noticeContent").val(sHTML); + $.operate.save(prefix + "/edit", $('#form-notice-edit').serialize()); + } + }