From ce578f6bda849e02bd0b8d293fc9a5f93a02e898 Mon Sep 17 00:00:00 2001 From: Anyon Date: Tue, 12 Sep 2017 15:49:57 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E4=BF=AE=E5=A4=8D=E5=90=8E?= =?UTF-8?q?=E5=8F=B0UI=E9=83=A8=E5=88=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/admin/listen.js | 6 ++++-- static/admin/plugs.js | 5 +++++ static/theme/default/css/console.css | 5 +++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/static/admin/listen.js b/static/admin/listen.js index 57cb45b2a..88ebb3867 100644 --- a/static/admin/listen.js +++ b/static/admin/listen.js @@ -94,7 +94,7 @@ define(['jquery', 'admin.plugs'], function () { var method = $(this).attr('data-file') === 'one' ? 'one' : 'mtl'; var type = $(this).attr('data-type') || 'jpg,png', field = $(this).attr('data-field') || 'file'; var title = $(this).attr('data-title') || '文件上传', uptype = $(this).attr('data-uptype') || ''; - var url = window.ROOT_URL + '/index.php/admin/plugs/upfile/mode/' + method + '.html?mode=' + method + '&uptype=' + uptype + '&type=' + type + '&field=' + field; + var url = window.ROOT_URL + '/index.php/admin/plugs/upfile.html?mode=' + method + '&uptype=' + uptype + '&type=' + type + '&field=' + field; $.form.iframe(url, title || '文件管理'); }); @@ -115,7 +115,8 @@ define(['jquery', 'admin.plugs'], function () { var img = new Image(), src = this.getAttribute('data-tips-image') || this.src; var imgWidth = this.getAttribute('data-width') || '480px'; img.onload = function () { - layer.open({type: 1, area: imgWidth, title: false, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: true, content: $(img).appendTo('body').css({background: '#fff', width: imgWidth, height: 'auto'}), end: function () { + var $content = $(img).appendTo('body').css({background: '#fff', width: imgWidth, height: 'auto'}); + layer.open({type: 1, area: imgWidth, title: false, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: true, content: $content, end: function () { $(img).remove(); } }); @@ -141,6 +142,7 @@ define(['jquery', 'admin.plugs'], function () { /*! 后台菜单控制初始化 */ $.menu.listen(); + /*! 表单监听初始化 */ $.validate.listen(this); diff --git a/static/admin/plugs.js b/static/admin/plugs.js index f7081e2f7..7ab01b553 100644 --- a/static/admin/plugs.js +++ b/static/admin/plugs.js @@ -354,6 +354,11 @@ define(['jquery'], function () { }); $(form).bind("submit", function (event) { if (self.isAllpass($(this).find(self.tags), params) && typeof callback === 'function') { + if (typeof CKEDITOR === 'object' && typeof CKEDITOR.instances === 'object') { + for (var instance in CKEDITOR.instances) { + CKEDITOR.instances[instance].updateElement(); + } + } callback.call(this, $(form).serialize()); } return event.preventDefault(), false; diff --git a/static/theme/default/css/console.css b/static/theme/default/css/console.css index 97d5d2fdf..778ead640 100644 --- a/static/theme/default/css/console.css +++ b/static/theme/default/css/console.css @@ -15,8 +15,8 @@ html{overflow:auto;overflow-y:scroll !important} body{min-width:1024px;font-size:12px;line-height:24px;font-family:'微软雅黑','Microsoft YaHei','Helvetica Neue', 'Luxi Sans', 'DejaVu Sans', 'Hiragino Sans GB',serif} a:hover{color:#039}a{color:#06C;cursor:pointer}input::-ms-clear{display:none}button{border-radius:0!important}label{font-size:100%;font-weight:500;margin-bottom:0} -.block{display:block}.pointer{cursor:pointer}.help-block{margin-bottom:0} -.inline-block{display:inline-block}.nowrap{white-space:nowrap !important} +.block{display:block!important}.pointer{cursor:pointer!important}.help-block{margin-bottom:0} +.inline-block{display:inline-block!important}.nowrap{white-space:nowrap !important} .text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important} .full-width{width:100% !important}.full-height{height:100% !important} @@ -60,6 +60,7 @@ table td .text-explode{color:#ccc!important;font-weight:normal!important;margin: /** 列表排序样式 */ .list-table-image{width:22px;cursor:pointer} .list-table-sort-td{width:60px !important;text-align:center!important} +.list-table-sort-td button{width:50px} .list-table-sort-td input{width:50px;text-align:center;font-size:12px;line-height:14px;padding:2px;border:1px solid #e6e6e6} .list-table-check-td{width:30px !important;text-align:center;padding:0} .list-table-check-td input{margin:0;vertical-align:middle}