升级 layer 3.5,升级注意:查找替换 /3.1/layer.js 为 /3.5/layer.js
@@ -163,7 +163,7 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
|||||||
|
|
||||||
.sidebar-menu {padding:0 8px 0 7px;}
|
.sidebar-menu {padding:0 8px 0 7px;}
|
||||||
.sidebar-menu li>a>.pull-right-container {left:0;}
|
.sidebar-menu li>a>.pull-right-container {left:0;}
|
||||||
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e1f1ff;border-right:0;border-radius:6px;}
|
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
|
||||||
|
|
||||||
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
||||||
|
|
||||||
@@ -217,5 +217,5 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
|
|||||||
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
||||||
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
||||||
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
||||||
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#e6f7ff;}
|
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#ecf9ff;}
|
||||||
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
/**
|
|
||||||
@Name:layer v3.1.1 Web弹层组件
|
|
||||||
@Author:贤心
|
|
||||||
@Site:http://layer.layui.com
|
|
||||||
@License:MIT
|
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* layer 3.5.1 通用 Web 弹出层组件
|
||||||
|
* MIT Licensed
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;!function(window, undefined){
|
;!function(window, undefined){
|
||||||
@@ -22,8 +20,9 @@ var isLayui = window.layui && layui.define, $, win, ready = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return src || js[last].src;
|
return src || js[last].src;
|
||||||
}();
|
}()
|
||||||
return jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
|
,GLOBAL = window.LAYUI_GLOBAL || {};
|
||||||
|
return GLOBAL.layer_dir || jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
|
||||||
}(),
|
}(),
|
||||||
|
|
||||||
config: {}, end: {}, minIndex: 0, minLeft: [],
|
config: {}, end: {}, minIndex: 0, minLeft: [],
|
||||||
@@ -38,16 +37,20 @@ var isLayui = window.layui && layui.define, $, win, ready = {
|
|||||||
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
||||||
},
|
},
|
||||||
|
|
||||||
//载入CSS配件
|
//载入 CSS 依赖
|
||||||
link: function(href, fn, cssname){
|
link: function(href, fn, cssname){
|
||||||
|
|
||||||
//未设置路径,则不主动加载css
|
//未设置路径,则不主动加载css
|
||||||
if(!layer.path) return;
|
if(!layer.path) return;
|
||||||
|
|
||||||
var head = document.getElementsByTagName("head")[0], link = document.createElement('link');
|
var head = document.getElementsByTagName("head")[0]
|
||||||
|
,link = document.createElement('link');
|
||||||
|
|
||||||
if(typeof fn === 'string') cssname = fn;
|
if(typeof fn === 'string') cssname = fn;
|
||||||
|
|
||||||
var app = (cssname || href).replace(/\.|\//g, '');
|
var app = (cssname || href).replace(/\.|\//g, '');
|
||||||
var id = 'layuicss-'+ app, timeout = 0;
|
var id = 'layuicss-'+ app
|
||||||
|
,STAUTS_NAME = 'creating'
|
||||||
|
,timeout = 0;
|
||||||
|
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.href = layer.path + href;
|
link.href = layer.path + href;
|
||||||
@@ -60,18 +63,37 @@ var isLayui = window.layui && layui.define, $, win, ready = {
|
|||||||
if(typeof fn !== 'function') return;
|
if(typeof fn !== 'function') return;
|
||||||
|
|
||||||
//轮询 css 是否加载完毕
|
//轮询 css 是否加载完毕
|
||||||
(function poll() {
|
(function poll(status) {
|
||||||
if(++timeout > 8 * 1000 / 100){
|
var delay = 100
|
||||||
return window.console && console.error('layer.css: Invalid');
|
,getLinkElem = document.getElementById(id); //获取动态插入的 link 元素
|
||||||
|
|
||||||
|
//如果轮询超过指定秒数,则视为请求文件失败或 css 文件不符合规范
|
||||||
|
if(++timeout > 10 * 1000 / delay){
|
||||||
|
return window.console && console.error(app +'.css: Invalid');
|
||||||
};
|
};
|
||||||
parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100);
|
|
||||||
|
//css 加载就绪
|
||||||
|
if(parseInt(ready.getStyle(getLinkElem, 'width')) === 1989){
|
||||||
|
//如果参数来自于初始轮询(即未加载就绪时的),则移除 link 标签状态
|
||||||
|
if(status === STAUTS_NAME) getLinkElem.removeAttribute('lay-status');
|
||||||
|
//如果 link 标签的状态仍为「创建中」,则继续进入轮询,直到状态改变,则执行回调
|
||||||
|
getLinkElem.getAttribute('lay-status') === STAUTS_NAME ? setTimeout(poll, delay) : fn();
|
||||||
|
} else {
|
||||||
|
getLinkElem.setAttribute('lay-status', STAUTS_NAME);
|
||||||
|
setTimeout(function(){
|
||||||
|
poll(STAUTS_NAME);
|
||||||
|
}, delay);
|
||||||
|
}
|
||||||
|
|
||||||
|
//parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 1000);
|
||||||
}());
|
}());
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//默认内置方法。
|
//默认内置方法。
|
||||||
var layer = {
|
var layer = {
|
||||||
v: '3.1.1',
|
v: '3.5.1',
|
||||||
i18n: { // ThinkGem 国际化支持
|
i18n: { // ThinkGem 国际化支持
|
||||||
btnOk: '确定',
|
btnOk: '确定',
|
||||||
btnCancel: '取消',
|
btnCancel: '取消',
|
||||||
@@ -97,13 +119,14 @@ var layer = {
|
|||||||
layer.path = ready.config.path || layer.path;
|
layer.path = ready.config.path || layer.path;
|
||||||
typeof options.extend === 'string' && (options.extend = [options.extend]);
|
typeof options.extend === 'string' && (options.extend = [options.extend]);
|
||||||
|
|
||||||
|
//如果设置了路径,则加载样式
|
||||||
if(ready.config.path) layer.ready();
|
if(ready.config.path) layer.ready();
|
||||||
|
|
||||||
if(!options.extend) return this;
|
if(!options.extend) return this;
|
||||||
|
|
||||||
isLayui
|
isLayui
|
||||||
? layui.addcss('modules/layer/' + options.extend)
|
? layui.addcss('modules/layer/' + options.extend)
|
||||||
: ready.link('skin/' + options.extend);
|
: ready.link('theme/' + options.extend);
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
@@ -111,7 +134,7 @@ var layer = {
|
|||||||
//主体CSS等待事件
|
//主体CSS等待事件
|
||||||
ready: function(callback){
|
ready: function(callback){
|
||||||
var cssname = 'layer', ver = ''
|
var cssname = 'layer', ver = ''
|
||||||
,path = (isLayui ? 'modules/layer/' : 'skin/') + 'default/layer.css?v='+ layer.v + ver;
|
,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver;
|
||||||
isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
|
isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
@@ -141,12 +164,9 @@ var layer = {
|
|||||||
}, type ? {} : options));
|
}, type ? {} : options));
|
||||||
},
|
},
|
||||||
|
|
||||||
//最常用提示层
|
msg: function(content, options, end){ //最常用提示层
|
||||||
msg: function(content, options, end){
|
|
||||||
var type = typeof options === 'function', rskin = ready.config.skin;
|
var type = typeof options === 'function', rskin = ready.config.skin;
|
||||||
var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
|
var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
|
||||||
options = options || {};
|
|
||||||
skin = skin + ' ' + (options.positionClass || '');
|
|
||||||
var anim = doms.anim.length - 1;
|
var anim = doms.anim.length - 1;
|
||||||
if(type) end = options;
|
if(type) end = options;
|
||||||
return layer.open($.extend({
|
return layer.open($.extend({
|
||||||
@@ -189,17 +209,20 @@ var layer = {
|
|||||||
shade: false,
|
shade: false,
|
||||||
resize: false,
|
resize: false,
|
||||||
fixed: false,
|
fixed: false,
|
||||||
maxWidth: 210
|
maxWidth: 260
|
||||||
}, options));
|
}, options));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var Class = function(setings){
|
var Class = function(setings){
|
||||||
var that = this;
|
var that = this, creat = function(){
|
||||||
that.index = ++layer.index;
|
|
||||||
that.config = $.extend({}, that.config, ready.config, setings);
|
|
||||||
document.body ? that.creat() : setTimeout(function(){
|
|
||||||
that.creat();
|
that.creat();
|
||||||
|
};
|
||||||
|
that.index = ++layer.index;
|
||||||
|
that.config.maxWidth = $(win).width() - 15*2; //初始最大宽度:当前屏幕宽,左右留 15px 边距
|
||||||
|
that.config = $.extend({}, that.config, ready.config, setings);
|
||||||
|
document.body ? creat() : setTimeout(function(){
|
||||||
|
creat();
|
||||||
}, 30);
|
}, 30);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -209,6 +232,9 @@ Class.pt = Class.prototype;
|
|||||||
var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
|
var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
|
||||||
doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
|
doms.anim = ['layer-anim-00', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
|
||||||
|
|
||||||
|
doms.SHADE = 'layui-layer-shade';
|
||||||
|
doms.MOVE = 'layui-layer-move';
|
||||||
|
|
||||||
//默认配置
|
//默认配置
|
||||||
Class.pt.config = {
|
Class.pt.config = {
|
||||||
type: 0,
|
type: 0,
|
||||||
@@ -223,7 +249,8 @@ Class.pt.config = {
|
|||||||
zIndex: 19891014,
|
zIndex: 19891014,
|
||||||
maxWidth: 360,
|
maxWidth: 360,
|
||||||
anim: 0,
|
anim: 0,
|
||||||
isOutAnim: true,
|
isOutAnim: true, //退出动画
|
||||||
|
minStack: true, //最小化堆叠
|
||||||
icon: -1,
|
icon: -1,
|
||||||
moveType: 1,
|
moveType: 1,
|
||||||
resize: true,
|
resize: true,
|
||||||
@@ -243,18 +270,17 @@ Class.pt.vessel = function(conType, callback){
|
|||||||
config.zIndex = zIndex;
|
config.zIndex = zIndex;
|
||||||
callback([
|
callback([
|
||||||
//遮罩
|
//遮罩
|
||||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; ') +'"></div>') : '',
|
config.shade ? ('<div class="'+ doms.SHADE +'" id="'+ doms.SHADE + times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; ') +'"></div>') : '',
|
||||||
|
|
||||||
//主体
|
//主体
|
||||||
'<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
|
'<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + ';position:'+ (config.fixed ? 'fixed;' : 'absolute;') +'">'
|
||||||
+ (conType && config.type != 2 ? '' : titleHTML)
|
+ (conType && config.type != 2 ? '' : titleHTML)
|
||||||
+ '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
|
+ '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
|
||||||
+ (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
|
+ (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
|
||||||
+ (config.type == 1 && conType ? '' : (config.content||''))
|
+ (config.type == 1 && conType ? '' : (config.content||''))
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
+ '<span class="layui-layer-setwin">'+ function(){
|
+ '<span class="layui-layer-setwin">'+ function(){
|
||||||
var closebtn = ismax && config.title ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a>' : ''; // ThinkGem 必须有标题的清空下才能最小化
|
var closebtn = ismax && config.title ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : ''; // ThinkGem 必须有标题的清空下才能最小化
|
||||||
closebtn += ismax ? '<a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
|
|
||||||
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
|
config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
|
||||||
return closebtn;
|
return closebtn;
|
||||||
}() + '</span>'
|
}() + '</span>'
|
||||||
@@ -264,11 +290,11 @@ Class.pt.vessel = function(conType, callback){
|
|||||||
for(var i = 0, len = config.btn.length; i < len; i++){
|
for(var i = 0, len = config.btn.length; i < len; i++){
|
||||||
button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
|
button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
|
||||||
}
|
}
|
||||||
return '<div class="'+ doms[6] + (config.btnAlign ? (' layui-layer-btn-' + config.btnAlign) : '') +'">'+ button +'</div>'
|
return '<div class="'+ doms[6] + (config.btnAlign ? (' layui-layer-btn-' + (config.btnAlign||'')) : '') +'">'+ button +'</div>'
|
||||||
}() : '')
|
}() : '')
|
||||||
+ (config.resize ? '<span class="layui-layer-resize"></span>' : '')
|
+ (config.resize ? '<span class="layui-layer-resize"></span>' : '')
|
||||||
+ '</div>'
|
+ '</div>'
|
||||||
], titleHTML, $('<div class="layui-layer-move"></div>'));
|
], titleHTML, $('<div class="'+ doms.MOVE +'" id="'+ doms.MOVE +'"></div>'));
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -298,12 +324,12 @@ Class.pt.creat = function(){
|
|||||||
|
|
||||||
switch(config.type){
|
switch(config.type){
|
||||||
case 0:
|
case 0:
|
||||||
//config.btn = ('btn' in config) ? config.btn : ready.btn[0]; ThinkGem
|
//config.btn = ('btn' in config) ? config.btn : ready.btn[0];
|
||||||
config.btn = ('btn' in config) ? config.btn : layer.i18n.btnOk;// ThinkGem
|
config.btn = ('btn' in config) ? config.btn : layer.i18n.btnOk;// ThinkGem
|
||||||
layer.closeAll('dialog');
|
layer.closeAll('dialog');
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
var content = config.content = conType ? config.content : [config.content, 'auto'];
|
var content = config.content = conType ? config.content : [config.content||'', 'auto'];
|
||||||
//config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'
|
//config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'
|
||||||
// + doms[4] +''+ times +'" name="'+ doms[4] +''+ times
|
// + doms[4] +''+ times +'" name="'+ doms[4] +''+ times
|
||||||
// +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'
|
// +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="'
|
||||||
@@ -344,13 +370,16 @@ Class.pt.creat = function(){
|
|||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
}() : body.append(html[1]);
|
}() : body.append(html[1]);
|
||||||
$('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem);
|
$('#'+ doms.MOVE)[0] || body.append(ready.moveElem = moveElem);
|
||||||
|
|
||||||
that.layero = $('#'+ doms[0] + times);
|
that.layero = $('#'+ doms[0] + times);
|
||||||
|
that.shadeo = $('#'+ doms.SHADE + times);
|
||||||
|
|
||||||
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
||||||
}).auto(times);
|
}).auto(times);
|
||||||
|
|
||||||
//遮罩
|
//遮罩
|
||||||
$('#layui-layer-shade'+ that.index).css({
|
that.shadeo.css({
|
||||||
'background-color': config.shade[1] || '#000'
|
'background-color': config.shade[1] || '#000'
|
||||||
,'opacity': config.shade[0] || config.shade
|
,'opacity': config.shade[0] || config.shade
|
||||||
});
|
});
|
||||||
@@ -375,7 +404,19 @@ Class.pt.creat = function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//坐标自适应浏览器窗口尺寸
|
//坐标自适应浏览器窗口尺寸
|
||||||
config.type == 4 ? that.tips() : that.offset();
|
config.type == 4 ? that.tips() : function(){
|
||||||
|
that.offset()
|
||||||
|
//首次弹出时,若 css 尚未加载,则等待 css 加载完毕后,重新设定尺寸
|
||||||
|
parseInt(ready.getStyle(document.getElementById(doms.MOVE), 'z-index')) || function(){
|
||||||
|
that.layero.css('visibility', 'hidden');
|
||||||
|
layer.ready(function(){
|
||||||
|
that.offset();
|
||||||
|
that.layero.css('visibility', 'visible');
|
||||||
|
});
|
||||||
|
}();
|
||||||
|
}();
|
||||||
|
|
||||||
|
//如果是固定定位
|
||||||
if(config.fixed){
|
if(config.fixed){
|
||||||
win.on('resize', function(){
|
win.on('resize', function(){
|
||||||
that.offset();
|
that.offset();
|
||||||
@@ -385,7 +426,7 @@ Class.pt.creat = function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
config.time <= 0 || setTimeout(function(){
|
config.time <= 0 || setTimeout(function(){
|
||||||
layer.close(that.index)
|
layer.close(that.index);
|
||||||
}, config.time);
|
}, config.time);
|
||||||
that.move().callback();
|
that.move().callback();
|
||||||
|
|
||||||
@@ -708,15 +749,15 @@ Class.pt.callback = function(){
|
|||||||
layero.find('.'+ doms[7]).on('click', cancel);
|
layero.find('.'+ doms[7]).on('click', cancel);
|
||||||
|
|
||||||
//点遮罩关闭
|
//点遮罩关闭
|
||||||
if(config.shadeClose || config.shadeClose == undefined){
|
if(config.shadeClose){
|
||||||
$('#layui-layer-shade'+ that.index).on('click', function(){
|
that.shadeo.on('click', function(){
|
||||||
layer.close(that.index);
|
layer.close(that.index);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//最小化
|
//最小化
|
||||||
layero.find('.layui-layer-min').on('click', function(){
|
layero.find('.layui-layer-min').on('click', function(){
|
||||||
var min = config.min && config.min(layero);
|
var min = config.min && config.min(layero, that.index);
|
||||||
min === false || layer.min(that.index, config);
|
min === false || layer.min(that.index, config);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -724,11 +765,11 @@ Class.pt.callback = function(){
|
|||||||
layero.find('.layui-layer-max').on('click', function(){
|
layero.find('.layui-layer-max').on('click', function(){
|
||||||
if($(this).hasClass('layui-layer-maxmin')){
|
if($(this).hasClass('layui-layer-maxmin')){
|
||||||
layer.restore(that.index);
|
layer.restore(that.index);
|
||||||
config.restore && config.restore(layero);
|
config.restore && config.restore(layero, that.index);
|
||||||
} else {
|
} else {
|
||||||
layer.full(that.index, config);
|
layer.full(that.index, config);
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
config.full && config.full(layero);
|
config.full && config.full(layero, that.index);
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -775,6 +816,7 @@ Class.pt.openLayer = function(){
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//记录宽高坐标,用于还原
|
||||||
ready.record = function(layero){
|
ready.record = function(layero){
|
||||||
var area = [
|
var area = [
|
||||||
layero.width(),
|
layero.width(),
|
||||||
@@ -818,9 +860,7 @@ layer.getFrameIndex = function(name){
|
|||||||
|
|
||||||
//iframe层自适应宽高(diffVal差值范围内,进行自适应高度)
|
//iframe层自适应宽高(diffVal差值范围内,进行自适应高度)
|
||||||
layer.iframeAuto = function(index, diffVal){
|
layer.iframeAuto = function(index, diffVal){
|
||||||
if(!index){
|
if(!index) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
var iframe = document.getElementById(doms[4] + index);
|
var iframe = document.getElementById(doms[4] + index);
|
||||||
if (iframe) {
|
if (iframe) {
|
||||||
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
|
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
|
||||||
@@ -900,11 +940,20 @@ layer.style = function(index, options, limit){
|
|||||||
|
|
||||||
//最小化
|
//最小化
|
||||||
layer.min = function(index, options){
|
layer.min = function(index, options){
|
||||||
|
options = options || {};
|
||||||
var layero = $('#'+ doms[0] + index)
|
var layero = $('#'+ doms[0] + index)
|
||||||
|
,shadeo = $('#'+ doms.SHADE + index)
|
||||||
,titHeight = layero.find(doms[1]).outerHeight() || 0
|
,titHeight = layero.find(doms[1]).outerHeight() || 0
|
||||||
,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
|
,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
|
||||||
,position = layero.css('position');
|
,position = layero.css('position')
|
||||||
|
,settings = {
|
||||||
|
width: 180
|
||||||
|
,height: titHeight
|
||||||
|
,position: 'fixed'
|
||||||
|
,overflow: 'hidden'
|
||||||
|
};
|
||||||
|
|
||||||
|
//记录宽高坐标,用于还原
|
||||||
ready.record(layero);
|
ready.record(layero);
|
||||||
|
|
||||||
if(ready.minLeft[0]){
|
if(ready.minLeft[0]){
|
||||||
@@ -912,31 +961,33 @@ layer.min = function(index, options){
|
|||||||
ready.minLeft.shift();
|
ready.minLeft.shift();
|
||||||
}
|
}
|
||||||
|
|
||||||
layero.attr('position', position);
|
//是否堆叠在左下角
|
||||||
|
if(options.minStack){
|
||||||
|
settings.left = left;
|
||||||
|
settings.top = win.height() - titHeight;
|
||||||
|
layero.attr('minLeft') || ready.minIndex++; //初次执行,最小化操作索引自增
|
||||||
|
layero.attr('minLeft', left);
|
||||||
|
}
|
||||||
|
|
||||||
layer.style(index, {
|
layero.attr('position', position);
|
||||||
width: 180
|
layer.style(index, settings, true);
|
||||||
,height: titHeight
|
|
||||||
,left: left
|
|
||||||
,top: win.height() - titHeight
|
|
||||||
,position: 'fixed'
|
|
||||||
,overflow: 'hidden'
|
|
||||||
}, true);
|
|
||||||
|
|
||||||
layero.find('.layui-layer-min').hide();
|
layero.find('.layui-layer-min').hide();
|
||||||
layero.attr('type') === 'page' && layero.find(doms[4]).hide();
|
layero.attr('type') === 'page' && layero.find(doms[4]).hide();
|
||||||
ready.rescollbar(index);
|
ready.rescollbar(index);
|
||||||
|
|
||||||
if(!layero.attr('minLeft')){
|
//隐藏遮罩
|
||||||
ready.minIndex++;
|
shadeo.hide();
|
||||||
}
|
|
||||||
layero.attr('minLeft', left);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//还原
|
//还原
|
||||||
layer.restore = function(index){
|
layer.restore = function(index){
|
||||||
var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
|
var layero = $('#'+ doms[0] + index)
|
||||||
var type = layero.attr('type');
|
,shadeo = $('#'+ doms.SHADE + index)
|
||||||
|
,area = layero.attr('area').split(',')
|
||||||
|
,type = layero.attr('type');
|
||||||
|
|
||||||
|
//恢复原来尺寸
|
||||||
layer.style(index, {
|
layer.style(index, {
|
||||||
width: parseFloat(area[0]),
|
width: parseFloat(area[0]),
|
||||||
height: parseFloat(area[1]),
|
height: parseFloat(area[1]),
|
||||||
@@ -945,10 +996,14 @@ layer.restore = function(index){
|
|||||||
position: layero.attr('position'),
|
position: layero.attr('position'),
|
||||||
overflow: 'visible'
|
overflow: 'visible'
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
|
layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
|
||||||
layero.find('.layui-layer-min').show();
|
layero.find('.layui-layer-min').show();
|
||||||
layero.attr('type') === 'page' && layero.find(doms[4]).show();
|
layero.attr('type') === 'page' && layero.find(doms[4]).show();
|
||||||
ready.rescollbar(index);
|
ready.rescollbar(index);
|
||||||
|
|
||||||
|
//恢复遮罩
|
||||||
|
shadeo.show();
|
||||||
};
|
};
|
||||||
|
|
||||||
//全屏
|
//全屏
|
||||||
@@ -978,7 +1033,7 @@ layer.title = function(name, index){
|
|||||||
};
|
};
|
||||||
|
|
||||||
//关闭layer总方法
|
//关闭layer总方法
|
||||||
layer.close = function(index){
|
layer.close = function(index, callback){
|
||||||
var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
|
var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
|
||||||
if(!layero[0]) return;
|
if(!layero[0]) return;
|
||||||
var WRAP = 'layui-layer-wrap', remove = function(){
|
var WRAP = 'layui-layer-wrap', remove = function(){
|
||||||
@@ -1004,13 +1059,14 @@ layer.close = function(index){
|
|||||||
}
|
}
|
||||||
typeof ready.end[index] === 'function' && ready.end[index]();
|
typeof ready.end[index] === 'function' && ready.end[index]();
|
||||||
delete ready.end[index];
|
delete ready.end[index];
|
||||||
|
typeof callback === 'function' && callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
if(layero.data('isOutAnim')){
|
if(layero.data('isOutAnim')){
|
||||||
layero.addClass('layer-anim '+ closeAnim);
|
layero.addClass('layer-anim '+ closeAnim);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
|
$('#layui-layer-moves, #'+ doms.SHADE + index).remove();
|
||||||
layer.ie == 6 && ready.reselect();
|
layer.ie == 6 && ready.reselect();
|
||||||
ready.rescollbar(index);
|
ready.rescollbar(index);
|
||||||
if(layero.attr('minLeft')){
|
if(layero.attr('minLeft')){
|
||||||
@@ -1028,17 +1084,25 @@ layer.close = function(index){
|
|||||||
};
|
};
|
||||||
|
|
||||||
//关闭所有层
|
//关闭所有层
|
||||||
layer.closeAll = function(type){
|
layer.closeAll = function(type, callback){
|
||||||
$.each($('.'+doms[0]), function(){
|
if(typeof type === 'function'){
|
||||||
|
callback = type;
|
||||||
|
type = null;
|
||||||
|
};
|
||||||
|
var domsElem = $('.'+doms[0]);
|
||||||
|
$.each(domsElem, function(_index){
|
||||||
var othis = $(this);
|
var othis = $(this);
|
||||||
var is = type ? (othis.attr('type') === type) : 1;
|
var is = type ? (othis.attr('type') === type) : 1;
|
||||||
is && layer.close(othis.attr('times'));
|
is && layer.close(othis.attr('times'), _index === domsElem.length - 1 ? callback : null);
|
||||||
is = null;
|
is = null;
|
||||||
});
|
});
|
||||||
|
if(domsElem.length === 0) typeof callback === 'function' && callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
拓展模块,layui 开始合并在一起
|
拓展模块,layui 开始合并在一起
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var cache = layer.cache||{}, skin = function(type){
|
var cache = layer.cache||{}, skin = function(type){
|
||||||
@@ -1057,8 +1121,8 @@ layer.prompt = function(options, yes){
|
|||||||
style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
|
style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
|
||||||
delete options.area;
|
delete options.area;
|
||||||
}
|
}
|
||||||
var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'>' + (options.value||'') +'</textarea>' : function(){
|
var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'></textarea>' : function(){
|
||||||
return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input" value="'+ (options.value||'') +'">';
|
return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input">';
|
||||||
}();
|
}();
|
||||||
|
|
||||||
var success = options.success;
|
var success = options.success;
|
||||||
@@ -1072,7 +1136,7 @@ layer.prompt = function(options, yes){
|
|||||||
,maxWidth: win.width()
|
,maxWidth: win.width()
|
||||||
,success: function(layero){
|
,success: function(layero){
|
||||||
prompt = layero.find('.layui-layer-input');
|
prompt = layero.find('.layui-layer-input');
|
||||||
prompt.focus();
|
prompt.val(options.value || '').focus();
|
||||||
typeof success === 'function' && success(layero);
|
typeof success === 'function' && success(layero);
|
||||||
}
|
}
|
||||||
,resize: false
|
,resize: false
|
||||||
@@ -1143,17 +1207,21 @@ layer.photos = function(options, loop, key){
|
|||||||
var dict = {};
|
var dict = {};
|
||||||
options = options || {};
|
options = options || {};
|
||||||
if(!options.photos) return;
|
if(!options.photos) return;
|
||||||
var type = options.photos.constructor === Object;
|
|
||||||
var photos = type ? options.photos : {}, data = photos.data || [];
|
|
||||||
var start = photos.start || 0;
|
|
||||||
dict.imgIndex = (start|0) + 1;
|
|
||||||
|
|
||||||
|
//若 photos 并非选择器或 jQuery 对象,则为普通 object
|
||||||
|
var isObject = !(typeof options.photos === 'string' || options.photos instanceof $)
|
||||||
|
,photos = isObject ? options.photos : {}
|
||||||
|
,data = photos.data || []
|
||||||
|
,start = photos.start || 0;
|
||||||
|
|
||||||
|
dict.imgIndex = (start|0) + 1;
|
||||||
options.img = options.img || 'img';
|
options.img = options.img || 'img';
|
||||||
|
|
||||||
var success = options.success;
|
var success = options.success;
|
||||||
delete options.success;
|
delete options.success;
|
||||||
|
|
||||||
if(!type){ //页面直接获取
|
//如果 options.photos 不是一个对象
|
||||||
|
if(!isObject){ //页面直接获取
|
||||||
var parent = $(options.photos), pushData = function(){
|
var parent = $(options.photos), pushData = function(){
|
||||||
data = [];
|
data = [];
|
||||||
parent.find(options.img).each(function(index){
|
parent.find(options.img).each(function(index){
|
||||||
@@ -1165,7 +1233,7 @@ layer.photos = function(options, loop, key){
|
|||||||
src: othis.attr('layer-src') || othis.attr('src'),
|
src: othis.attr('layer-src') || othis.attr('src'),
|
||||||
thumb: othis.attr('src')
|
thumb: othis.attr('src')
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
pushData();
|
pushData();
|
||||||
@@ -1173,6 +1241,7 @@ layer.photos = function(options, loop, key){
|
|||||||
if (data.length === 0) return;
|
if (data.length === 0) return;
|
||||||
|
|
||||||
loop || parent.on('click', options.img, function(){
|
loop || parent.on('click', options.img, function(){
|
||||||
|
pushData();
|
||||||
var othis = $(this), index = othis.attr('layer-index');
|
var othis = $(this), index = othis.attr('layer-index');
|
||||||
layer.photos($.extend(options, {
|
layer.photos($.extend(options, {
|
||||||
photos: {
|
photos: {
|
||||||
@@ -1182,8 +1251,7 @@ layer.photos = function(options, loop, key){
|
|||||||
},
|
},
|
||||||
full: options.full
|
full: options.full
|
||||||
}), true);
|
}), true);
|
||||||
pushData();
|
});
|
||||||
})
|
|
||||||
|
|
||||||
//不直接弹出
|
//不直接弹出
|
||||||
if(!loop) return;
|
if(!loop) return;
|
||||||
@@ -1239,20 +1307,22 @@ layer.photos = function(options, loop, key){
|
|||||||
|
|
||||||
//一些动作
|
//一些动作
|
||||||
dict.event = function(){
|
dict.event = function(){
|
||||||
|
/*
|
||||||
dict.bigimg.hover(function(){
|
dict.bigimg.hover(function(){
|
||||||
dict.imgsee.show();
|
dict.imgsee.show();
|
||||||
}, function(){
|
}, function(){
|
||||||
dict.imgsee.hide();
|
dict.imgsee.hide();
|
||||||
});
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
|
dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
dict.imgprev();
|
dict.imgprev(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
|
dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
dict.imgnext();
|
dict.imgnext(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('keyup', dict.keyup);
|
$(document).on('keyup', dict.keyup);
|
||||||
@@ -1282,6 +1352,11 @@ layer.photos = function(options, loop, key){
|
|||||||
|
|
||||||
loadImage(data[start].src, function(img){
|
loadImage(data[start].src, function(img){
|
||||||
layer.close(dict.loadi);
|
layer.close(dict.loadi);
|
||||||
|
|
||||||
|
//切换图片时不出现动画
|
||||||
|
if(key) options.anim = -1;
|
||||||
|
|
||||||
|
//弹出图片层
|
||||||
dict.index = layer.open($.extend({
|
dict.index = layer.open($.extend({
|
||||||
type: 1,
|
type: 1,
|
||||||
id: 'layui-layer-photos',
|
id: 'layui-layer-photos',
|
||||||
@@ -1311,19 +1386,24 @@ layer.photos = function(options, loop, key){
|
|||||||
moveType: 1,
|
moveType: 1,
|
||||||
scrollbar: false,
|
scrollbar: false,
|
||||||
moveOut: true,
|
moveOut: true,
|
||||||
//anim: Math.random()*5|0,
|
anim: 5,
|
||||||
isOutAnim: false,
|
isOutAnim: false,
|
||||||
skin: 'layui-layer-photos' + skin('photos'),
|
skin: 'layui-layer-photos' + skin('photos'),
|
||||||
content: '<div class="layui-layer-phimg">'
|
content: '<div class="layui-layer-phimg">'
|
||||||
+'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
|
+'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
|
||||||
+'<div class="layui-layer-imgsee">'
|
+function(){
|
||||||
+(data.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : '')
|
if(data.length > 1){
|
||||||
|
return '<div class="layui-layer-imgsee">'
|
||||||
|
+'<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>'
|
||||||
+'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt || '') +'</a><em>'+ dict.imgIndex +' / '+ data.length +'</em></span></div>'
|
+'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt || '') +'</a><em>'+ dict.imgIndex +' / '+ data.length +'</em></span></div>'
|
||||||
+'</div>'
|
+'</div>'
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}()
|
||||||
+'</div>',
|
+'</div>',
|
||||||
success: function(layero, index){
|
success: function(layero, index){
|
||||||
dict.bigimg = layero.find('.layui-layer-phimg');
|
dict.bigimg = layero.find('.layui-layer-phimg');
|
||||||
dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar');
|
dict.imgsee = layero.find('.layui-layer-imgbar');
|
||||||
dict.event(layero);
|
dict.event(layero);
|
||||||
options.tab && options.tab(data[start], layero);
|
options.tab && options.tab(data[start], layero);
|
||||||
typeof success === 'function' && success(layero);
|
typeof success === 'function' && success(layero);
|
||||||
@@ -1371,8 +1451,8 @@ window.layui && layui.define ? (
|
|||||||
ready.run(window.jQuery);
|
ready.run(window.jQuery);
|
||||||
return layer;
|
return layer;
|
||||||
}) : function(){ //普通 script 标签加载
|
}) : function(){ //普通 script 标签加载
|
||||||
ready.run(window.jQuery);
|
|
||||||
layer.ready();
|
layer.ready();
|
||||||
|
ready.run(window.jQuery);
|
||||||
}()
|
}()
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
@Name:layer mobile v2.0 弹层组件移动版
|
@Name:layer mobile v2.0 弹层组件移动版
|
||||||
@Author:贤心
|
@Author:贤心
|
||||||
@Site:http://layer.layui.com/mobie/
|
@License:MIT
|
||||||
@License:LGPL
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,7 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
|
|
||||||
@Name: layer
|
@Name: layer
|
||||||
@Author: 贤心
|
|
||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
@@ -14,7 +13,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer{-webkit-overflow-scrolling: touch;}
|
.layui-layer{-webkit-overflow-scrolling: touch;}
|
||||||
.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; border-radius: 3px; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
|
.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; border-radius: 3px; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
|
||||||
.layui-layer-close{position:absolute;}
|
.layui-layer-close{position:absolute;}
|
||||||
.layui-layer-content{position:relative;}
|
.layui-layer-content{position:relative; overflow: hidden;}
|
||||||
.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
|
.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
|
||||||
.layui-layer-load{background:url(loading-1.gif) #eee center center no-repeat;}
|
.layui-layer-load{background:url(loading-1.gif) #eee center center no-repeat;}
|
||||||
.layui-layer-ico{ background:url(icon.png) no-repeat;}
|
.layui-layer-ico{ background:url(icon.png) no-repeat;}
|
||||||
@@ -51,7 +50,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
|
@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
|
||||||
|
|
||||||
/* 标题栏 */
|
/* 标题栏 */
|
||||||
.layui-layer-title{padding:0 80px 0 20px; height:42px; line-height:42px; border-bottom:1px solid #eee; font-size:14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-color: #F8F8F8; border-radius: 3px 3px 0 0;}
|
.layui-layer-title{padding:0 80px 0 20px; height: 50px; line-height: 50px; border-bottom:1px solid #F0F0F0; font-size: 14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 2px 2px 0 0;}
|
||||||
.layui-layer-setwin{position:absolute; right: 15px; *right:0; top: 15px; font-size:0; line-height: initial;}
|
.layui-layer-setwin{position:absolute; right: 15px; *right:0; top: 15px; font-size:0; line-height: initial;}
|
||||||
.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}
|
.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}
|
||||||
.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}
|
.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}
|
||||||
@@ -75,7 +74,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-btn-c{text-align: center;}
|
.layui-layer-btn-c{text-align: center;}
|
||||||
|
|
||||||
/* 定制化 */
|
/* 定制化 */
|
||||||
.layui-layer-dialog{min-width:260px;}
|
.layui-layer-dialog{min-width: 300px;}
|
||||||
.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
|
.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
|
||||||
.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}
|
.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}
|
||||||
.layui-layer-ico1{background-position:-30px 0 }
|
.layui-layer-ico1{background-position:-30px 0 }
|
||||||
@@ -93,7 +92,6 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
|
.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
|
||||||
.layui-layer-nobg{background:none;}
|
.layui-layer-nobg{background:none;}
|
||||||
.layui-layer-iframe iframe{display: block; width: 100%; border-radius: 3px;}
|
.layui-layer-iframe iframe{display: block; width: 100%; border-radius: 3px;}
|
||||||
/* .layui-layer-iframe, .layui-layer-iframe iframe {transition:top 0.2s ease-in-out;} 去掉动画IE下效果不好 */
|
|
||||||
|
|
||||||
.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}
|
.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}
|
||||||
.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url(loading-0.gif) no-repeat;}
|
.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url(loading-0.gif) no-repeat;}
|
||||||
@@ -130,7 +128,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
.layui-layer-iconext{background:url(icon-ext.png) no-repeat;}
|
.layui-layer-iconext{background:url(icon-ext.png) no-repeat;}
|
||||||
|
|
||||||
/* prompt模式 */
|
/* prompt模式 */
|
||||||
.layui-layer-prompt .layui-layer-input{display: block; width: 230px; height: 36px; margin: 0 auto; line-height: 30px; padding-left: 10px; border: 1px solid #e6e6e6; color: #333;}
|
.layui-layer-prompt .layui-layer-input{display: block; width: 260px; height: 36px; margin: 0 auto; line-height: 30px; padding-left: 10px; border: 1px solid #e6e6e6; color: #333;}
|
||||||
.layui-layer-prompt textarea.layui-layer-input{width: 300px; height: 100px; line-height: 20px; padding: 6px 10px;}
|
.layui-layer-prompt textarea.layui-layer-input{width: 300px; height: 100px; line-height: 20px; padding: 6px 10px;}
|
||||||
.layui-layer-prompt .layui-layer-content{padding: 20px;}
|
.layui-layer-prompt .layui-layer-content{padding: 20px;}
|
||||||
.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
|
.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
|
||||||
@@ -138,24 +136,23 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
|
|||||||
/* tab模式 */
|
/* tab模式 */
|
||||||
.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
|
.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
|
||||||
.layui-layer-tab .layui-layer-title{padding-left:0; overflow: visible;}
|
.layui-layer-tab .layui-layer-title{padding-left:0; overflow: visible;}
|
||||||
.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; cursor: pointer;}
|
.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width: 300px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; cursor: pointer;}
|
||||||
.layui-layer-tab .layui-layer-title span.layui-this{height: 43px; border-left: 1px solid #eee; border-right: 1px solid #eee; background-color: #fff; z-index: 10;}
|
.layui-layer-tab .layui-layer-title span.layui-this{height: 51px; border-left: 1px solid #eee; border-right: 1px solid #eee; background-color: #fff; z-index: 10;}
|
||||||
.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
|
.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
|
||||||
.layui-layer-tabmain{line-height:24px; clear:both;}
|
.layui-layer-tabmain{line-height:24px; clear:both;}
|
||||||
.layui-layer-tabmain .layui-layer-tabli{display:none;}
|
.layui-layer-tabmain .layui-layer-tabli{display:none;}
|
||||||
.layui-layer-tabmain .layui-layer-tabli.layui-this{display: block;}
|
.layui-layer-tabmain .layui-layer-tabli.layui-this{display: block;}
|
||||||
|
|
||||||
/* photo模式 */
|
/* photo模式 */
|
||||||
.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}
|
.layui-layer-photos{background: none; box-shadow: none;}
|
||||||
.layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;}
|
.layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;}
|
||||||
.layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;}
|
.layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;}
|
||||||
.layui-layer-imguide,.layui-layer-imgbar{display:none;}
|
.layui-layer-imgprev, .layui-layer-imgnext{position: fixed; top: 50%; width: 27px; _width: 44px; height: 44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());}
|
||||||
.layui-layer-imgprev, .layui-layer-imgnext{position:absolute; top:50%; width:27px; _width:44px; height:44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());}
|
.layui-layer-imgprev{left: 30px; background-position:-5px -5px; _background-position:-70px -5px;}
|
||||||
.layui-layer-imgprev{left:10px; background-position:-5px -5px; _background-position:-70px -5px;}
|
|
||||||
.layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;}
|
.layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;}
|
||||||
.layui-layer-imgnext{right:10px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;}
|
.layui-layer-imgnext{right: 30px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;}
|
||||||
.layui-layer-imgnext:hover{background-position: -33px -50px; _background-position: -120px -50px;}
|
.layui-layer-imgnext:hover{background-position: -33px -50px; _background-position: -120px -50px;}
|
||||||
.layui-layer-imgbar{position:absolute; left:0; bottom:0; width:100%; height:32px; line-height:32px; background-color:rgba(0,0,0,.8); background-color:#000\9; filter:Alpha(opacity=80); color:#fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;}
|
.layui-layer-imgbar{position: fixed; left:0; right: 0; bottom:0; width:100%; height: 40px; line-height: 40px; background-color:#000\9; filter:Alpha(opacity=60); background-color: rgba(2,0,0,.35); color: #fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;}
|
||||||
.layui-layer-imgtit{/*position:absolute; left:20px;*/}
|
.layui-layer-imgtit{/*position:absolute; left:20px;*/}
|
||||||
.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
|
.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
|
||||||
.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;}
|
.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;}
|
||||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 701 B After Width: | Height: | Size: 701 B |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
140
common/src/main/resources/static/layer/3.5/theme/moon/style.css
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
/*
|
||||||
|
* layer皮肤
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
html #layui_layer_skinmoonstylecss {
|
||||||
|
display: none;
|
||||||
|
position: absolute;
|
||||||
|
width: 1989px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body .layer-ext-moon[type="dialog"] {
|
||||||
|
min-width: 320px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon-msg[type="dialog"]{min-width:200px;}
|
||||||
|
body .layer-ext-moon .layui-layer-title {
|
||||||
|
background: #f6f6f6;
|
||||||
|
color: #212a31;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
height: 46px;
|
||||||
|
line-height: 46px;
|
||||||
|
border-bottom: 1px solid #D5D5D5;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
body .layer-ext-moon .layui-layer-content .layui-layer-ico {
|
||||||
|
height: 32px;
|
||||||
|
width: 32px;
|
||||||
|
top:18.5px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico0 {
|
||||||
|
background: url(default.png) no-repeat -96px 0;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico1 {
|
||||||
|
background: url(default.png) no-repeat -224px 0;
|
||||||
|
;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico2 {
|
||||||
|
background: url(default.png) no-repeat -192px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico3 {
|
||||||
|
background: url(default.png) no-repeat -160px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico4 {
|
||||||
|
background: url(default.png) no-repeat -320px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico5 {
|
||||||
|
background: url(default.png) no-repeat -288px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico6 {
|
||||||
|
background: url(default.png) -256px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-ico7 {
|
||||||
|
background: url(default.png) no-repeat -128px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin {
|
||||||
|
top: 15px;
|
||||||
|
right: 15px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin a {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover {
|
||||||
|
background-color: #56abe4;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-max {
|
||||||
|
background: url(default.png) no-repeat -80px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover {
|
||||||
|
background: url(default.png) no-repeat -64px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin {
|
||||||
|
background: url(default.png) no-repeat -32px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover {
|
||||||
|
background: url(default.png) no-repeat -16px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2 {
|
||||||
|
background: url(default.png) 0 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover {
|
||||||
|
background: url(default.png) -48px 0;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-padding{padding-top: 24px;}
|
||||||
|
body .layer-ext-moon .layui-layer-btn {
|
||||||
|
text-align: center;
|
||||||
|
padding-top: 15px;
|
||||||
|
padding-bottom:15px;
|
||||||
|
background: #f0f4f7;
|
||||||
|
border-top: 1px #c7c7c7 solid;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-btn a {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin: 0 3px;
|
||||||
|
margin-right: 7px;
|
||||||
|
margin-left: 7px;
|
||||||
|
padding: 6px 20px;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid #0064b6;
|
||||||
|
background: #0071ce;
|
||||||
|
border-radius: 3px;
|
||||||
|
display: inline-block;
|
||||||
|
height: 20px;
|
||||||
|
line-height: 20px;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
text-decoration: none;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-btn .layui-layer-btn0 {
|
||||||
|
background: #0071ce;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-btn .layui-layer-btn1 {
|
||||||
|
background: #fff;
|
||||||
|
color: #404a58;
|
||||||
|
border: 1px solid #c0c4cd;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-btn .layui-layer-btn2 {
|
||||||
|
background: #f60;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid #f60;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
body .layer-ext-moon .layui-layer-btn .layui-layer-btn3 {
|
||||||
|
background: #f00;
|
||||||
|
color: #fff;
|
||||||
|
border: 1px solid #f00;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{
|
||||||
|
height:47px;
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<script src="${ctxStatic}/bootstrap/js/bootstrap.min.js"></script>
|
<script src="${ctxStatic}/bootstrap/js/bootstrap.min.js"></script>
|
||||||
<script src="${ctxStatic}/select2/4.0/select2.js?${_version}"></script>
|
<script src="${ctxStatic}/select2/4.0/select2.js?${_version}"></script>
|
||||||
<script src="${ctxStatic}/select2/4.0/i18n/${lang()}.js?${_version}"></script>
|
<script src="${ctxStatic}/select2/4.0/i18n/${lang()}.js?${_version}"></script>
|
||||||
<script src="${ctxStatic}/layer/3.1/layer.js?${_version}"></script>
|
<script src="${ctxStatic}/layer/3.5/layer.js?${_version}"></script>
|
||||||
<script src="${ctxStatic}/laydate/5.3/laydate.js?${_version}"></script>
|
<script src="${ctxStatic}/laydate/5.3/laydate.js?${_version}"></script>
|
||||||
<% if (@ListUtils.inString('zTree', libs!)){ %>
|
<% if (@ListUtils.inString('zTree', libs!)){ %>
|
||||||
<script src="${ctxStatic}/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js?${_version}"></script>
|
<script src="${ctxStatic}/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js?${_version}"></script>
|
||||||
|
|||||||