mirror of https://gitee.com/karson/fastadmin.git
修复升级到最新版Layer导致样式错误的BUG
parent
a03435bf70
commit
c42f07928b
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -178,7 +178,7 @@ define("require-backend", function(){});
|
|||
define('../libs/require-css/css.min',[],function(){if("undefined"==typeof window)return{load:function(a,b,c){c()}};var a=document.getElementsByTagName("head")[0],b=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,c=!1,d=!0;b[1]||b[7]?c=parseInt(b[1])<6||parseInt(b[7])<=9:b[2]||b[8]?d=!1:b[4]&&(c=parseInt(b[4])<18);var e={};e.pluginBuilder="./css-builder";var f,g,h,i=function(){f=document.createElement("style"),a.appendChild(f),g=f.styleSheet||f.sheet},j=0,k=[],l=function(a){g.addImport(a),f.onload=function(){m()},j++,31==j&&(i(),j=0)},m=function(){h();var a=k.shift();return a?(h=a[1],void l(a[0])):void(h=null)},n=function(a,b){if(g&&g.addImport||i(),g&&g.addImport)h?k.push([a,b]):(l(a),h=b);else{f.textContent='@import "'+a+'";';var c=setInterval(function(){try{f.sheet.cssRules,clearInterval(c),b()}catch(a){}},10)}},o=function(b,c){var e=document.createElement("link");if(e.type="text/css",e.rel="stylesheet",d)e.onload=function(){e.onload=function(){},setTimeout(c,7)};else var f=setInterval(function(){for(var a=0;a<document.styleSheets.length;a++){var b=document.styleSheets[a];if(b.href==e.href)return clearInterval(f),c()}},10);e.href=b,a.appendChild(e)};return e.normalize=function(a,b){return".css"==a.substr(a.length-4,4)&&(a=a.substr(0,a.length-4)),b(a)},e.load=function(a,b,d,e){(c?n:o)(b.toUrl(a+".css"),d)},e});
|
||||
/**
|
||||
|
||||
@Name:layer v3.0.3 Web弹层组件
|
||||
@Name:layer v3.1.1 Web弹层组件
|
||||
@Author:贤心
|
||||
@Site:http://layer.layui.com
|
||||
@License:MIT
|
||||
|
|
@ -190,21 +190,67 @@ define('../libs/require-css/css.min',[],function(){if("undefined"==typeof window
|
|||
|
||||
var isLayui = window.layui && layui.define, $, win, ready = {
|
||||
getPath: function(){
|
||||
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
|
||||
if(script.getAttribute('merge')) return;
|
||||
return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
|
||||
var jsPath = document.currentScript ? document.currentScript.src : function(){
|
||||
var js = document.scripts
|
||||
,last = js.length - 1
|
||||
,src;
|
||||
for(var i = last; i > 0; i--){
|
||||
if(js[i].readyState === 'interactive'){
|
||||
src = js[i].src;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return src || js[last].src;
|
||||
}();
|
||||
return jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
|
||||
}(),
|
||||
|
||||
config: {}, end: {}, minIndex: 0, minLeft: [],
|
||||
btn: ['确定', '取消'],
|
||||
|
||||
//五种原始层模式
|
||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips']
|
||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
|
||||
|
||||
//获取节点的style属性值
|
||||
getStyle: function(node, name){
|
||||
var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);
|
||||
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
||||
},
|
||||
|
||||
//载入CSS配件
|
||||
link: function(href, fn, cssname){
|
||||
|
||||
//未设置路径,则不主动加载css
|
||||
if(!layer.path) return;
|
||||
|
||||
var head = document.getElementsByTagName("head")[0], link = document.createElement('link');
|
||||
if(typeof fn === 'string') cssname = fn;
|
||||
var app = (cssname || href).replace(/\.|\//g, '');
|
||||
var id = 'layuicss-'+ app, timeout = 0;
|
||||
|
||||
link.rel = 'stylesheet';
|
||||
link.href = layer.path + href;
|
||||
link.id = id;
|
||||
|
||||
if(!document.getElementById(id)){
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
if(typeof fn !== 'function') return;
|
||||
|
||||
//轮询css是否加载完毕
|
||||
(function poll() {
|
||||
if(++timeout > 8 * 1000 / 100){
|
||||
return window.console && console.error('layer.css: Invalid');
|
||||
};
|
||||
parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100);
|
||||
}());
|
||||
}
|
||||
};
|
||||
|
||||
//默认内置方法。
|
||||
var layer = {
|
||||
v: '3.0.3',
|
||||
v: '3.1.1',
|
||||
ie: function(){ //ie版本
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
|
||||
|
|
@ -225,45 +271,16 @@ var layer = {
|
|||
|
||||
isLayui
|
||||
? layui.addcss('modules/layer/' + options.extend)
|
||||
: layer.link('skin/' + options.extend);
|
||||
: ready.link('theme/' + options.extend);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
//载入CSS配件
|
||||
link: function(href, fn, cssname){
|
||||
|
||||
//未设置路径,则不主动加载css
|
||||
if(!layer.path) return;
|
||||
|
||||
var head = $('head')[0], link = document.createElement('link');
|
||||
if(typeof fn === 'string') cssname = fn;
|
||||
var app = (cssname || href).replace(/\.|\//g, '');
|
||||
var id = 'layuicss-'+app, timeout = 0;
|
||||
|
||||
link.rel = 'stylesheet';
|
||||
link.href = layer.path + href;
|
||||
link.id = id;
|
||||
|
||||
if(!$('#'+ id)[0]){
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
if(typeof fn !== 'function') return;
|
||||
|
||||
//轮询css是否加载完毕
|
||||
(function poll() {
|
||||
if(++timeout > 8 * 1000 / 100){
|
||||
return window.console && console.error('layer.css: Invalid');
|
||||
};
|
||||
parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
|
||||
}());
|
||||
},
|
||||
|
||||
|
||||
//主体CSS等待事件
|
||||
ready: function(callback){
|
||||
var cssname = 'skinlayercss', ver = '303';
|
||||
isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
|
||||
: layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);
|
||||
var cssname = 'layer', ver = ''
|
||||
,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver;
|
||||
isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
@ -354,7 +371,7 @@ 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'];
|
||||
doms.anim = ['layer-anim', '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'];
|
||||
|
||||
//默认配置
|
||||
Class.pt.config = {
|
||||
|
|
@ -390,7 +407,7 @@ Class.pt.vessel = function(conType, callback){
|
|||
config.zIndex = zIndex;
|
||||
callback([
|
||||
//遮罩
|
||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
|
||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-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;') +'">'
|
||||
|
|
@ -484,6 +501,12 @@ Class.pt.creat = function(){
|
|||
that.layero = $('#'+ doms[0] + times);
|
||||
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
||||
}).auto(times);
|
||||
|
||||
//遮罩
|
||||
$('#layui-layer-shade'+ that.index).css({
|
||||
'background-color': config.shade[1] || '#000'
|
||||
,'opacity': config.shade[0]||config.shade
|
||||
});
|
||||
|
||||
config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
|
||||
|
||||
|
|
@ -504,7 +527,10 @@ Class.pt.creat = function(){
|
|||
|
||||
//为兼容jQuery3.0的css动画影响元素尺寸计算
|
||||
if(doms.anim[config.anim]){
|
||||
that.layero.addClass(doms.anim[config.anim]);
|
||||
var animClass = 'layer-anim '+ doms.anim[config.anim];
|
||||
that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
|
||||
$(this).removeClass(animClass);
|
||||
});
|
||||
};
|
||||
|
||||
//记录关闭动画
|
||||
|
|
@ -516,6 +542,7 @@ Class.pt.creat = function(){
|
|||
//自适应
|
||||
Class.pt.auto = function(index){
|
||||
var that = this, config = that.config, layero = $('#'+ doms[0] + index);
|
||||
|
||||
if(config.area[0] === '' && config.maxWidth > 0){
|
||||
//为了修复IE7下一个让人难以理解的bug
|
||||
if(layer.ie && layer.ie < 8 && config.btn){
|
||||
|
|
@ -523,20 +550,25 @@ Class.pt.auto = function(index){
|
|||
}
|
||||
layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
|
||||
}
|
||||
var area = [layero.innerWidth(), layero.innerHeight()];
|
||||
var titHeight = layero.find(doms[1]).outerHeight() || 0;
|
||||
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
|
||||
function setHeight(elem){
|
||||
|
||||
var area = [layero.innerWidth(), layero.innerHeight()]
|
||||
,titHeight = layero.find(doms[1]).outerHeight() || 0
|
||||
,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
|
||||
,setHeight = function(elem){
|
||||
elem = layero.find(elem);
|
||||
elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
|
||||
}
|
||||
};
|
||||
|
||||
switch(config.type){
|
||||
case 2:
|
||||
setHeight('iframe');
|
||||
break;
|
||||
default:
|
||||
if(config.area[1] === ''){
|
||||
if(config.fixed && area[1] >= win.height()){
|
||||
if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){
|
||||
area[1] = config.maxHeight;
|
||||
setHeight('.'+doms[5]);
|
||||
} else if(config.fixed && area[1] >= win.height()){
|
||||
area[1] = win.height();
|
||||
setHeight('.'+doms[5]);
|
||||
}
|
||||
|
|
@ -544,7 +576,8 @@ Class.pt.auto = function(index){
|
|||
setHeight('.'+doms[5]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -1075,7 +1108,7 @@ layer.close = function(index){
|
|||
};
|
||||
|
||||
if(layero.data('isOutAnim')){
|
||||
layero.addClass(closeAnim);
|
||||
layero.addClass('layer-anim '+ closeAnim);
|
||||
}
|
||||
|
||||
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
|
||||
|
|
@ -1164,6 +1197,7 @@ layer.tab = function(options){
|
|||
options = options || {};
|
||||
|
||||
var tab = options.tab || {}
|
||||
,THIS = 'layui-this'
|
||||
,success = options.success;
|
||||
|
||||
delete options.success;
|
||||
|
|
@ -1175,7 +1209,7 @@ layer.tab = function(options){
|
|||
title: function(){
|
||||
var len = tab.length, ii = 1, str = '';
|
||||
if(len > 0){
|
||||
str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
|
||||
str = '<span class="'+ THIS +'">'+ tab[0].title +'</span>';
|
||||
for(; ii < len; ii++){
|
||||
str += '<span>'+ tab[ii].title +'</span>';
|
||||
}
|
||||
|
|
@ -1185,7 +1219,7 @@ layer.tab = function(options){
|
|||
content: '<ul class="layui-layer-tabmain">'+ function(){
|
||||
var len = tab.length, ii = 1, str = '';
|
||||
if(len > 0){
|
||||
str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
|
||||
str = '<li class="layui-layer-tabli '+ THIS +'">'+ (tab[0].content || 'no content') +'</li>';
|
||||
for(; ii < len; ii++){
|
||||
str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
|
||||
}
|
||||
|
|
@ -1198,7 +1232,7 @@ layer.tab = function(options){
|
|||
btn.on('mousedown', function(e){
|
||||
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
|
||||
var othis = $(this), index = othis.index();
|
||||
othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
|
||||
othis.addClass(THIS).siblings().removeClass(THIS);
|
||||
main.eq(index).show().siblings().hide();
|
||||
typeof options.change === 'function' && options.change(index);
|
||||
});
|
||||
|
|
@ -1429,7 +1463,7 @@ window.layui && layui.define ? (
|
|||
layer.ready()
|
||||
,layui.define('jquery', function(exports){ //layui加载
|
||||
layer.path = layui.cache.dir;
|
||||
ready.run(layui.jquery);
|
||||
ready.run(layui.$);
|
||||
|
||||
//暴露模块
|
||||
window.layer = layer;
|
||||
|
|
@ -2245,7 +2279,7 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u
|
|||
});
|
||||
|
||||
//! moment.js
|
||||
//! version : 2.19.1
|
||||
//! version : 2.19.3
|
||||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
||||
//! license : MIT
|
||||
//! momentjs.com
|
||||
|
|
@ -2905,7 +2939,7 @@ var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
|
|||
|
||||
// any word (or two) characters or numbers including two/three word month in arabic.
|
||||
// includes scottish gaelic two word and hyphenated months
|
||||
var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
|
||||
var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
|
||||
|
||||
|
||||
var regexes = {};
|
||||
|
|
@ -3060,7 +3094,7 @@ function get (mom, unit) {
|
|||
|
||||
function set$1 (mom, unit, value) {
|
||||
if (mom.isValid() && !isNaN(value)) {
|
||||
if (unit === 'FullYear' && isLeapYear(mom.year())) {
|
||||
if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
|
||||
mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
|
||||
}
|
||||
else {
|
||||
|
|
@ -4166,10 +4200,11 @@ function defineLocale (name, config) {
|
|||
|
||||
function updateLocale(name, config) {
|
||||
if (config != null) {
|
||||
var locale, parentConfig = baseConfig;
|
||||
var locale, tmpLocale, parentConfig = baseConfig;
|
||||
// MERGE
|
||||
if (locales[name] != null) {
|
||||
parentConfig = locales[name]._config;
|
||||
tmpLocale = loadLocale(name);
|
||||
if (tmpLocale != null) {
|
||||
parentConfig = tmpLocale._config;
|
||||
}
|
||||
config = mergeConfigs(parentConfig, config);
|
||||
locale = new Locale(config);
|
||||
|
|
@ -6723,7 +6758,7 @@ addParseToken('x', function (input, array, config) {
|
|||
// Side effect imports
|
||||
|
||||
|
||||
hooks.version = '2.19.1';
|
||||
hooks.version = '2.19.3';
|
||||
|
||||
setHookCallback(createLocal);
|
||||
|
||||
|
|
@ -7240,7 +7275,7 @@ define("bootstrap-table-mobile", ["bootstrap-table"], (function (global) {
|
|||
/*
|
||||
tableExport.jquery.plugin
|
||||
|
||||
Version 1.9.7
|
||||
Version 1.9.8
|
||||
|
||||
Copyright (c) 2015-2017 hhurz, https://github.com/hhurz
|
||||
|
||||
|
|
@ -7248,69 +7283,72 @@ define("bootstrap-table-mobile", ["bootstrap-table"], (function (global) {
|
|||
|
||||
Licensed under the MIT License
|
||||
*/
|
||||
(function(c){c.fn.extend({tableExport:function(l){function R(b){var a=[];c(b).find("thead").first().find("th").each(function(b,e){void 0!==c(e).attr("data-field")?a[b]=c(e).attr("data-field"):a[b]=b.toString()});return a}function K(b){var a="undefined"!==typeof b[0].cellIndex,d="undefined"!==typeof b[0].rowIndex,q=a||d?ta(b):b.is(":visible"),k=b.data("tableexport-display");a&&"none"!=k&&"always"!=k&&(b=c(b[0].parentNode),d="undefined"!==typeof b[0].rowIndex,k=b.data("tableexport-display"));d&&"none"!=
|
||||
k&&"always"!=k&&(k=b.closest("table").data("tableexport-display"));return"none"!==k&&(1==q||"always"==k)}function ta(b){var a=[];M&&(a=G.filter(function(){var a=!1;this.nodeType==b[0].nodeType&&("undefined"!==typeof this.rowIndex&&this.rowIndex==b[0].rowIndex?a=!0:"undefined"!==typeof this.cellIndex&&this.cellIndex==b[0].cellIndex&&"undefined"!==typeof this.parentNode.rowIndex&&"undefined"!==typeof b[0].parentNode.rowIndex&&this.parentNode.rowIndex==b[0].parentNode.rowIndex&&(a=!0));return a}));return 0==
|
||||
M||0==a.length}function da(b,e,d){var q=!1;K(b)?0<a.ignoreColumn.length&&(-1!=c.inArray(d,a.ignoreColumn)||-1!=c.inArray(d-e,a.ignoreColumn)||L.length>d&&"undefined"!=typeof L[d]&&-1!=c.inArray(L[d],a.ignoreColumn))&&(q=!0):q=!0;return q}function y(b,e,d,q,k){if("function"===typeof k){var g=!1;"function"===typeof a.onIgnoreRow&&(g=a.onIgnoreRow(c(b),d));if(!1===g&&-1==c.inArray(d,a.ignoreRow)&&-1==c.inArray(d-q,a.ignoreRow)&&K(c(b))){var w=c(b).find(e),t=0;w.each(function(b){var a=c(this),e,q=1,g=
|
||||
1,C=w.length;if("undefined"!=typeof B[d]&&0<B[d].length){var f=b;for(e=0;e<=f;e++)"undefined"!=typeof B[d][e]&&(!1===da(a,C,b+t)&&k(null,d,e),delete B[d][e],f++);b+=B[d].length;C+=B[d].length}a.is("[colspan]")?(q=parseInt(a.attr("colspan"))||1,t+=0<q?q-1:0):a.is("[rowspan]")&&(g=parseInt(a.attr("rowspan"))||1);if(!1===da(a,C,b+t))for(k(this,d,b),e=1;e<q;e++)k(null,d,b+e);if(1<g)for(a=1;a<g;a++)for("undefined"==typeof B[d+a]&&(B[d+a]=[]),B[d+a][b+t]="",e=1;e<q;e++)B[d+a][b+t-e]=""});if("undefined"!=
|
||||
typeof B[d]&&0<B[d].length)for(b=0;b<=B[d].length;b++)"undefined"!=typeof B[d][b]&&(k(null,d,b),delete B[d][b])}}}function ea(b,e){!0===a.consoleLog&&console.log(b.output());if("string"===a.outputMode)return b.output();if("base64"===a.outputMode)return H(b.output());if("window"===a.outputMode)window.open(URL.createObjectURL(b.output("blob")));else try{var d=b.output("blob");saveAs(d,a.fileName+".pdf")}catch(q){D(a.fileName+".pdf","data:application/pdf"+(e?"":";base64")+",",e?b.output("blob"):b.output())}}
|
||||
function fa(b,a,d){var e=0;"undefined"!=typeof d&&(e=d.colspan);if(0<=e){for(var c=b.width,g=b.textPos.x,w=a.table.columns.indexOf(a.column),t=1;t<e;t++)c+=a.table.columns[w+t].width;1<e&&("right"===b.styles.halign?g=b.textPos.x+c-b.width:"center"===b.styles.halign&&(g=b.textPos.x+(c-b.width)/2));b.width=c;b.textPos.x=g;"undefined"!=typeof d&&1<d.rowspan&&(b.height*=d.rowspan);if("middle"===b.styles.valign||"bottom"===b.styles.valign)d=("string"===typeof b.text?b.text.split(/\r\n|\r|\n/g):b.text).length||
|
||||
1,2<d&&(b.textPos.y-=(2-1.15)/2*a.row.styles.fontSize*(d-2)/3);return!0}return!1}function ha(b,a,d){"undefined"!=typeof d.images&&a.each(function(){var a=c(this).children();if(c(this).is("img")){var e=ia(this.src);d.images[e]={url:this.src,src:this.src}}"undefined"!=typeof a&&0<a.length&&ha(b,a,d)})}function ua(b,a){function d(b){if(b.url){var d=new Image;c=++g;d.crossOrigin="Anonymous";d.onerror=d.onload=function(){if(d.complete&&(0===d.src.indexOf("data:image/")&&(d.width=b.width||d.width||0,d.height=
|
||||
b.height||d.height||0),d.width+d.height)){var e=document.createElement("canvas"),q=e.getContext("2d");e.width=d.width;e.height=d.height;q.drawImage(d,0,0);b.src=e.toDataURL("image/jpeg")}--g||a(c)};d.src=b.url}}var e,c=0,g=0;if("undefined"!=typeof b.images)for(e in b.images)b.images.hasOwnProperty(e)&&d(b.images[e]);(e=g)||(a(c),e=void 0);return e}function ja(b,e,d){e.each(function(){var e=c(this).children(),k=0;if(c(this).is("div")){var g=S(I(this,"background-color"),[255,255,255]),w=S(I(this,"border-top-color"),
|
||||
[0,0,0]),t=T(this,"border-top-width",a.jspdf.unit),C=this.getBoundingClientRect(),f=this.offsetLeft*d.dw;k=this.offsetTop*d.dh;var h=C.width*d.dw;C=C.height*d.dh;d.doc.setDrawColor.apply(void 0,w);d.doc.setFillColor.apply(void 0,g);d.doc.setLineWidth(t);d.doc.rect(b.x+f,b.y+k,h,C,t?"FD":"F")}else if(c(this).is("img")&&"undefined"!=typeof d.images&&(g=ia(this.src),g=d.images[g],"undefined"!=typeof g)){w=b.width/b.height;t=this.width/this.height;f=b.width;h=b.height;C=19.049976/25.4;t<=w?(h=Math.min(b.height,
|
||||
this.height),f=this.width*h/this.height):t>w&&(f=Math.min(b.width,this.width),h=this.height*f/this.width);f*=C;h*=C;h<b.height&&(k=(b.height-h)/2);try{d.doc.addImage(g.src,b.textPos.x,b.y+k,f,h)}catch(xa){}b.textPos.x+=f}"undefined"!=typeof e&&0<e.length&&ja(b,e,d)})}function ka(b,a,d){if("function"===typeof d.onAutotableText)d.onAutotableText(d.doc,b,a);else{var e=b.textPos.x,k=b.textPos.y,g={halign:b.styles.halign,valign:b.styles.valign};if(a.length){for(a=a[0];a.previousSibling;)a=a.previousSibling;
|
||||
for(var w=!1,t=!1;a;){var f=a.innerText||a.textContent||"";f=(f.length&&" "==f[0]?" ":"")+c.trim(f)+(1<f.length&&" "==f[f.length-1]?" ":"");c(a).is("br")&&(e=b.textPos.x,k+=d.doc.internal.getFontSize());c(a).is("b")?w=!0:c(a).is("i")&&(t=!0);(w||t)&&d.doc.setFontType(w&&t?"bolditalic":w?"bold":"italic");var h=d.doc.getStringUnitWidth(f)*d.doc.internal.getFontSize();if(h){if("linebreak"===b.styles.overflow&&e>b.textPos.x&&e+h>b.textPos.x+b.width){if(0<=".,!%*;:=-".indexOf(f.charAt(0))){var l=f.charAt(0);
|
||||
h=d.doc.getStringUnitWidth(l)*d.doc.internal.getFontSize();e+h<=b.textPos.x+b.width&&(d.doc.autoTableText(l,e,k,g),f=f.substring(1,f.length));h=d.doc.getStringUnitWidth(f)*d.doc.internal.getFontSize()}e=b.textPos.x;k+=d.doc.internal.getFontSize()}for(;f.length&&e+h>b.textPos.x+b.width;)f=f.substring(0,f.length-1),h=d.doc.getStringUnitWidth(f)*d.doc.internal.getFontSize();d.doc.autoTableText(f,e,k,g);e+=h}if(w||t)c(a).is("b")?w=!1:c(a).is("i")&&(t=!1),d.doc.setFontType(w||t?w?"bold":"italic":"normal");
|
||||
a=a.nextSibling}b.textPos.x=e;b.textPos.y=k}else d.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,g)}}function U(b,a,d){return b.replace(new RegExp(a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),"g"),d)}function X(b){b=U(b||"0",a.numbers.html.thousandsSeparator,"");b=U(b,a.numbers.html.decimalMark,".");return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function x(b,e,d){var q="";if(null!==b){var k=c(b);if(k[0].hasAttribute("data-tableexport-value"))var g=(g=k.data("tableexport-value"))?g+
|
||||
"":"";else if(g=k.html(),"function"===typeof a.onCellHtmlData)g=a.onCellHtmlData(k,e,d,g);else if(""!=g){b=c.parseHTML(g);var f=0,t=0;g="";c.each(b,function(){if(c(this).is("input"))g+=k.find("input").eq(f++).val();else if(c(this).is("select"))g+=k.find("select option:selected").eq(t++).text();else if("undefined"===typeof c(this).html())g+=c(this).text();else if(void 0===jQuery().bootstrapTable||!0!==c(this).hasClass("filterControl"))g+=c(this).html()})}if(!0===a.htmlContent)q=c.trim(g);else if(g&&
|
||||
""!=g){var h=g.replace(/\n/g,"\u2028").replace(/<br\s*[\/]?>/gi,"\u2060"),l=c("<div/>").html(h).contents();b=!1;h="";c.each(l.text().split("\u2028"),function(b,a){0<b&&(h+=" ");h+=c.trim(a)});c.each(h.split("\u2060"),function(b,a){0<b&&(q+="\n");q+=c.trim(a).replace(/\u00AD/g,"")});if("json"==a.type||"excel"===a.type&&"xmlss"===a.excelFileFormat||!1===a.numbers.output)b=X(q),!1!==b&&(q=Number(b));else if(a.numbers.html.decimalMark!=a.numbers.output.decimalMark||a.numbers.html.thousandsSeparator!=
|
||||
a.numbers.output.thousandsSeparator)if(b=X(q),!1!==b){l=(""+b.substr(0>b?1:0)).split(".");1==l.length&&(l[1]="");var m=3<l[0].length?l[0].length%3:0;q=(0>b?"-":"")+(a.numbers.output.thousandsSeparator?(m?l[0].substr(0,m)+a.numbers.output.thousandsSeparator:"")+l[0].substr(m).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):l[0])+(l[1].length?a.numbers.output.decimalMark+l[1]:"")}}!0===a.escape&&(q=escape(q));"function"===typeof a.onCellData&&(q=a.onCellData(k,e,d,q))}return q}function va(b,
|
||||
a,d){return a+"-"+d.toLowerCase()}function S(b,a){var d=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b),e=a;d&&(e=[parseInt(d[1]),parseInt(d[2]),parseInt(d[3])]);return e}function la(a){var b=I(a,"text-align"),d=I(a,"font-weight"),q=I(a,"font-style"),k="";"start"==b&&(b="rtl"==I(a,"direction")?"right":"left");700<=d&&(k="bold");"italic"==q&&(k+=q);""===k&&(k="normal");b={style:{align:b,bcolor:S(I(a,"background-color"),[255,255,255]),color:S(I(a,"color"),[0,0,0]),fstyle:k},colspan:parseInt(c(a).attr("colspan"))||
|
||||
0,rowspan:parseInt(c(a).attr("rowspan"))||0};null!==a&&(a=a.getBoundingClientRect(),b.rect={width:a.width,height:a.height});return b}function I(a,e){try{return window.getComputedStyle?(e=e.replace(/([a-z])([A-Z])/,va),window.getComputedStyle(a,null).getPropertyValue(e)):a.currentStyle?a.currentStyle[e]:a.style[e]}catch(d){}return""}function T(a,e,d){e=I(a,e).match(/\d+/);if(null!==e){e=e[0];a=a.parentElement;var b=document.createElement("div");b.style.overflow="hidden";b.style.visibility="hidden";
|
||||
a.appendChild(b);b.style.width=100+d;d=100/b.offsetWidth;a.removeChild(b);return e*d}return 0}function Y(){if(!(this instanceof Y))return new Y;this.SheetNames=[];this.Sheets={}}function ma(a){for(var b=new ArrayBuffer(a.length),d=new Uint8Array(b),c=0;c!=a.length;++c)d[c]=a.charCodeAt(c)&255;return b}function wa(a){for(var b={},d={s:{c:1E7,r:1E7},e:{c:0,r:0}},c=0;c!=a.length;++c)for(var k=0;k!=a[c].length;++k){d.s.r>c&&(d.s.r=c);d.s.c>k&&(d.s.c=k);d.e.r<c&&(d.e.r=c);d.e.c<k&&(d.e.c=k);var g={v:a[c][k]};
|
||||
if(null!==g.v){var f=XLSX.utils.encode_cell({c:k,r:c});if("number"===typeof g.v)g.t="n";else if("boolean"===typeof g.v)g.t="b";else if(g.v instanceof Date){g.t="n";g.z=XLSX.SSF._table[14];var t=g;var h=(Date.parse(g.v)-new Date(Date.UTC(1899,11,30)))/864E5;t.v=h}else g.t="s";b[f]=g}}1E7>d.s.c&&(b["!ref"]=XLSX.utils.encode_range(d));return b}function ia(a){var b=0,d;if(0===a.length)return b;var c=0;for(d=a.length;c<d;c++){var k=a.charCodeAt(c);b=(b<<5)-b+k;b|=0}return b}function D(a,e,d){var b=window.navigator.userAgent;
|
||||
if(!1!==a&&(0<b.indexOf("MSIE ")||b.match(/Trident.*rv\:11\./)))if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([d]),a);else{if(e=document.createElement("iframe"))document.body.appendChild(e),e.setAttribute("style","display:none"),e.contentDocument.open("txt/html","replace"),e.contentDocument.write(d),e.contentDocument.close(),e.focus(),e.contentDocument.execCommand("SaveAs",!0,a),document.body.removeChild(e)}else if(b=document.createElement("a")){var c=null;b.style.display=
|
||||
"none";!1!==a?b.download=a:b.target="_blank";"object"==typeof d?(c=window.URL.createObjectURL(d),b.href=c):0<=e.toLowerCase().indexOf("base64,")?b.href=e+H(d):b.href=e+encodeURIComponent(d);document.body.appendChild(b);if(document.createEvent)null===V&&(V=document.createEvent("MouseEvents")),V.initEvent("click",!0,!1),b.dispatchEvent(V);else if(document.createEventObject)b.fireEvent("onclick");else if("function"==typeof b.onclick)b.onclick();c&&window.URL.revokeObjectURL(c);document.body.removeChild(b)}}
|
||||
function H(a){var b,d="",c=0;a=a.replace(/\x0d\x0a/g,"\n");var k="";for(b=0;b<a.length;b++){var g=a.charCodeAt(b);128>g?k+=String.fromCharCode(g):(127<g&&2048>g?k+=String.fromCharCode(g>>6|192):(k+=String.fromCharCode(g>>12|224),k+=String.fromCharCode(g>>6&63|128)),k+=String.fromCharCode(g&63|128))}for(a=k;c<a.length;){var f=a.charCodeAt(c++);k=a.charCodeAt(c++);b=a.charCodeAt(c++);g=f>>2;f=(f&3)<<4|k>>4;var t=(k&15)<<2|b>>6;var h=b&63;isNaN(k)?t=h=64:isNaN(b)&&(h=64);d=d+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(t)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)}return d}var a={consoleLog:!1,csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,excelFileFormat:"xlshtml",excelRTL:!1,excelstyles:[],fileName:"tableExport",htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",
|
||||
format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"left",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"center"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,onAutotableText:null,onTable:null,outputImages:!0}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},
|
||||
output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,onIgnoreRow:null,onMsoNumberFormat:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"myTableName",type:"csv",worksheetName:"Worksheet"},u=this,V=null,p=[],h=[],n=0,B=[],m="",L=[],G=[],M=!1;c.extend(!0,a,l);L=R(u);if("csv"==a.type||"tsv"==a.type||"txt"==a.type){var E="",O=0;
|
||||
n=0;var Z=function(b,e,d){b.each(function(){m="";y(this,e,n,d+b.length,function(b,d,c){var e=m,g="";if(null!==b)if(b=x(b,d,c),d=null===b||""===b?"":b.toString(),"tsv"==a.type)b instanceof Date&&b.toLocaleString(),g=U(d,"\t"," ");else if(b instanceof Date)g=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(g=U(d,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=g.indexOf(a.csvSeparator)||/[\r\n ]/g.test(g))g=a.csvEnclosure+g+a.csvEnclosure;m=e+(g+("tsv"==a.type?"\t":a.csvSeparator))});m=c.trim(m).substring(0,
|
||||
m.length-1);0<m.length&&(0<E.length&&(E+="\n"),E+=m);n++});return b.length};O+=Z(c(u).find("thead").first().find(a.theadSelector),"th,td",O);c(u).find("tbody").each(function(){O+=Z(c(this).find(a.tbodySelector),"td,th",O)});a.tfootSelector.length&&Z(c(u).find("tfoot").first().find(a.tfootSelector),"td,th",O);E+="\n";!0===a.consoleLog&&console.log(E);if("string"===a.outputMode)return E;if("base64"===a.outputMode)return H(E);if("window"===a.outputMode){D(!1,"data:text/"+("csv"==a.type?"csv":"plain")+
|
||||
";charset=utf-8,",E);return}try{var z=new Blob([E],{type:"text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8"});saveAs(z,a.fileName+"."+a.type,"csv"!=a.type||!1===a.csvUseBOM)}catch(b){D(a.fileName+"."+a.type,"data:text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8,"+("csv"==a.type&&a.csvUseBOM?"\ufeff":""),E)}}else if("sql"==a.type){n=0;var v="INSERT INTO `"+a.tableName+"` (";p=c(u).find("thead").first().find(a.theadSelector);p.each(function(){y(this,"th,td",n,p.length,function(a,c,d){v+="'"+
|
||||
x(a,c,d)+"',"});n++;v=c.trim(v);v=c.trim(v).substring(0,v.length-1)});v+=") VALUES ";c(u).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,c(u).find("tfoot").find(a.tfootSelector));c(h).each(function(){m="";y(this,"td,th",n,p.length+h.length,function(a,c,d){m+="'"+x(a,c,d)+"',"});3<m.length&&(v+="("+m,v=c.trim(v).substring(0,v.length-1),v+="),");n++});v=c.trim(v).substring(0,v.length-1);v+=";";!0===a.consoleLog&&console.log(v);if("string"===
|
||||
a.outputMode)return v;if("base64"===a.outputMode)return H(v);try{z=new Blob([v],{type:"text/plain;charset=utf-8"}),saveAs(z,a.fileName+".sql")}catch(b){D(a.fileName+".sql","data:application/sql;charset=utf-8,",v)}}else if("json"==a.type){var N=[];p=c(u).find("thead").first().find(a.theadSelector);p.each(function(){var a=[];y(this,"th,td",n,p.length,function(b,d,c){a.push(x(b,d,c))});N.push(a)});var aa=[];c(u).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&
|
||||
h.push.apply(h,c(u).find("tfoot").find(a.tfootSelector));c(h).each(function(){var a={},e=0;y(this,"td,th",n,p.length+h.length,function(b,c,k){N.length?a[N[N.length-1][e]]=x(b,c,k):a[e]=x(b,c,k);e++});!1===c.isEmptyObject(a)&&aa.push(a);n++});l="";l="head"==a.jsonScope?JSON.stringify(N):"data"==a.jsonScope?JSON.stringify(aa):JSON.stringify({header:N,data:aa});!0===a.consoleLog&&console.log(l);if("string"===a.outputMode)return l;if("base64"===a.outputMode)return H(l);try{z=new Blob([l],{type:"application/json;charset=utf-8"}),
|
||||
saveAs(z,a.fileName+".json")}catch(b){D(a.fileName+".json","data:application/json;charset=utf-8;base64,",l)}}else if("xml"===a.type){n=0;var F='<?xml version="1.0" encoding="utf-8"?>';F+="<tabledata><fields>";p=c(u).find("thead").first().find(a.theadSelector);p.each(function(){y(this,"th,td",n,p.length,function(a,c,d){F+="<field>"+x(a,c,d)+"</field>"});n++});F+="</fields><data>";var na=1;c(u).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,
|
||||
c(u).find("tfoot").find(a.tfootSelector));c(h).each(function(){var a=1;m="";y(this,"td,th",n,p.length+h.length,function(b,d,c){m+="<column-"+a+">"+x(b,d,c)+"</column-"+a+">";a++});0<m.length&&"<column-1></column-1>"!=m&&(F+='<row id="'+na+'">'+m+"</row>",na++);n++});F+="</data></tabledata>";!0===a.consoleLog&&console.log(F);if("string"===a.outputMode)return F;if("base64"===a.outputMode)return H(F);try{z=new Blob([F],{type:"application/xml;charset=utf-8"}),saveAs(z,a.fileName+".xml")}catch(b){D(a.fileName+
|
||||
".xml","data:application/xml;charset=utf-8;base64,",F)}}else if("excel"===a.type&&"xmlss"===a.excelFileFormat){var ba=[];c(u).filter(function(){return K(c(this))}).each(function(){var b=c(this),e="";G=b.find("tr, th, td").filter(":hidden");M=0<G.length;n=0;L=R(this);p=b.find("thead").first().find(a.theadSelector);e+="<Table>";var d=0;p.each(function(){m="";y(this,"th,td",n,p.length,function(a,b,c){null!==a&&(m+='<Cell><Data ss:Type="String">'+x(a,b,c)+"</Data></Cell>",d++)});0<m.length&&(e+="<Row>"+
|
||||
m+"</Row>");n++});h=[];b.find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});c(h).each(function(){m="";y(this,"td,th",n,p.length+h.length,function(a,b,d){if(null!==a){var c="String",e="";a=x(a,b,d);!1!==jQuery.isNumeric(a)?c="Number":(b=a,-1<b.indexOf("%")?(b=X(b.replace(/%/g,"")),!1!==b&&(b/=100)):b=!1,!1!==b&&(a=b,c="Number",e=' ss:StyleID="pct1"'));"Number"!==c&&(a=a.replace(/\n/g,"<br>"));m+="<Cell"+e+'><Data ss:Type="'+c+'">'+a+"</Data></Cell>"}});0<m.length&&(e+="<Row>"+
|
||||
m+"</Row>");n++});e+="</Table>";ba.push(e);!0===a.consoleLog&&console.log(e)});l='<?xml version="1.0" encoding="UTF-8"?><?mso-application progid="Excel.Sheet"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"> <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> <Created>'+
|
||||
(new Date).toISOString()+'</Created> </DocumentProperties> <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> <AllowPNG/> </OfficeDocumentSettings> <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <WindowHeight>9000</WindowHeight> <WindowWidth>13860</WindowWidth> <WindowTopX>0</WindowTopX> <WindowTopY>0</WindowTopY> <ProtectStructure>False</ProtectStructure> <ProtectWindows>False</ProtectWindows> </ExcelWorkbook> <Styles> <Style ss:ID="Default" ss:Name="Default"> <Alignment ss:Vertical="Center"/> <Borders/> <Font/> <Interior/> <NumberFormat/> <Protection/> </Style> <Style ss:ID="Normal" ss:Name="Normal"/> <Style ss:ID="pct1"> <NumberFormat ss:Format="Percent"/> </Style> </Styles>';
|
||||
for(var A=0;A<ba.length;A++)l+='<Worksheet ss:Name="'+("string"===typeof a.worksheetName?a.worksheetName+" "+(A+1):"undefined"!==typeof a.worksheetName[A]?a.worksheetName[A]:"Table "+(A+1))+'" ss:RightToLeft="'+(a.excelRTL?"1":"0")+'">'+ba[A],l=a.excelRTL?l+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> <DisplayRightToLeft/> </WorksheetOptions> ':l+"<WorksheetOptions/> ",l+="</Worksheet>";l+="</Workbook>";!0===a.consoleLog&&console.log(l);if("string"===a.outputMode)return l;if("base64"===
|
||||
a.outputMode)return H(l);try{z=new Blob([l],{type:"application/xml;charset=utf-8"}),saveAs(z,a.fileName+".xml")}catch(b){D(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",l)}}else if("excel"==a.type||"xls"==a.type||"word"==a.type||"doc"==a.type){l="excel"==a.type||"xls"==a.type?"excel":"word";A="excel"==l?"xls":"doc";var r='xmlns:x="urn:schemas-microsoft-com:office:'+l+'"',J="";c(u).filter(function(){return K(c(this))}).each(function(){var b=c(this);G=b.find("tr, th, td").filter(":hidden");
|
||||
M=0<G.length;n=0;L=R(this);J+="<table><thead>";p=b.find("thead").first().find(a.theadSelector);p.each(function(){m="";y(this,"th,td",n,p.length,function(b,d,f){if(null!==b){var e="";m+="<th";for(var g in a.excelstyles)if(a.excelstyles.hasOwnProperty(g)){var h=c(b).css(a.excelstyles[g]);""!==h&&"0px none rgb(0, 0, 0)"!=h&&"rgba(0, 0, 0, 0)"!=h&&(e+=""===e?'style="':";",e+=a.excelstyles[g]+":"+h)}""!==e&&(m+=" "+e+'"');c(b).is("[colspan]")&&(m+=' colspan="'+c(b).attr("colspan")+'"');c(b).is("[rowspan]")&&
|
||||
(m+=' rowspan="'+c(b).attr("rowspan")+'"');m+=">"+x(b,d,f)+"</th>"}});0<m.length&&(J+="<tr>"+m+"</tr>");n++});J+="</thead><tbody>";b.find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,b.find("tfoot").find(a.tfootSelector));c(h).each(function(){var b=c(this);m="";y(this,"td,th",n,p.length+h.length,function(d,e,f){if(null!==d){var g=x(d,e,f),h="",k=c(d).data("tableexport-msonumberformat");"undefined"==typeof k&&"function"===typeof a.onMsoNumberFormat&&
|
||||
(k=a.onMsoNumberFormat(d,e,f));"undefined"!=typeof k&&""!==k&&(h="style=\"mso-number-format:'"+k+"'");for(var l in a.excelstyles)a.excelstyles.hasOwnProperty(l)&&(k=c(d).css(a.excelstyles[l]),""===k&&(k=b.css(a.excelstyles[l])),""!==k&&"0px none rgb(0, 0, 0)"!=k&&"rgba(0, 0, 0, 0)"!=k&&(h+=""===h?'style="':";",h+=a.excelstyles[l]+":"+k));m+="<td";""!==h&&(m+=" "+h+'"');c(d).is("[colspan]")&&(m+=' colspan="'+c(d).attr("colspan")+'"');c(d).is("[rowspan]")&&(m+=' rowspan="'+c(d).attr("rowspan")+'"');
|
||||
"string"===typeof g&&""!=g&&(g=g.replace(/\n/g,"<br>"));m+=">"+g+"</td>"}});0<m.length&&(J+="<tr>"+m+"</tr>");n++});a.displayTableName&&(J+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+x(c("<p>"+a.tableName+"</p>"))+"</td></tr>");J+="</tbody></table>";!0===a.consoleLog&&console.log(J)});r='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+r+' xmlns="http://www.w3.org/TR/REC-html40">'+('<meta http-equiv="content-type" content="application/vnd.ms-'+l+'; charset=UTF-8">')+"<head>";"excel"===
|
||||
l&&(r+="\x3c!--[if gte mso 9]>",r+="<xml>",r+="<x:ExcelWorkbook>",r+="<x:ExcelWorksheets>",r+="<x:ExcelWorksheet>",r+="<x:Name>",r+=a.worksheetName,r+="</x:Name>",r+="<x:WorksheetOptions>",r+="<x:DisplayGridlines/>",a.excelRTL&&(r+="<x:DisplayRightToLeft/>"),r+="</x:WorksheetOptions>",r+="</x:ExcelWorksheet>",r+="</x:ExcelWorksheets>",r+="</x:ExcelWorkbook>",r+="</xml>",r+="<![endif]--\x3e");r+="<style>br {mso-data-placement:same-cell;}</style>";r+="</head>";r+="<body>";r+=J;r+="</body>";r+="</html>";
|
||||
!0===a.consoleLog&&console.log(r);if("string"===a.outputMode)return r;if("base64"===a.outputMode)return H(r);try{z=new Blob([r],{type:"application/vnd.ms-"+a.type}),saveAs(z,a.fileName+"."+A)}catch(b){D(a.fileName+"."+A,"data:application/vnd.ms-"+l+";base64,",r)}}else if("xlsx"==a.type){var oa=[],ca=[];n=0;h=c(u).find("thead").first().find(a.theadSelector);c(u).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,c(u).find("tfoot").find(a.tfootSelector));
|
||||
c(h).each(function(){var b=[];y(this,"th,td",n,h.length,function(c,d,f){if("undefined"!==typeof c&&null!==c){f=x(c,d,f);d=parseInt(c.getAttribute("colspan"));c=parseInt(c.getAttribute("rowspan"));ca.forEach(function(a){if(n>=a.s.r&&n<=a.e.r&&b.length>=a.s.c&&b.length<=a.e.c)for(var d=0;d<=a.e.c-a.s.c;++d)b.push(null)});if(c||d)d=d||1,ca.push({s:{r:n,c:b.length},e:{r:n+(c||1)-1,c:b.length+d-1}});"function"!==typeof a.onCellData&&""!==f&&f==+f&&(f=+f);b.push(""!==f?f:null);if(d)for(c=0;c<d-1;++c)b.push(null)}});
|
||||
oa.push(b);n++});l=new Y;A=wa(oa);A["!merges"]=ca;l.SheetNames.push(a.worksheetName);l.Sheets[a.worksheetName]=A;l=XLSX.write(l,{bookType:a.type,bookSST:!1,type:"binary"});try{z=new Blob([ma(l)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"}),saveAs(z,a.fileName+"."+a.type)}catch(b){D(a.fileName+"."+a.type,"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8,",ma(l))}}else if("png"==a.type)html2canvas(c(u)[0]).then(function(b){b=
|
||||
b.toDataURL();for(var c=atob(b.substring(22)),d=new ArrayBuffer(c.length),f=new Uint8Array(d),h=0;h<c.length;h++)f[h]=c.charCodeAt(h);!0===a.consoleLog&&console.log(c);if("string"===a.outputMode)return c;if("base64"===a.outputMode)return H(b);if("window"===a.outputMode)window.open(b);else try{z=new Blob([d],{type:"image/png"}),saveAs(z,a.fileName+".png")}catch(g){D(a.fileName+".png","data:image/png,",z)}});else if("pdf"==a.type)if(!0===a.pdfmake.enabled){l=[];var pa=[];n=0;A=function(a,e,d){var b=
|
||||
0;c(a).each(function(){var a=[];y(this,e,n,d,function(b,d,c){if("undefined"!==typeof b&&null!==b){var e=parseInt(b.getAttribute("colspan")),g=parseInt(b.getAttribute("rowspan"));b=x(b,d,c)||" ";1<e||1<g?a.push({colSpan:e||1,rowSpan:g||1,text:b}):a.push(b)}else a.push(" ")});a.length&&pa.push(a);b<a.length&&(b=a.length);n++});return b};p=c(this).find("thead").first().find(a.theadSelector);r=A(p,"th,td",p.length);for(var qa=l.length;qa<r;qa++)l.push("*");c(this).find("tbody").each(function(){h.push.apply(h,
|
||||
c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,c(this).find("tfoot").find(a.tfootSelector));A(h,"th,td",p.length+h.length);l={content:[{table:{headerRows:p.length,widths:l,body:pa}}]};c.extend(!0,l,a.pdfmake.docDefinition);pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};c.extend(!0,pdfMake.fonts,a.pdfmake.fonts);pdfMake.createPdf(l).getBuffer(function(b){try{var c=new Blob([b],
|
||||
{type:"application/pdf"});saveAs(c,a.fileName+".pdf")}catch(d){D(a.fileName+".pdf","data:application/pdf;base64,",b)}})}else if(!1===a.jspdf.autotable){l={dim:{w:T(c(u).first().get(0),"width","mm"),h:T(c(u).first().get(0),"height","mm")},pagesplit:!1};var ra=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format);ra.addHTML(c(u).first(),a.jspdf.margins.left,a.jspdf.margins.top,l,function(){ea(ra,!1)})}else{var f=a.jspdf.autotable.tableExport;if("string"===typeof a.jspdf.format&&"bestfit"===a.jspdf.format.toLowerCase()){var P=
|
||||
{a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89]},W="",Q="",sa=0;c(u).each(function(){if(K(c(this))){var a=T(c(this).get(0),"width","pt");if(a>sa){a>P.a0[0]&&(W="a0",Q="l");for(var e in P)P.hasOwnProperty(e)&&P[e][1]>a&&(W=e,Q="l",P[e][0]>a&&(Q="p"));sa=a}}});a.jspdf.format=""===W?"a4":W;a.jspdf.orientation=""===Q?"w":Q}if(null==f.doc&&(f.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(f.doc);
|
||||
!0===f.outputImages&&(f.images={});"undefined"!=typeof f.images&&(c(u).filter(function(){return K(c(this))}).each(function(){var b=0;G=c(this).find("tr, th, td").filter(":hidden");M=0<G.length;p=c(this).find("thead").find(a.theadSelector);c(this).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,c(this).find("tfoot").find(a.tfootSelector));c(h).each(function(){y(this,"td,th",p.length+b,p.length+h.length,function(a){if("undefined"!==
|
||||
typeof a&&null!==a){var b=c(a).children();"undefined"!=typeof b&&0<b.length&&ha(a,b,f)}});b++})}),p=[],h=[]);ua(f,function(){c(u).filter(function(){return K(c(this))}).each(function(){var b,e=0;G=c(this).find("tr, th, td").filter(":hidden");M=0<G.length;L=R(this);f.columns=[];f.rows=[];f.rowoptions={};if("function"===typeof f.onTable&&!1===f.onTable(c(this),a))return!0;a.jspdf.autotable.tableExport=null;var d=c.extend(!0,{},a.jspdf.autotable);a.jspdf.autotable.tableExport=f;d.margin={};c.extend(!0,
|
||||
d.margin,a.jspdf.margins);d.tableExport=f;"function"!==typeof d.beforePageContent&&(d.beforePageContent=function(a){1==a.pageCount&&a.table.rows.concat(a.table.headerRow).forEach(function(b){0<b.height&&(b.height+=(2-1.15)/2*b.styles.fontSize,a.table.height+=(2-1.15)/2*b.styles.fontSize)})});"function"!==typeof d.createdHeaderCell&&(d.createdHeaderCell=function(a,b){a.styles=c.extend({},b.row.styles);if("undefined"!=typeof f.columns[b.column.dataKey]){var e=f.columns[b.column.dataKey];if("undefined"!=
|
||||
typeof e.rect){a.contentWidth=e.rect.width;if("undefined"==typeof f.heightRatio||0===f.heightRatio){var g=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:b.row.raw[b.column.dataKey].rect.height;f.heightRatio=a.styles.rowHeight/g}g=b.row.raw[b.column.dataKey].rect.height*f.heightRatio;g>a.styles.rowHeight&&(a.styles.rowHeight=g)}"undefined"!=typeof e.style&&!0!==e.style.hidden&&(a.styles.halign=e.style.align,"inherit"===d.styles.fillColor&&
|
||||
(a.styles.fillColor=e.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=e.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=e.style.fstyle))}});"function"!==typeof d.createdCell&&(d.createdCell=function(a,b){var c=f.rowoptions[b.row.index+":"+b.column.dataKey];"undefined"!=typeof c&&"undefined"!=typeof c.style&&!0!==c.style.hidden&&(a.styles.halign=c.style.align,"inherit"===d.styles.fillColor&&(a.styles.fillColor=c.style.bcolor),"inherit"===d.styles.textColor&&(a.styles.textColor=
|
||||
c.style.color),"inherit"===d.styles.fontStyle&&(a.styles.fontStyle=c.style.fstyle))});"function"!==typeof d.drawHeaderCell&&(d.drawHeaderCell=function(a,b){var c=f.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?fa(a,b,c):!1});"function"!==typeof d.drawCell&&(d.drawCell=function(a,b){var c=f.rowoptions[b.row.index+":"+b.column.dataKey];if(fa(a,b,c))if(f.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"!=typeof c&&"undefined"!=
|
||||
typeof c.kids&&0<c.kids.length){var d=a.height/c.rect.height;if(d>f.dh||"undefined"==typeof f.dh)f.dh=d;f.dw=a.width/c.rect.width;d=a.textPos.y;ja(a,c.kids,f);a.textPos.y=d;ka(a,c.kids,f)}else ka(a,{},f);return!1});f.headerrows=[];p=c(this).find("thead").find(a.theadSelector);p.each(function(){b=0;f.headerrows[e]=[];y(this,"th,td",e,p.length,function(a,c,d){var g=la(a);g.title=x(a,c,d);g.key=b++;g.rowIndex=e;f.headerrows[e].push(g)});e++});if(0<e)for(var l=e-1;0<=l;)c.each(f.headerrows[l],function(){var a=
|
||||
this;0<l&&null===this.rect&&(a=f.headerrows[l-1][this.key]);null!==a&&0<=a.rowIndex&&(!0!==a.style.hasOwnProperty("hidden")||!0!==a.style.hidden)&&f.columns.push(a)}),l=0<f.columns.length?-1:l-1;var k=0;h=[];c(this).find("tbody").each(function(){h.push.apply(h,c(this).find(a.tbodySelector))});a.tfootSelector.length&&h.push.apply(h,c(this).find("tfoot").find(a.tfootSelector));c(h).each(function(){var a=[];b=0;y(this,"td,th",e,p.length+h.length,function(d,e,h){if("undefined"===typeof f.columns[b]){var g=
|
||||
{title:"",key:b,style:{hidden:!0}};f.columns.push(g)}"undefined"!==typeof d&&null!==d?(g=la(d),g.kids=c(d).children()):(g=c.extend(!0,{},f.rowoptions[k+":"+(b-1)]),g.colspan=-1);f.rowoptions[k+":"+b++]=g;a.push(x(d,e,h))});a.length&&(f.rows.push(a),k++);e++});if("function"===typeof f.onBeforeAutotable)f.onBeforeAutotable(c(this),f.columns,f.rows,d);f.doc.autoTable(f.columns,f.rows,d);if("function"===typeof f.onAfterAutotable)f.onAfterAutotable(c(this),d);a.jspdf.autotable.startY=f.doc.autoTableEndPosY()+
|
||||
d.margin.top});ea(f.doc,"undefined"!=typeof f.images&&!1===jQuery.isEmptyObject(f.images));"undefined"!=typeof f.headerrows&&(f.headerrows.length=0);"undefined"!=typeof f.columns&&(f.columns.length=0);"undefined"!=typeof f.rows&&(f.rows.length=0);delete f.doc;f.doc=null})}return this}})})(jQuery);
|
||||
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(c,f,u){c instanceof String&&(c=String(c));for(var C=c.length,D=0;D<C;D++){var O=c[D];if(f.call(u,O,D,c))return{i:D,v:O}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,f,u){c!=Array.prototype&&c!=Object.prototype&&(c[f]=u.value)};
|
||||
$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(c,f,u,C){if(f){u=$jscomp.global;c=c.split(".");for(C=0;C<c.length-1;C++){var D=c[C];D in u||(u[D]={});u=u[D]}c=c[c.length-1];C=u[c];f=f(C);f!=C&&null!=f&&$jscomp.defineProperty(u,c,{configurable:!0,writable:!0,value:f})}};
|
||||
$jscomp.polyfill("Array.prototype.find",function(c){return c?c:function(c,u){return $jscomp.findInternal(this,c,u).v}},"es6","es3");
|
||||
(function(c){c.fn.extend({tableExport:function(f){function u(b){var e=[];C(b,"tbody").each(function(){e.push.apply(e,D(c(this),a.tbodySelector))});a.tfootSelector.length&&C(b,"tfoot").each(function(){e.push.apply(e,D(c(this),a.tfootSelector))});return e}function C(b,e){var a=b.parents("table").length;return b.find(e).filter(function(){return c(this).closest("table").parents("table").length===a})}function D(b,e){return b.find(e).filter(function(){return 0===c(this).find("table").length&&1===c(this).parents("table").length})}
|
||||
function O(b){var e=[];c(b).find("thead").first().find("th").each(function(b,a){void 0!==c(a).attr("data-field")?e[b]=c(a).attr("data-field"):e[b]=b.toString()});return e}function P(b){var e="undefined"!==typeof b[0].cellIndex,a="undefined"!==typeof b[0].rowIndex,r=e||a?ya(b):b.is(":visible"),g=b.data("tableexport-display");e&&"none"!=g&&"always"!=g&&(b=c(b[0].parentNode),a="undefined"!==typeof b[0].rowIndex,g=b.data("tableexport-display"));a&&"none"!=g&&"always"!=g&&(g=b.closest("table").data("tableexport-display"));
|
||||
return"none"!==g&&(1==r||"always"==g)}function ya(b){var e=[];R&&(e=K.filter(function(){var e=!1;this.nodeType==b[0].nodeType&&("undefined"!==typeof this.rowIndex&&this.rowIndex==b[0].rowIndex?e=!0:"undefined"!==typeof this.cellIndex&&this.cellIndex==b[0].cellIndex&&"undefined"!==typeof this.parentNode.rowIndex&&"undefined"!==typeof b[0].parentNode.rowIndex&&this.parentNode.rowIndex==b[0].parentNode.rowIndex&&(e=!0));return e}));return 0==R||0==e.length}function za(b,e,k){var r=!1;P(b)?0<a.ignoreColumn.length&&
|
||||
(-1!=c.inArray(k,a.ignoreColumn)||-1!=c.inArray(k-e,a.ignoreColumn)||Q.length>k&&"undefined"!=typeof Q[k]&&-1!=c.inArray(Q[k],a.ignoreColumn))&&(r=!0):r=!0;return r}function B(b,e,k,r,g){if("function"===typeof g){var h=!1;"function"===typeof a.onIgnoreRow&&(h=a.onIgnoreRow(c(b),k));if(!1===h&&-1==c.inArray(k,a.ignoreRow)&&-1==c.inArray(k-r,a.ignoreRow)&&P(c(b))){var x=c(b).find(e),q=0;x.each(function(b){var e=c(this),a,h=parseInt(this.getAttribute("colspan")),r=parseInt(this.getAttribute("rowspan"));
|
||||
G.forEach(function(b){if(k>=b.s.r&&k<=b.e.r&&q>=b.s.c&&q<=b.e.c)for(a=0;a<=b.e.c-b.s.c;++a)g(null,k,q++)});if(!1===za(e,x.length,b)){if(r||h)h=h||1,G.push({s:{r:k,c:q},e:{r:k+(r||1)-1,c:q+h-1}});g(this,k,q++)}if(h)for(a=0;a<h-1;++a)g(null,k,q++)});G.forEach(function(b){if(k>=b.s.r&&k<=b.e.r&&q>=b.s.c&&q<=b.e.c)for(Y=0;Y<=b.e.c-b.s.c;++Y)g(null,k,q++)})}}}function la(b,e){!0===a.consoleLog&&console.log(b.output());if("string"===a.outputMode)return b.output();if("base64"===a.outputMode)return L(b.output());
|
||||
if("window"===a.outputMode)window.URL=window.URL||window.webkitURL,window.open(window.URL.createObjectURL(b.output("blob")));else try{var k=b.output("blob");saveAs(k,a.fileName+".pdf")}catch(r){H(a.fileName+".pdf","data:application/pdf"+(e?"":";base64")+",",e?b.output("blob"):b.output())}}function ma(b,e,a){var k=0;"undefined"!==typeof a&&(k=a.colspan);if(0<=k){for(var g=b.width,c=b.textPos.x,x=e.table.columns.indexOf(e.column),q=1;q<k;q++)g+=e.table.columns[x+q].width;1<k&&("right"===b.styles.halign?
|
||||
c=b.textPos.x+g-b.width:"center"===b.styles.halign&&(c=b.textPos.x+(g-b.width)/2));b.width=g;b.textPos.x=c;"undefined"!==typeof a&&1<a.rowspan&&(b.height*=a.rowspan);if("middle"===b.styles.valign||"bottom"===b.styles.valign)a=("string"===typeof b.text?b.text.split(/\r\n|\r|\n/g):b.text).length||1,2<a&&(b.textPos.y-=(2-1.15)/2*e.row.styles.fontSize*(a-2)/3);return!0}return!1}function na(b,a,k){"undefined"!=typeof k.images&&a.each(function(){var a=c(this).children();if(c(this).is("img")){var e=oa(this.src);
|
||||
k.images[e]={url:this.src,src:this.src}}"undefined"!=typeof a&&0<a.length&&na(b,a,k)})}function Aa(b,a){function e(b){if(b.url){var e=new Image;g=++h;e.crossOrigin="Anonymous";e.onerror=e.onload=function(){if(e.complete&&(0===e.src.indexOf("data:image/")&&(e.width=b.width||e.width||0,e.height=b.height||e.height||0),e.width+e.height)){var k=document.createElement("canvas"),c=k.getContext("2d");k.width=e.width;k.height=e.height;c.drawImage(e,0,0);b.src=k.toDataURL("image/jpeg")}--h||a(g)};e.src=b.url}}
|
||||
var c,g=0,h=0;if("undefined"!=typeof b.images)for(c in b.images)b.images.hasOwnProperty(c)&&e(b.images[c]);(b=h)||(a(g),b=void 0);return b}function pa(b,e,k){e.each(function(){var e=c(this).children(),g=0;if(c(this).is("div")){var h=Z(M(this,"background-color"),[255,255,255]),x=Z(M(this,"border-top-color"),[0,0,0]),q=aa(this,"border-top-width",a.jspdf.unit),d=this.getBoundingClientRect(),f=this.offsetLeft*k.dw;g=this.offsetTop*k.dh;var l=d.width*k.dw;d=d.height*k.dh;k.doc.setDrawColor.apply(void 0,
|
||||
x);k.doc.setFillColor.apply(void 0,h);k.doc.setLineWidth(q);k.doc.rect(b.x+f,b.y+g,l,d,q?"FD":"F")}else if(c(this).is("img")&&"undefined"!=typeof k.images&&(h=oa(this.src),h=k.images[h],"undefined"!=typeof h)){x=b.width/b.height;q=this.width/this.height;f=b.width;l=b.height;d=19.049976/25.4;q<=x?(l=Math.min(b.height,this.height),f=this.width*l/this.height):q>x&&(f=Math.min(b.width,this.width),l=this.height*f/this.width);f*=d;l*=d;l<b.height&&(g=(b.height-l)/2);try{k.doc.addImage(h.src,b.textPos.x,
|
||||
b.y+g,f,l)}catch(Ea){}b.textPos.x+=f}"undefined"!=typeof e&&0<e.length&&pa(b,e,k)})}function qa(b,e,a){if("function"===typeof a.onAutotableText)a.onAutotableText(a.doc,b,e);else{var k=b.textPos.x,g=b.textPos.y,h={halign:b.styles.halign,valign:b.styles.valign};if(e.length){for(e=e[0];e.previousSibling;)e=e.previousSibling;for(var x=!1,q=!1;e;){var d=e.innerText||e.textContent||"";d=(d.length&&" "==d[0]?" ":"")+c.trim(d)+(1<d.length&&" "==d[d.length-1]?" ":"");c(e).is("br")&&(k=b.textPos.x,g+=a.doc.internal.getFontSize());
|
||||
c(e).is("b")?x=!0:c(e).is("i")&&(q=!0);(x||q)&&a.doc.setFontType(x&&q?"bolditalic":x?"bold":"italic");var f=a.doc.getStringUnitWidth(d)*a.doc.internal.getFontSize();if(f){if("linebreak"===b.styles.overflow&&k>b.textPos.x&&k+f>b.textPos.x+b.width){if(0<=".,!%*;:=-".indexOf(d.charAt(0))){var l=d.charAt(0);f=a.doc.getStringUnitWidth(l)*a.doc.internal.getFontSize();k+f<=b.textPos.x+b.width&&(a.doc.autoTableText(l,k,g,h),d=d.substring(1,d.length));f=a.doc.getStringUnitWidth(d)*a.doc.internal.getFontSize()}k=
|
||||
b.textPos.x;g+=a.doc.internal.getFontSize()}for(;d.length&&k+f>b.textPos.x+b.width;)d=d.substring(0,d.length-1),f=a.doc.getStringUnitWidth(d)*a.doc.internal.getFontSize();a.doc.autoTableText(d,k,g,h);k+=f}if(x||q)c(e).is("b")?x=!1:c(e).is("i")&&(q=!1),a.doc.setFontType(x||q?x?"bold":"italic":"normal");e=e.nextSibling}b.textPos.x=k;b.textPos.y=g}else a.doc.autoTableText(b.text,b.textPos.x,b.textPos.y,h)}}function ba(b,a,c){return b.replace(new RegExp(a.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1"),
|
||||
"g"),c)}function ea(b){b=ba(b||"0",a.numbers.html.thousandsSeparator,"");b=ba(b,a.numbers.html.decimalMark,".");return"number"===typeof b||!1!==jQuery.isNumeric(b)?b:!1}function Ba(b){-1<b.indexOf("%")?(b=ea(b.replace(/%/g,"")),!1!==b&&(b/=100)):b=!1;return b}function z(b,e,k){var r="";if(null!==b){var g=c(b);if(g[0].hasAttribute("data-tableexport-value"))var h=(h=g.data("tableexport-value"))?h+"":"";else if(h=g.html(),"function"===typeof a.onCellHtmlData)h=a.onCellHtmlData(g,e,k,h);else if(""!=h){var d=
|
||||
c.parseHTML(h),f=0,l=0;h="";c.each(d,function(){if(c(this).is("input"))h+=g.find("input").eq(f++).val();else if(c(this).is("select"))h+=g.find("select option:selected").eq(l++).text();else if("undefined"===typeof c(this).html())h+=c(this).text();else if(void 0===jQuery().bootstrapTable||!0!==c(this).hasClass("filterControl")&&0===c(b).parents(".detail-view").length)h+=c(this).html()})}if(!0===a.htmlContent)r=c.trim(h);else if(h&&""!=h)if(""!=c(b).data("tableexport-cellformat")){var n=h.replace(/\n/g,
|
||||
"\u2028").replace(/<br\s*[\/]?>/gi,"\u2060"),m=c("<div/>").html(n).contents();d=!1;n="";c.each(m.text().split("\u2028"),function(b,a){0<b&&(n+=" ");n+=c.trim(a)});c.each(n.split("\u2060"),function(b,a){0<b&&(r+="\n");r+=c.trim(a).replace(/\u00AD/g,"")});if("json"==a.type||"excel"===a.type&&"xmlss"===a.excelFileFormat||!1===a.numbers.output)d=ea(r),!1!==d&&(r=Number(d));else if(a.numbers.html.decimalMark!=a.numbers.output.decimalMark||a.numbers.html.thousandsSeparator!=a.numbers.output.thousandsSeparator)if(d=
|
||||
ea(r),!1!==d){m=(""+d.substr(0>d?1:0)).split(".");1==m.length&&(m[1]="");var p=3<m[0].length?m[0].length%3:0;r=(0>d?"-":"")+(a.numbers.output.thousandsSeparator?(p?m[0].substr(0,p)+a.numbers.output.thousandsSeparator:"")+m[0].substr(p).replace(/(\d{3})(?=\d)/g,"$1"+a.numbers.output.thousandsSeparator):m[0])+(m[1].length?a.numbers.output.decimalMark+m[1]:"")}}else r=h;!0===a.escape&&(r=escape(r));"function"===typeof a.onCellData&&(r=a.onCellData(g,e,k,r))}return r}function Ca(b,a,c){return a+"-"+c.toLowerCase()}
|
||||
function Z(b,a){(b=/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.exec(b))&&(a=[parseInt(b[1]),parseInt(b[2]),parseInt(b[3])]);return a}function ra(b){var a=M(b,"text-align"),k=M(b,"font-weight"),r=M(b,"font-style"),g="";"start"==a&&(a="rtl"==M(b,"direction")?"right":"left");700<=k&&(g="bold");"italic"==r&&(g+=r);""===g&&(g="normal");a={style:{align:a,bcolor:Z(M(b,"background-color"),[255,255,255]),color:Z(M(b,"color"),[0,0,0]),fstyle:g},colspan:parseInt(c(b).attr("colspan"))||0,rowspan:parseInt(c(b).attr("rowspan"))||
|
||||
0};null!==b&&(b=b.getBoundingClientRect(),a.rect={width:b.width,height:b.height});return a}function M(b,a){try{return window.getComputedStyle?(a=a.replace(/([a-z])([A-Z])/,Ca),window.getComputedStyle(b,null).getPropertyValue(a)):b.currentStyle?b.currentStyle[a]:b.style[a]}catch(k){}return""}function aa(b,a,c){a=M(b,a).match(/\d+/);if(null!==a){a=a[0];b=b.parentElement;var e=document.createElement("div");e.style.overflow="hidden";e.style.visibility="hidden";b.appendChild(e);e.style.width=100+c;c=100/
|
||||
e.offsetWidth;b.removeChild(e);return a*c}return 0}function fa(){if(!(this instanceof fa))return new fa;this.SheetNames=[];this.Sheets={}}function sa(b){for(var a=new ArrayBuffer(b.length),c=new Uint8Array(a),d=0;d!=b.length;++d)c[d]=b.charCodeAt(d)&255;return a}function Da(b){for(var a={},c={s:{c:1E7,r:1E7},e:{c:0,r:0}},d=0;d!=b.length;++d)for(var g=0;g!=b[d].length;++g){c.s.r>d&&(c.s.r=d);c.s.c>g&&(c.s.c=g);c.e.r<d&&(c.e.r=d);c.e.c<g&&(c.e.c=g);var h={v:b[d][g]};if(null!==h.v){var f=XLSX.utils.encode_cell({c:g,
|
||||
r:d});if("number"===typeof h.v)h.t="n";else if("boolean"===typeof h.v)h.t="b";else if(h.v instanceof Date){h.t="n";h.z=XLSX.SSF._table[14];var q=h;var l=(Date.parse(h.v)-new Date(Date.UTC(1899,11,30)))/864E5;q.v=l}else h.t="s";a[f]=h}}1E7>c.s.c&&(a["!ref"]=XLSX.utils.encode_range(c));return a}function oa(b){var a=0,c;if(0===b.length)return a;var d=0;for(c=b.length;d<c;d++){var g=b.charCodeAt(d);a=(a<<5)-a+g;a|=0}return a}function H(b,a,c){var e=window.navigator.userAgent;if(!1!==b&&window.navigator.msSaveOrOpenBlob)window.navigator.msSaveOrOpenBlob(new Blob([c]),
|
||||
b);else if(!1!==b&&(0<e.indexOf("MSIE ")||e.match(/Trident.*rv\:11\./))){if(a=document.createElement("iframe"))document.body.appendChild(a),a.setAttribute("style","display:none"),a.contentDocument.open("txt/html","replace"),a.contentDocument.write(c),a.contentDocument.close(),a.focus(),a.contentDocument.execCommand("SaveAs",!0,b),document.body.removeChild(a)}else{var g=document.createElement("a");if(g){var h=null;g.style.display="none";!1!==b?g.download=b:g.target="_blank";"object"==typeof c?(window.URL=
|
||||
window.URL||window.webkitURL,h=window.URL.createObjectURL(c),g.href=h):0<=a.toLowerCase().indexOf("base64,")?g.href=a+L(c):g.href=a+encodeURIComponent(c);document.body.appendChild(g);if(document.createEvent)null===ca&&(ca=document.createEvent("MouseEvents")),ca.initEvent("click",!0,!1),g.dispatchEvent(ca);else if(document.createEventObject)g.fireEvent("onclick");else if("function"==typeof g.onclick)g.onclick();setTimeout(function(){h&&window.URL.revokeObjectURL(h);document.body.removeChild(g)},100)}}}
|
||||
function L(a){var b,c="",d=0;if("string"===typeof a){a=a.replace(/\x0d\x0a/g,"\n");var g="";for(b=0;b<a.length;b++){var h=a.charCodeAt(b);128>h?g+=String.fromCharCode(h):(127<h&&2048>h?g+=String.fromCharCode(h>>6|192):(g+=String.fromCharCode(h>>12|224),g+=String.fromCharCode(h>>6&63|128)),g+=String.fromCharCode(h&63|128))}a=g}for(;d<a.length;){var f=a.charCodeAt(d++);g=a.charCodeAt(d++);b=a.charCodeAt(d++);h=f>>2;f=(f&3)<<4|g>>4;var q=(g&15)<<2|b>>6;var l=b&63;isNaN(g)?q=l=64:isNaN(b)&&(l=64);c=c+
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(q)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)}return c}var a={consoleLog:!1,csvEnclosure:'"',csvSeparator:",",csvUseBOM:!0,displayTableName:!1,escape:!1,excelFileFormat:"xlshtml",excelRTL:!1,excelstyles:[],exportHiddenCells:!1,fileName:"tableExport",
|
||||
htmlContent:!1,ignoreColumn:[],ignoreRow:[],jsonScope:"all",jspdf:{orientation:"p",unit:"pt",format:"a4",margins:{left:20,right:10,top:10,bottom:10},onDocCreated:null,autotable:{styles:{cellPadding:2,rowHeight:12,fontSize:8,fillColor:255,textColor:50,fontStyle:"normal",overflow:"ellipsize",halign:"left",valign:"middle"},headerStyles:{fillColor:[52,73,94],textColor:255,fontStyle:"bold",halign:"center"},alternateRowStyles:{fillColor:245},tableExport:{doc:null,onAfterAutotable:null,onBeforeAutotable:null,
|
||||
onAutotableText:null,onTable:null,outputImages:!0}}},numbers:{html:{decimalMark:".",thousandsSeparator:","},output:{decimalMark:".",thousandsSeparator:","}},onCellData:null,onCellHtmlData:null,onIgnoreRow:null,onMsoNumberFormat:null,outputMode:"file",pdfmake:{enabled:!1,docDefinition:{pageOrientation:"portrait",defaultStyle:{font:"Roboto"}},fonts:{}},tbodySelector:"tr",tfootSelector:"tr",theadSelector:"tr",tableName:"Table",type:"csv",worksheetName:""},v=this,ca=null,p=[],t=[],l=0,m="",Q=[],G=[],
|
||||
K=[],R=!1;c.extend(!0,a,f);Q=O(v);if("csv"==a.type||"tsv"==a.type||"txt"==a.type){var I="",U=0;G=[];l=0;var ha=function(b,e,k){b.each(function(){m="";B(this,e,l,k+b.length,function(b,c,e){var g=m,h="";if(null!==b)if(b=z(b,c,e),c=null===b||""===b?"":b.toString(),"tsv"==a.type)b instanceof Date&&b.toLocaleString(),h=ba(c,"\t"," ");else if(b instanceof Date)h=a.csvEnclosure+b.toLocaleString()+a.csvEnclosure;else if(h=ba(c,a.csvEnclosure,a.csvEnclosure+a.csvEnclosure),0<=h.indexOf(a.csvSeparator)||/[\r\n ]/g.test(h))h=
|
||||
a.csvEnclosure+h+a.csvEnclosure;m=g+(h+("tsv"==a.type?"\t":a.csvSeparator))});m=c.trim(m).substring(0,m.length-1);0<m.length&&(0<I.length&&(I+="\n"),I+=m);l++});return b.length};U+=ha(c(v).find("thead").first().find(a.theadSelector),"th,td",U);C(c(v),"tbody").each(function(){U+=ha(D(c(this),a.tbodySelector),"td,th",U)});a.tfootSelector.length&&ha(c(v).find("tfoot").first().find(a.tfootSelector),"td,th",U);I+="\n";!0===a.consoleLog&&console.log(I);if("string"===a.outputMode)return I;if("base64"===
|
||||
a.outputMode)return L(I);if("window"===a.outputMode){H(!1,"data:text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8,",I);return}try{var A=new Blob([I],{type:"text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8"});saveAs(A,a.fileName+"."+a.type,"csv"!=a.type||!1===a.csvUseBOM)}catch(b){H(a.fileName+"."+a.type,"data:text/"+("csv"==a.type?"csv":"plain")+";charset=utf-8,"+("csv"==a.type&&a.csvUseBOM?"\ufeff":""),I)}}else if("sql"==a.type){l=0;G=[];var w="INSERT INTO `"+a.tableName+"` (";p=c(v).find("thead").first().find(a.theadSelector);
|
||||
p.each(function(){B(this,"th,td",l,p.length,function(a,c,k){w+="'"+z(a,c,k)+"',"});l++;w=c.trim(w);w=c.trim(w).substring(0,w.length-1)});w+=") VALUES ";t=u(c(v));c(t).each(function(){m="";B(this,"td,th",l,p.length+t.length,function(a,c,k){m+="'"+z(a,c,k)+"',"});3<m.length&&(w+="("+m,w=c.trim(w).substring(0,w.length-1),w+="),");l++});w=c.trim(w).substring(0,w.length-1);w+=";";!0===a.consoleLog&&console.log(w);if("string"===a.outputMode)return w;if("base64"===a.outputMode)return L(w);try{A=new Blob([w],
|
||||
{type:"text/plain;charset=utf-8"}),saveAs(A,a.fileName+".sql")}catch(b){H(a.fileName+".sql","data:application/sql;charset=utf-8,",w)}}else if("json"==a.type){var S=[];G=[];p=c(v).find("thead").first().find(a.theadSelector);p.each(function(){var a=[];B(this,"th,td",l,p.length,function(b,c,d){a.push(z(b,c,d))});S.push(a)});var ia=[];t=u(c(v));c(t).each(function(){var a={},e=0;B(this,"td,th",l,p.length+t.length,function(b,c,g){S.length?a[S[S.length-1][e]]=z(b,c,g):a[e]=z(b,c,g);e++});!1===c.isEmptyObject(a)&&
|
||||
ia.push(a);l++});f="";f="head"==a.jsonScope?JSON.stringify(S):"data"==a.jsonScope?JSON.stringify(ia):JSON.stringify({header:S,data:ia});!0===a.consoleLog&&console.log(f);if("string"===a.outputMode)return f;if("base64"===a.outputMode)return L(f);try{A=new Blob([f],{type:"application/json;charset=utf-8"}),saveAs(A,a.fileName+".json")}catch(b){H(a.fileName+".json","data:application/json;charset=utf-8;base64,",f)}}else if("xml"===a.type){l=0;G=[];var J='<?xml version="1.0" encoding="utf-8"?>';J+="<tabledata><fields>";
|
||||
p=c(v).find("thead").first().find(a.theadSelector);p.each(function(){B(this,"th,td",l,p.length,function(a,c,d){J+="<field>"+z(a,c,d)+"</field>"});l++});J+="</fields><data>";var ta=1;t=u(c(v));c(t).each(function(){var a=1;m="";B(this,"td,th",l,p.length+t.length,function(b,c,d){m+="<column-"+a+">"+z(b,c,d)+"</column-"+a+">";a++});0<m.length&&"<column-1></column-1>"!=m&&(J+='<row id="'+ta+'">'+m+"</row>",ta++);l++});J+="</data></tabledata>";!0===a.consoleLog&&console.log(J);if("string"===a.outputMode)return J;
|
||||
if("base64"===a.outputMode)return L(J);try{A=new Blob([J],{type:"application/xml;charset=utf-8"}),saveAs(A,a.fileName+".xml")}catch(b){H(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",J)}}else if("excel"===a.type&&"xmlss"===a.excelFileFormat){var ja=[],F=[];c(v).filter(function(){return P(c(this))}).each(function(){function b(a,b,e){var g=[];c(a).each(function(){var b=0,h=0;m="";B(this,"td,th",l,e+a.length,function(a,e,d){if(null!==a){var k="";e=z(a,e,d);d="String";if(!1!==jQuery.isNumeric(e))d=
|
||||
"Number";else{var f=Ba(e);!1!==f&&(e=f,d="Number",k+=' ss:StyleID="pct1"')}"Number"!==d&&(e=e.replace(/\n/g,"<br>"));f=parseInt(a.getAttribute("colspan"));a=parseInt(a.getAttribute("rowspan"));g.forEach(function(a){if(l>=a.s.r&&l<=a.e.r&&h>=a.s.c&&h<=a.e.c)for(var c=0;c<=a.e.c-a.s.c;++c)h++,b++});if(a||f)a=a||1,f=f||1,g.push({s:{r:l,c:h},e:{r:l+a-1,c:h+f-1}});1<f&&(k+=' ss:MergeAcross="'+(f-1)+'"',h+=f-1);1<a&&(k+=' ss:MergeDown="'+(a-1)+'" ss:StyleID="rsp1"');0<b&&(k+=' ss:Index="'+(h+1)+'"',b=0);
|
||||
m+="<Cell"+k+'><Data ss:Type="'+d+'">'+c("<div />").text(e).html()+"</Data></Cell>\r";h++}});0<m.length&&(E+='<Row ss:AutoFitHeight="0">\r'+m+"</Row>\r");l++});return a.length}var e=c(this),d="";"string"===typeof a.worksheetName&&a.worksheetName.length?d=a.worksheetName+" "+(F.length+1):"undefined"!==typeof a.worksheetName[F.length]&&(d=a.worksheetName[F.length]);d.length||(d=e.find("caption").text()||"");d.length||(d="Table "+(F.length+1));d=d.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31).trim();
|
||||
F.push(c("<div />").text(d).html());!1===a.exportHiddenCells&&(K=e.find("tr, th, td").filter(":hidden"),R=0<K.length);l=0;Q=O(this);E="<Table>\r";d=0;d+=b(e.find("thead").first().find(a.theadSelector),"th,td",d);b(u(e),"td,th",d);E+="</Table>\r";ja.push(E);!0===a.consoleLog&&console.log(E)});f={};for(var y={},n,N,T=0,Y=F.length;T<Y;T++)n=F[T],N=f[n],N=f[n]=null==N?1:N+1,2==N&&(F[y[n]]=F[y[n]].substring(0,29)+"-1"),1<f[n]?F[T]=F[T].substring(0,29)+"-"+f[n]:y[n]=T;f='<?xml version="1.0" encoding="UTF-8"?>\r<?mso-application progid="Excel.Sheet"?>\r<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:o="urn:schemas-microsoft-com:office:office"\r xmlns:x="urn:schemas-microsoft-com:office:excel"\r xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"\r xmlns:html="http://www.w3.org/TR/REC-html40">\r<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">\r <Created>'+
|
||||
(new Date).toISOString()+'</Created>\r</DocumentProperties>\r<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">\r <AllowPNG/>\r</OfficeDocumentSettings>\r<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">\r <WindowHeight>9000</WindowHeight>\r <WindowWidth>13860</WindowWidth>\r <WindowTopX>0</WindowTopX>\r <WindowTopY>0</WindowTopY>\r <ProtectStructure>False</ProtectStructure>\r <ProtectWindows>False</ProtectWindows>\r</ExcelWorkbook>\r<Styles>\r <Style ss:ID="Default" ss:Name="Normal">\r <Alignment ss:Vertical="Bottom"/>\r <Borders/>\r <Font/>\r <Interior/>\r <NumberFormat/>\r <Protection/>\r </Style>\r <Style ss:ID="rsp1">\r <Alignment ss:Vertical="Center"/>\r </Style>\r <Style ss:ID="pct1">\r <NumberFormat ss:Format="Percent"/>\r </Style>\r</Styles>\r';
|
||||
for(y=0;y<ja.length;y++)f+='<Worksheet ss:Name="'+F[y]+'" ss:RightToLeft="'+(a.excelRTL?"1":"0")+'">\r'+ja[y],f=a.excelRTL?f+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">\r<DisplayRightToLeft/>\r</WorksheetOptions>\r':f+'<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"/>\r',f+="</Worksheet>\r";f+="</Workbook>\r";!0===a.consoleLog&&console.log(f);if("string"===a.outputMode)return f;if("base64"===a.outputMode)return L(f);try{A=new Blob([f],{type:"application/xml;charset=utf-8"}),
|
||||
saveAs(A,a.fileName+".xml")}catch(b){H(a.fileName+".xml","data:application/xml;charset=utf-8;base64,",f)}}else if("excel"==a.type||"xls"==a.type||"word"==a.type||"doc"==a.type){f="excel"==a.type||"xls"==a.type?"excel":"word";y="excel"==f?"xls":"doc";n='xmlns:x="urn:schemas-microsoft-com:office:'+f+'"';var E="",V="";c(v).filter(function(){return P(c(this))}).each(function(){var b=c(this);""===V&&(V=a.worksheetName||b.find("caption").text()||"Table",V=V.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31).trim());
|
||||
!1===a.exportHiddenCells&&(K=b.find("tr, th, td").filter(":hidden"),R=0<K.length);l=0;G=[];Q=O(this);E+="<table><thead>";p=b.find("thead").first().find(a.theadSelector);p.each(function(){m="";B(this,"th,td",l,p.length,function(b,d,f){if(null!==b){var e="";m+="<th";for(var h in a.excelstyles)if(a.excelstyles.hasOwnProperty(h)){var k=c(b).css(a.excelstyles[h]);""!==k&&"0px none rgb(0, 0, 0)"!=k&&"rgba(0, 0, 0, 0)"!=k&&(e+=""===e?'style="':";",e+=a.excelstyles[h]+":"+k)}""!==e&&(m+=" "+e+'"');c(b).is("[colspan]")&&
|
||||
(m+=' colspan="'+c(b).attr("colspan")+'"');c(b).is("[rowspan]")&&(m+=' rowspan="'+c(b).attr("rowspan")+'"');m+=">"+z(b,d,f)+"</th>"}});0<m.length&&(E+="<tr>"+m+"</tr>");l++});E+="</thead><tbody>";t=u(b);c(t).each(function(){var b=c(this);m="";B(this,"td,th",l,p.length+t.length,function(e,d,g){if(null!==e){var h=z(e,d,g),k="",f=c(e).data("tableexport-msonumberformat");"undefined"==typeof f&&"function"===typeof a.onMsoNumberFormat&&(f=a.onMsoNumberFormat(e,d,g));"undefined"!=typeof f&&""!==f&&(k="style=\"mso-number-format:'"+
|
||||
f+"'");for(var l in a.excelstyles)a.excelstyles.hasOwnProperty(l)&&(f=c(e).css(a.excelstyles[l]),""===f&&(f=b.css(a.excelstyles[l])),""!==f&&"0px none rgb(0, 0, 0)"!=f&&"rgba(0, 0, 0, 0)"!=f&&(k+=""===k?'style="':";",k+=a.excelstyles[l]+":"+f));m+="<td";""!==k&&(m+=" "+k+'"');c(e).is("[colspan]")&&(m+=' colspan="'+c(e).attr("colspan")+'"');c(e).is("[rowspan]")&&(m+=' rowspan="'+c(e).attr("rowspan")+'"');"string"===typeof h&&""!=h&&(h=h.replace(/\n/g,"<br>"));m+=">"+h+"</td>"}});0<m.length&&(E+="<tr>"+
|
||||
m+"</tr>");l++});a.displayTableName&&(E+="<tr><td></td></tr><tr><td></td></tr><tr><td>"+z(c("<p>"+a.tableName+"</p>"))+"</td></tr>");E+="</tbody></table>";!0===a.consoleLog&&console.log(E)});n='<html xmlns:o="urn:schemas-microsoft-com:office:office" '+n+' xmlns="http://www.w3.org/TR/REC-html40">'+('<meta http-equiv="content-type" content="application/vnd.ms-'+f+'; charset=UTF-8">')+"<head>";"excel"===f&&(n+="\x3c!--[if gte mso 9]>",n+="<xml>",n+="<x:ExcelWorkbook>",n+="<x:ExcelWorksheets>",n+="<x:ExcelWorksheet>",
|
||||
n+="<x:Name>",n+=V,n+="</x:Name>",n+="<x:WorksheetOptions>",n+="<x:DisplayGridlines/>",a.excelRTL&&(n+="<x:DisplayRightToLeft/>"),n+="</x:WorksheetOptions>",n+="</x:ExcelWorksheet>",n+="</x:ExcelWorksheets>",n+="</x:ExcelWorkbook>",n+="</xml>",n+="<![endif]--\x3e");n+="<style>br {mso-data-placement:same-cell;}</style>";n+="</head>";n+="<body>";n+=E;n+="</body>";n+="</html>";!0===a.consoleLog&&console.log(n);if("string"===a.outputMode)return n;if("base64"===a.outputMode)return L(n);try{A=new Blob([n],
|
||||
{type:"application/vnd.ms-"+a.type}),saveAs(A,a.fileName+"."+y)}catch(b){H(a.fileName+"."+y,"data:application/vnd.ms-"+f+";base64,",n)}}else if("xlsx"==a.type){var ua=[],ka=[];l=0;t=c(v).find("thead").first().find(a.theadSelector);t.push.apply(t,u(c(v)));c(t).each(function(){var b=[];B(this,"th,td",l,t.length,function(c,d,f){if("undefined"!==typeof c&&null!==c){f=z(c,d,f);d=parseInt(c.getAttribute("colspan"));c=parseInt(c.getAttribute("rowspan"));ka.forEach(function(a){if(l>=a.s.r&&l<=a.e.r&&b.length>=
|
||||
a.s.c&&b.length<=a.e.c)for(var c=0;c<=a.e.c-a.s.c;++c)b.push(null)});if(c||d)d=d||1,ka.push({s:{r:l,c:b.length},e:{r:l+(c||1)-1,c:b.length+d-1}});"function"!==typeof a.onCellData&&""!==f&&f==+f&&(f=+f);b.push(""!==f?f:null);if(d)for(c=0;c<d-1;++c)b.push(null)}});ua.push(b);l++});f=new fa;y=Da(ua);y["!merges"]=ka;f.SheetNames.push(a.worksheetName);f.Sheets[a.worksheetName]=y;f=XLSX.write(f,{bookType:a.type,bookSST:!1,type:"binary"});try{A=new Blob([sa(f)],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8"}),
|
||||
saveAs(A,a.fileName+"."+a.type)}catch(b){H(a.fileName+"."+a.type,"data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8,",sa(f))}}else if("png"==a.type)html2canvas(c(v)[0]).then(function(b){b=b.toDataURL();for(var c=atob(b.substring(22)),d=new ArrayBuffer(c.length),f=new Uint8Array(d),g=0;g<c.length;g++)f[g]=c.charCodeAt(g);!0===a.consoleLog&&console.log(c);if("string"===a.outputMode)return c;if("base64"===a.outputMode)return L(b);if("window"===a.outputMode)window.open(b);
|
||||
else try{A=new Blob([d],{type:"image/png"}),saveAs(A,a.fileName+".png")}catch(h){H(a.fileName+".png","data:image/png,",A)}});else if("pdf"==a.type)if(!0===a.pdfmake.enabled){f=[];var va=[];l=0;G=[];y=function(a,d,f){var b=0;c(a).each(function(){var a=[];B(this,d,l,f,function(b,c,d){if("undefined"!==typeof b&&null!==b){var e=parseInt(b.getAttribute("colspan")),g=parseInt(b.getAttribute("rowspan"));b=z(b,c,d)||" ";1<e||1<g?a.push({colSpan:e||1,rowSpan:g||1,text:b}):a.push(b)}else a.push(" ")});a.length&&
|
||||
va.push(a);b<a.length&&(b=a.length);l++});return b};p=c(this).find("thead").first().find(a.theadSelector);n=y(p,"th,td",p.length);for(N=f.length;N<n;N++)f.push("*");t=u(c(this));y(t,"th,td",p.length+t.length);f={content:[{table:{headerRows:p.length,widths:f,body:va}}]};c.extend(!0,f,a.pdfmake.docDefinition);pdfMake.fonts={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};c.extend(!0,pdfMake.fonts,a.pdfmake.fonts);pdfMake.createPdf(f).getBuffer(function(b){try{var c=
|
||||
new Blob([b],{type:"application/pdf"});saveAs(c,a.fileName+".pdf")}catch(k){H(a.fileName+".pdf","data:application/pdf;base64,",b)}})}else if(!1===a.jspdf.autotable){f={dim:{w:aa(c(v).first().get(0),"width","mm"),h:aa(c(v).first().get(0),"height","mm")},pagesplit:!1};var wa=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format);wa.addHTML(c(v).first(),a.jspdf.margins.left,a.jspdf.margins.top,f,function(){la(wa,!1)})}else{var d=a.jspdf.autotable.tableExport;if("string"===typeof a.jspdf.format&&
|
||||
"bestfit"===a.jspdf.format.toLowerCase()){var W={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89]},da="",X="",xa=0;c(v).each(function(){if(P(c(this))){var a=aa(c(this).get(0),"width","pt");if(a>xa){a>W.a0[0]&&(da="a0",X="l");for(var d in W)W.hasOwnProperty(d)&&W[d][1]>a&&(da=d,X="l",W[d][0]>a&&(X="p"));xa=a}}});a.jspdf.format=""===da?"a4":da;a.jspdf.orientation=""===X?"w":X}if(null==d.doc&&(d.doc=new jsPDF(a.jspdf.orientation,a.jspdf.unit,a.jspdf.format),
|
||||
"function"===typeof a.jspdf.onDocCreated))a.jspdf.onDocCreated(d.doc);!0===d.outputImages&&(d.images={});"undefined"!=typeof d.images&&(c(v).filter(function(){return P(c(this))}).each(function(){var b=0;G=[];!1===a.exportHiddenCells&&(K=c(this).find("tr, th, td").filter(":hidden"),R=0<K.length);p=c(this).find("thead").find(a.theadSelector);t=u(c(this));c(t).each(function(){B(this,"td,th",p.length+b,p.length+t.length,function(a){if("undefined"!==typeof a&&null!==a){var b=c(a).children();"undefined"!=
|
||||
typeof b&&0<b.length&&na(a,b,d)}});b++})}),p=[],t=[]);Aa(d,function(){c(v).filter(function(){return P(c(this))}).each(function(){var b;l=0;G=[];!1===a.exportHiddenCells&&(K=c(this).find("tr, th, td").filter(":hidden"),R=0<K.length);Q=O(this);d.columns=[];d.rows=[];d.rowoptions={};if("function"===typeof d.onTable&&!1===d.onTable(c(this),a))return!0;a.jspdf.autotable.tableExport=null;var e=c.extend(!0,{},a.jspdf.autotable);a.jspdf.autotable.tableExport=d;e.margin={};c.extend(!0,e.margin,a.jspdf.margins);
|
||||
e.tableExport=d;"function"!==typeof e.beforePageContent&&(e.beforePageContent=function(a){1==a.pageCount&&a.table.rows.concat(a.table.headerRow).forEach(function(b){0<b.height&&(b.height+=(2-1.15)/2*b.styles.fontSize,a.table.height+=(2-1.15)/2*b.styles.fontSize)})});"function"!==typeof e.createdHeaderCell&&(e.createdHeaderCell=function(a,b){a.styles=c.extend({},b.row.styles);if("undefined"!=typeof d.columns[b.column.dataKey]){var g=d.columns[b.column.dataKey];if("undefined"!=typeof g.rect){a.contentWidth=
|
||||
g.rect.width;if("undefined"==typeof d.heightRatio||0===d.heightRatio){var f=b.row.raw[b.column.dataKey].rowspan?b.row.raw[b.column.dataKey].rect.height/b.row.raw[b.column.dataKey].rowspan:b.row.raw[b.column.dataKey].rect.height;d.heightRatio=a.styles.rowHeight/f}f=b.row.raw[b.column.dataKey].rect.height*d.heightRatio;f>a.styles.rowHeight&&(a.styles.rowHeight=f)}"undefined"!=typeof g.style&&!0!==g.style.hidden&&(a.styles.halign=g.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=g.style.bcolor),
|
||||
"inherit"===e.styles.textColor&&(a.styles.textColor=g.style.color),"inherit"===e.styles.fontStyle&&(a.styles.fontStyle=g.style.fstyle))}});"function"!==typeof e.createdCell&&(e.createdCell=function(a,b){b=d.rowoptions[b.row.index+":"+b.column.dataKey];"undefined"!=typeof b&&"undefined"!=typeof b.style&&!0!==b.style.hidden&&(a.styles.halign=b.style.align,"inherit"===e.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===e.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===
|
||||
e.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof e.drawHeaderCell&&(e.drawHeaderCell=function(a,b){var c=d.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?ma(a,b,c):!1});"function"!==typeof e.drawCell&&(e.drawCell=function(a,b){var c=d.rowoptions[b.row.index+":"+b.column.dataKey];if(ma(a,b,c))if(d.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"!=typeof c&&"undefined"!=typeof c.kids&&0<c.kids.length){b=
|
||||
a.height/c.rect.height;if(b>d.dh||"undefined"==typeof d.dh)d.dh=b;d.dw=a.width/c.rect.width;b=a.textPos.y;pa(a,c.kids,d);a.textPos.y=b;qa(a,c.kids,d)}else qa(a,{},d);return!1});d.headerrows=[];p=c(this).find("thead").find(a.theadSelector);p.each(function(){b=0;d.headerrows[l]=[];B(this,"th,td",l,p.length,function(a,c,e){var f=ra(a);f.title=z(a,c,e);f.key=b++;f.rowIndex=l;d.headerrows[l].push(f)});l++});if(0<l)for(var f=l-1;0<=f;)c.each(d.headerrows[f],function(){var a=this;0<f&&null===this.rect&&
|
||||
(a=d.headerrows[f-1][this.key]);null!==a&&0<=a.rowIndex&&(!0!==a.style.hasOwnProperty("hidden")||!0!==a.style.hidden)&&d.columns.push(a)}),f=0<d.columns.length?-1:f-1;var m=0;t=[];t=u(c(this));c(t).each(function(){var a=[];b=0;B(this,"td,th",l,p.length+t.length,function(e,f,g){if("undefined"===typeof d.columns[b]){var h={title:"",key:b,style:{hidden:!0}};d.columns.push(h)}"undefined"!==typeof e&&null!==e?(h=ra(e),h.kids=c(e).children()):(h=c.extend(!0,{},d.rowoptions[m+":"+(b-1)]),h.colspan=-1);d.rowoptions[m+
|
||||
":"+b++]=h;a.push(z(e,f,g))});a.length&&(d.rows.push(a),m++);l++});if("function"===typeof d.onBeforeAutotable)d.onBeforeAutotable(c(this),d.columns,d.rows,e);d.doc.autoTable(d.columns,d.rows,e);if("function"===typeof d.onAfterAutotable)d.onAfterAutotable(c(this),e);a.jspdf.autotable.startY=d.doc.autoTableEndPosY()+e.margin.top});la(d.doc,"undefined"!=typeof d.images&&!1===jQuery.isEmptyObject(d.images));"undefined"!=typeof d.headerrows&&(d.headerrows.length=0);"undefined"!=typeof d.columns&&(d.columns.length=
|
||||
0);"undefined"!=typeof d.rows&&(d.rows.length=0);delete d.doc;d.doc=null})}return this}})})(jQuery);
|
||||
|
||||
define("tableexport", ["jquery"], (function (global) {
|
||||
return function () {
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ define("require-frontend", function(){});
|
|||
define('../libs/require-css/css.min',[],function(){if("undefined"==typeof window)return{load:function(a,b,c){c()}};var a=document.getElementsByTagName("head")[0],b=window.navigator.userAgent.match(/Trident\/([^ ;]*)|AppleWebKit\/([^ ;]*)|Opera\/([^ ;]*)|rv\:([^ ;]*)(.*?)Gecko\/([^ ;]*)|MSIE\s([^ ;]*)|AndroidWebKit\/([^ ;]*)/)||0,c=!1,d=!0;b[1]||b[7]?c=parseInt(b[1])<6||parseInt(b[7])<=9:b[2]||b[8]?d=!1:b[4]&&(c=parseInt(b[4])<18);var e={};e.pluginBuilder="./css-builder";var f,g,h,i=function(){f=document.createElement("style"),a.appendChild(f),g=f.styleSheet||f.sheet},j=0,k=[],l=function(a){g.addImport(a),f.onload=function(){m()},j++,31==j&&(i(),j=0)},m=function(){h();var a=k.shift();return a?(h=a[1],void l(a[0])):void(h=null)},n=function(a,b){if(g&&g.addImport||i(),g&&g.addImport)h?k.push([a,b]):(l(a),h=b);else{f.textContent='@import "'+a+'";';var c=setInterval(function(){try{f.sheet.cssRules,clearInterval(c),b()}catch(a){}},10)}},o=function(b,c){var e=document.createElement("link");if(e.type="text/css",e.rel="stylesheet",d)e.onload=function(){e.onload=function(){},setTimeout(c,7)};else var f=setInterval(function(){for(var a=0;a<document.styleSheets.length;a++){var b=document.styleSheets[a];if(b.href==e.href)return clearInterval(f),c()}},10);e.href=b,a.appendChild(e)};return e.normalize=function(a,b){return".css"==a.substr(a.length-4,4)&&(a=a.substr(0,a.length-4)),b(a)},e.load=function(a,b,d,e){(c?n:o)(b.toUrl(a+".css"),d)},e});
|
||||
/**
|
||||
|
||||
@Name:layer v3.0.3 Web弹层组件
|
||||
@Name:layer v3.1.1 Web弹层组件
|
||||
@Author:贤心
|
||||
@Site:http://layer.layui.com
|
||||
@License:MIT
|
||||
|
|
@ -190,21 +190,67 @@ define('../libs/require-css/css.min',[],function(){if("undefined"==typeof window
|
|||
|
||||
var isLayui = window.layui && layui.define, $, win, ready = {
|
||||
getPath: function(){
|
||||
var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
|
||||
if(script.getAttribute('merge')) return;
|
||||
return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
|
||||
var jsPath = document.currentScript ? document.currentScript.src : function(){
|
||||
var js = document.scripts
|
||||
,last = js.length - 1
|
||||
,src;
|
||||
for(var i = last; i > 0; i--){
|
||||
if(js[i].readyState === 'interactive'){
|
||||
src = js[i].src;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return src || js[last].src;
|
||||
}();
|
||||
return jsPath.substring(0, jsPath.lastIndexOf('/') + 1);
|
||||
}(),
|
||||
|
||||
config: {}, end: {}, minIndex: 0, minLeft: [],
|
||||
btn: ['确定', '取消'],
|
||||
|
||||
//五种原始层模式
|
||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips']
|
||||
type: ['dialog', 'page', 'iframe', 'loading', 'tips'],
|
||||
|
||||
//获取节点的style属性值
|
||||
getStyle: function(node, name){
|
||||
var style = node.currentStyle ? node.currentStyle : window.getComputedStyle(node, null);
|
||||
return style[style.getPropertyValue ? 'getPropertyValue' : 'getAttribute'](name);
|
||||
},
|
||||
|
||||
//载入CSS配件
|
||||
link: function(href, fn, cssname){
|
||||
|
||||
//未设置路径,则不主动加载css
|
||||
if(!layer.path) return;
|
||||
|
||||
var head = document.getElementsByTagName("head")[0], link = document.createElement('link');
|
||||
if(typeof fn === 'string') cssname = fn;
|
||||
var app = (cssname || href).replace(/\.|\//g, '');
|
||||
var id = 'layuicss-'+ app, timeout = 0;
|
||||
|
||||
link.rel = 'stylesheet';
|
||||
link.href = layer.path + href;
|
||||
link.id = id;
|
||||
|
||||
if(!document.getElementById(id)){
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
if(typeof fn !== 'function') return;
|
||||
|
||||
//轮询css是否加载完毕
|
||||
(function poll() {
|
||||
if(++timeout > 8 * 1000 / 100){
|
||||
return window.console && console.error('layer.css: Invalid');
|
||||
};
|
||||
parseInt(ready.getStyle(document.getElementById(id), 'width')) === 1989 ? fn() : setTimeout(poll, 100);
|
||||
}());
|
||||
}
|
||||
};
|
||||
|
||||
//默认内置方法。
|
||||
var layer = {
|
||||
v: '3.0.3',
|
||||
v: '3.1.1',
|
||||
ie: function(){ //ie版本
|
||||
var agent = navigator.userAgent.toLowerCase();
|
||||
return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
|
||||
|
|
@ -225,45 +271,16 @@ var layer = {
|
|||
|
||||
isLayui
|
||||
? layui.addcss('modules/layer/' + options.extend)
|
||||
: layer.link('skin/' + options.extend);
|
||||
: ready.link('theme/' + options.extend);
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
//载入CSS配件
|
||||
link: function(href, fn, cssname){
|
||||
|
||||
//未设置路径,则不主动加载css
|
||||
if(!layer.path) return;
|
||||
|
||||
var head = $('head')[0], link = document.createElement('link');
|
||||
if(typeof fn === 'string') cssname = fn;
|
||||
var app = (cssname || href).replace(/\.|\//g, '');
|
||||
var id = 'layuicss-'+app, timeout = 0;
|
||||
|
||||
link.rel = 'stylesheet';
|
||||
link.href = layer.path + href;
|
||||
link.id = id;
|
||||
|
||||
if(!$('#'+ id)[0]){
|
||||
head.appendChild(link);
|
||||
}
|
||||
|
||||
if(typeof fn !== 'function') return;
|
||||
|
||||
//轮询css是否加载完毕
|
||||
(function poll() {
|
||||
if(++timeout > 8 * 1000 / 100){
|
||||
return window.console && console.error('layer.css: Invalid');
|
||||
};
|
||||
parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
|
||||
}());
|
||||
},
|
||||
|
||||
|
||||
//主体CSS等待事件
|
||||
ready: function(callback){
|
||||
var cssname = 'skinlayercss', ver = '303';
|
||||
isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
|
||||
: layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);
|
||||
var cssname = 'layer', ver = ''
|
||||
,path = (isLayui ? 'modules/layer/' : 'theme/') + 'default/layer.css?v='+ layer.v + ver;
|
||||
isLayui ? layui.addcss(path, callback, cssname) : ready.link(path, callback, cssname);
|
||||
return this;
|
||||
},
|
||||
|
||||
|
|
@ -354,7 +371,7 @@ 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'];
|
||||
doms.anim = ['layer-anim', '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'];
|
||||
|
||||
//默认配置
|
||||
Class.pt.config = {
|
||||
|
|
@ -390,7 +407,7 @@ Class.pt.vessel = function(conType, callback){
|
|||
config.zIndex = zIndex;
|
||||
callback([
|
||||
//遮罩
|
||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
|
||||
config.shade ? ('<div class="layui-layer-shade" id="layui-layer-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;') +'">'
|
||||
|
|
@ -484,6 +501,12 @@ Class.pt.creat = function(){
|
|||
that.layero = $('#'+ doms[0] + times);
|
||||
config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
|
||||
}).auto(times);
|
||||
|
||||
//遮罩
|
||||
$('#layui-layer-shade'+ that.index).css({
|
||||
'background-color': config.shade[1] || '#000'
|
||||
,'opacity': config.shade[0]||config.shade
|
||||
});
|
||||
|
||||
config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
|
||||
|
||||
|
|
@ -504,7 +527,10 @@ Class.pt.creat = function(){
|
|||
|
||||
//为兼容jQuery3.0的css动画影响元素尺寸计算
|
||||
if(doms.anim[config.anim]){
|
||||
that.layero.addClass(doms.anim[config.anim]);
|
||||
var animClass = 'layer-anim '+ doms.anim[config.anim];
|
||||
that.layero.addClass(animClass).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
|
||||
$(this).removeClass(animClass);
|
||||
});
|
||||
};
|
||||
|
||||
//记录关闭动画
|
||||
|
|
@ -516,6 +542,7 @@ Class.pt.creat = function(){
|
|||
//自适应
|
||||
Class.pt.auto = function(index){
|
||||
var that = this, config = that.config, layero = $('#'+ doms[0] + index);
|
||||
|
||||
if(config.area[0] === '' && config.maxWidth > 0){
|
||||
//为了修复IE7下一个让人难以理解的bug
|
||||
if(layer.ie && layer.ie < 8 && config.btn){
|
||||
|
|
@ -523,20 +550,25 @@ Class.pt.auto = function(index){
|
|||
}
|
||||
layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
|
||||
}
|
||||
var area = [layero.innerWidth(), layero.innerHeight()];
|
||||
var titHeight = layero.find(doms[1]).outerHeight() || 0;
|
||||
var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
|
||||
function setHeight(elem){
|
||||
|
||||
var area = [layero.innerWidth(), layero.innerHeight()]
|
||||
,titHeight = layero.find(doms[1]).outerHeight() || 0
|
||||
,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
|
||||
,setHeight = function(elem){
|
||||
elem = layero.find(elem);
|
||||
elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
|
||||
}
|
||||
};
|
||||
|
||||
switch(config.type){
|
||||
case 2:
|
||||
setHeight('iframe');
|
||||
break;
|
||||
default:
|
||||
if(config.area[1] === ''){
|
||||
if(config.fixed && area[1] >= win.height()){
|
||||
if(config.maxHeight > 0 && layero.outerHeight() > config.maxHeight){
|
||||
area[1] = config.maxHeight;
|
||||
setHeight('.'+doms[5]);
|
||||
} else if(config.fixed && area[1] >= win.height()){
|
||||
area[1] = win.height();
|
||||
setHeight('.'+doms[5]);
|
||||
}
|
||||
|
|
@ -544,7 +576,8 @@ Class.pt.auto = function(index){
|
|||
setHeight('.'+doms[5]);
|
||||
}
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
@ -1075,7 +1108,7 @@ layer.close = function(index){
|
|||
};
|
||||
|
||||
if(layero.data('isOutAnim')){
|
||||
layero.addClass(closeAnim);
|
||||
layero.addClass('layer-anim '+ closeAnim);
|
||||
}
|
||||
|
||||
$('#layui-layer-moves, #layui-layer-shade' + index).remove();
|
||||
|
|
@ -1164,6 +1197,7 @@ layer.tab = function(options){
|
|||
options = options || {};
|
||||
|
||||
var tab = options.tab || {}
|
||||
,THIS = 'layui-this'
|
||||
,success = options.success;
|
||||
|
||||
delete options.success;
|
||||
|
|
@ -1175,7 +1209,7 @@ layer.tab = function(options){
|
|||
title: function(){
|
||||
var len = tab.length, ii = 1, str = '';
|
||||
if(len > 0){
|
||||
str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
|
||||
str = '<span class="'+ THIS +'">'+ tab[0].title +'</span>';
|
||||
for(; ii < len; ii++){
|
||||
str += '<span>'+ tab[ii].title +'</span>';
|
||||
}
|
||||
|
|
@ -1185,7 +1219,7 @@ layer.tab = function(options){
|
|||
content: '<ul class="layui-layer-tabmain">'+ function(){
|
||||
var len = tab.length, ii = 1, str = '';
|
||||
if(len > 0){
|
||||
str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
|
||||
str = '<li class="layui-layer-tabli '+ THIS +'">'+ (tab[0].content || 'no content') +'</li>';
|
||||
for(; ii < len; ii++){
|
||||
str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
|
||||
}
|
||||
|
|
@ -1198,7 +1232,7 @@ layer.tab = function(options){
|
|||
btn.on('mousedown', function(e){
|
||||
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
|
||||
var othis = $(this), index = othis.index();
|
||||
othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
|
||||
othis.addClass(THIS).siblings().removeClass(THIS);
|
||||
main.eq(index).show().siblings().hide();
|
||||
typeof options.change === 'function' && options.change(index);
|
||||
});
|
||||
|
|
@ -1429,7 +1463,7 @@ window.layui && layui.define ? (
|
|||
layer.ready()
|
||||
,layui.define('jquery', function(exports){ //layui加载
|
||||
layer.path = layui.cache.dir;
|
||||
ready.run(layui.jquery);
|
||||
ready.run(layui.$);
|
||||
|
||||
//暴露模块
|
||||
window.layer = layer;
|
||||
|
|
|
|||
Loading…
Reference in New Issue