From 4a92061d0813c22640a48ae90c45343fa7827ed2 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 1 Sep 2017 11:35:01 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]UI=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/admin/listen.js | 16 +++++++--------- static/theme/default/css/console.css | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/static/admin/listen.js b/static/admin/listen.js index 3cca5311b..543fc9f03 100644 --- a/static/admin/listen.js +++ b/static/admin/listen.js @@ -14,7 +14,7 @@ define(['jquery', 'admin.plugs'], function () { /*! 定义当前body对象 */ - this.$body = $('body'); + this.$body = $('.framework-body').add('.framework-topbar'); /*! 注册 data-load 事件行为 */ this.$body.on('click', '[data-load]', function () { @@ -24,7 +24,7 @@ define(['jquery', 'admin.plugs'], function () { } return _goLoad.call(this); function _goLoad() { - $.form.load(url, {}, 'GET', null, true, tips); + $.form.load(url, {}, 'get', null, true, tips); } }); @@ -32,10 +32,9 @@ define(['jquery', 'admin.plugs'], function () { this.$body.on('submit', 'form.form-search', function () { var url = $(this).attr('action'), split = url.indexOf('?') === -1 ? '?' : '&'; if ((this.method || 'get').toLowerCase() === 'get') { - window.location.href = '#' + $.menu.parseUri(url + split + $(this).serialize()); - } else { - $.form.load(url, this, 'post'); + return window.location.href = '#' + $.menu.parseUri(url + split + $(this).serialize()); } + $.form.load(url, this, 'post'); }); /*! 注册 data-modal 事件行为 */ @@ -92,8 +91,8 @@ define(['jquery', 'admin.plugs'], function () { /*! 注册 data-file 事件行为 */ this.$body.on('click', '[data-file]', function () { - var type = $(this).attr('data-type') || 'jpg,png', field = $(this).attr('data-field') || 'file'; 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; $.form.iframe(url, title || '文件管理'); @@ -113,7 +112,7 @@ define(['jquery', 'admin.plugs'], function () { /*! 注册 data-tips-image 事件行为 */ this.$body.on('click', '[data-tips-image]', function () { - var src = this.getAttribute('data-tips-image') || this.src, img = new Image(); + 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 () { @@ -134,7 +133,7 @@ define(['jquery', 'admin.plugs'], function () { this.$body.on('click', '[data-phone-view]', function () { var $container = $('
公众号
').appendTo('body'); $container.find('iframe').attr('src', this.getAttribute('data-phone-view') || this.href); - layer.style(layer.open({type: 1, scrollbar: !1, area: ['330px', '600px'], title: !1, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: !!1, content: $container, end: function () { + layer.style(layer.open({type: 1, scrollbar: !1, area: ['335px', '600px'], title: !1, closeBtn: 1, skin: 'layui-layer-nobg', shadeClose: !1, content: $container, end: function () { $container.remove(); } }), {boxShadow: 'none'}); @@ -142,7 +141,6 @@ define(['jquery', 'admin.plugs'], function () { /*! 后台菜单控制初始化 */ $.menu.listen(); - /*! 表单监听初始化 */ $.validate.listen(this); diff --git a/static/theme/default/css/console.css b/static/theme/default/css/console.css index 52b1a3dc2..143559102 100644 --- a/static/theme/default/css/console.css +++ b/static/theme/default/css/console.css @@ -204,7 +204,7 @@ input[type=checkbox]:checked::after{display:block;position:absolute;top:-2px;lef input[type=checkbox]:focus,input[type=radio]:focus{outline:none} /** 微信菜单 */ -.mobile-preview{position:relative;width:317px;height:580px;background:url('../img/wechat/mobile_head.png') no-repeat 0 0;border:1px solid #e7e7eb} +.mobile-preview{position:relative;width:317px;height:580px;background:url('../img/wechat/mobile_head.png') no-repeat 0 0} .mobile-preview .mobile-header{color:#fff;text-align:center;padding-top:30px;font-size:15px;width:auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-wrap:normal;margin:0 30px;-webkit-pointer-events:none;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none} .mobile-body{width:100%;position:absolute;bottom:0;top:60px} .mobile-body iframe{width:100%;height:100%;background:#fff}