|
|
|
@ -99,7 +99,7 @@ if (!Array.prototype.lastIndexOf) {
|
|
|
|
|
* Created by wang on 15/6/23. |
|
|
|
|
*/ |
|
|
|
|
// 解决console未定义问题 guy
|
|
|
|
|
window.console = window.console || (function () { |
|
|
|
|
_global.console = _global.console || (function () { |
|
|
|
|
var c = {}; |
|
|
|
|
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile |
|
|
|
|
= c.clear = c.exception = c.trace = c.assert = function () { |
|
|
|
@ -109,7 +109,7 @@ window.console = window.console || (function () {
|
|
|
|
|
/* |
|
|
|
|
* 前端缓存 |
|
|
|
|
*/ |
|
|
|
|
window.localStorage || (window.localStorage = { |
|
|
|
|
_global.localStorage || (_global.localStorage = { |
|
|
|
|
items: {}, |
|
|
|
|
setItem: function (k, v) { |
|
|
|
|
BI.Cache.addCookie(k, v); |
|
|
|
@ -219,7 +219,25 @@ if(!Date.now) {
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}(window);/*! |
|
|
|
|
}(window);/** |
|
|
|
|
* Created by richie on 15/7/8. |
|
|
|
|
*/ |
|
|
|
|
/** |
|
|
|
|
* 初始化BI对象 |
|
|
|
|
*/ |
|
|
|
|
var _global; |
|
|
|
|
if (typeof window !== "undefined") { |
|
|
|
|
_global = window; |
|
|
|
|
} else if (typeof global !== "undefined") { |
|
|
|
|
_global = global; |
|
|
|
|
} else if (typeof self !== "undefined") { |
|
|
|
|
_global = self; |
|
|
|
|
} else { |
|
|
|
|
_global = this; |
|
|
|
|
} |
|
|
|
|
if (_global.BI == null) { |
|
|
|
|
_global.BI = {}; |
|
|
|
|
}/*! |
|
|
|
|
* jQuery JavaScript Library v1.9.1 |
|
|
|
|
* http://jquery.com/
|
|
|
|
|
* |
|
|
|
@ -19925,21 +19943,22 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
|
|
|
|
|
} |
|
|
|
|
}.call(this)); |
|
|
|
|
/** |
|
|
|
|
* Created by richie on 15/7/8. |
|
|
|
|
*/ |
|
|
|
|
/** |
|
|
|
|
* 初始化BI对象 |
|
|
|
|
*/ |
|
|
|
|
if (window.BI == null) { |
|
|
|
|
window.BI = {}; |
|
|
|
|
}/** |
|
|
|
|
* 基本函数 |
|
|
|
|
* Create By GUY 2014\11\17 |
|
|
|
|
* |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
if (!window.BI) { |
|
|
|
|
window.BI = {}; |
|
|
|
|
var _global; |
|
|
|
|
if (typeof window !== "undefined") { |
|
|
|
|
_global = window; |
|
|
|
|
} else if (typeof global !== "undefined") { |
|
|
|
|
_global = global; |
|
|
|
|
} else if (typeof self !== "undefined") { |
|
|
|
|
_global = self; |
|
|
|
|
} else { |
|
|
|
|
_global = this; |
|
|
|
|
} |
|
|
|
|
if (!_global.BI) { |
|
|
|
|
_global.BI = {}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
!(function (undefined) { |
|
|
|
@ -20667,11 +20686,11 @@ if (!window.BI) {
|
|
|
|
|
}); |
|
|
|
|
_.extend(BI, { |
|
|
|
|
getTime: function () { |
|
|
|
|
if (window.performance && window.performance.now) { |
|
|
|
|
return window.performance.now(); |
|
|
|
|
if (_global.performance && _global.performance.now) { |
|
|
|
|
return _global.performance.now(); |
|
|
|
|
} |
|
|
|
|
if (window.performance && window.performance.webkitNow) { |
|
|
|
|
return window.performance.webkitNow(); |
|
|
|
|
if (_global.performance && _global.performance.webkitNow) { |
|
|
|
|
return _global.performance.webkitNow(); |
|
|
|
|
} |
|
|
|
|
if (Date.now) { |
|
|
|
|
return Date.now(); |
|
|
|
@ -21296,6 +21315,9 @@ if (!window.BI) {
|
|
|
|
|
// 浏览器相关方法
|
|
|
|
|
_.extend(BI, { |
|
|
|
|
isIE: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
if (this.__isIE == null) { |
|
|
|
|
this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
} |
|
|
|
@ -21303,6 +21325,9 @@ if (!window.BI) {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
getIEVersion: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
if (this.__IEVersion != null) { |
|
|
|
|
return this.__IEVersion; |
|
|
|
|
} |
|
|
|
@ -21330,38 +21355,65 @@ if (!window.BI) {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isEdge: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /edge/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isChrome: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /chrome/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isFireFox: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /firefox/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isOpera: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /opera/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isSafari: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /safari/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isKhtml: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isMac: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /macintosh|mac os x/i.test(navigator.userAgent); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isWindows: function () { |
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return /windows|win32/i.test(navigator.userAgent); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
isSupportCss3: function (style) { |
|
|
|
|
if(!_global.document) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
var prefix = ["webkit", "Moz", "ms", "o"], |
|
|
|
|
i, len, |
|
|
|
|
humpString = [], |
|
|
|
@ -21417,7 +21469,7 @@ BI.OB = function (config) {
|
|
|
|
|
if (BI.isFunction(this.props)) { |
|
|
|
|
props = this.props(config); |
|
|
|
|
} |
|
|
|
|
this.options = (window.$ || window._).extend(this._defaultConfig(config), props, config); |
|
|
|
|
this.options = (_global.$ || _global._).extend(this._defaultConfig(config), props, config); |
|
|
|
|
this._init(); |
|
|
|
|
this._initRef(); |
|
|
|
|
}; |
|
|
|
@ -21567,11 +21619,12 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
!(function () { |
|
|
|
|
var lazy = (typeof document !== 'undefined' && |
|
|
|
|
typeof document.documentMode === 'number') || |
|
|
|
|
(typeof navigator !== 'undefined' && |
|
|
|
|
typeof navigator.userAgent === 'string' && |
|
|
|
|
var lazy = (typeof document !== "undefined" && |
|
|
|
|
typeof document.documentMode === "number") || |
|
|
|
|
(typeof navigator !== "undefined" && |
|
|
|
|
typeof navigator.userAgent === "string" && |
|
|
|
|
/\bEdge\/\d/.test(navigator.userAgent)); |
|
|
|
|
|
|
|
|
|
BI.Widget = BI.inherit(BI.OB, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
return BI.extend(BI.Widget.superclass._defaultConfig.apply(this), { |
|
|
|
@ -21619,7 +21672,6 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
this._initElementHeight(); |
|
|
|
|
this._initVisual(); |
|
|
|
|
this._initState(); |
|
|
|
|
if (this.isVisible()) { |
|
|
|
|
if (this.beforeInit) { |
|
|
|
|
this.__asking = true; |
|
|
|
|
this.beforeInit(BI.bind(this._render, this)); |
|
|
|
@ -21629,11 +21681,6 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
} else { |
|
|
|
|
this._render(); |
|
|
|
|
} |
|
|
|
|
this.rendered = true |
|
|
|
|
} |
|
|
|
|
if (this._isRoot) { |
|
|
|
|
this._mount() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_render: function () { |
|
|
|
@ -21745,7 +21792,7 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
_mount: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var isMounted = this._isMounted; |
|
|
|
|
if (this._isMounting || isMounted || !this.isVisible() || this.__asking === true) { |
|
|
|
|
if (isMounted || this.__asking === true) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (this._isRoot === true) { |
|
|
|
@ -21756,30 +21803,17 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
if (!isMounted) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this._isMounting = true |
|
|
|
|
if (!this.rendered) { |
|
|
|
|
if (this.beforeInit) { |
|
|
|
|
this.__asking = true; |
|
|
|
|
this.beforeInit(BI.bind(this._render, this)); |
|
|
|
|
if (this.__asking === true) { |
|
|
|
|
this.__async = true; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this._render(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.beforeMount && this.beforeMount(); |
|
|
|
|
this._isMounted = true; |
|
|
|
|
lazy && this._mountChildren && this._mountChildren(); |
|
|
|
|
!lazy && this._mountChildren && this._mountChildren(); |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
!self.isEnabled() && widget._setEnable(false); |
|
|
|
|
!self.isValid() && widget._setValid(false); |
|
|
|
|
widget._mount && widget._mount(); |
|
|
|
|
}); |
|
|
|
|
!lazy && this._mountChildren && this._mountChildren(); |
|
|
|
|
lazy && this._mountChildren && this._mountChildren(); |
|
|
|
|
this.mounted && this.mounted(); |
|
|
|
|
this._isMounting = false |
|
|
|
|
return true; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: null, |
|
|
|
@ -22060,7 +22094,7 @@ _.extend(BI.OB.prototype, {
|
|
|
|
|
var kv = {}; |
|
|
|
|
BI.shortcut = function (xtype, cls) { |
|
|
|
|
if (kv[xtype] != null) { |
|
|
|
|
console.error("shortcut:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("shortcut:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
kv[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -23084,19 +23118,19 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
|
|
|
|
|
* version: 0.5.3 |
|
|
|
|
**/ |
|
|
|
|
!(function () { |
|
|
|
|
var attachEvent = document.attachEvent, |
|
|
|
|
var attachEvent = _global.document && _global.document.attachEvent, |
|
|
|
|
stylesCreated = false; |
|
|
|
|
|
|
|
|
|
if (!attachEvent) { |
|
|
|
|
if (_global.document && !attachEvent) { |
|
|
|
|
var requestFrame = (function () { |
|
|
|
|
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || |
|
|
|
|
function (fn) { return window.setTimeout(fn, 20); }; |
|
|
|
|
var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame || |
|
|
|
|
function (fn) { return _global.setTimeout(fn, 20); }; |
|
|
|
|
return function (fn) { return raf(fn); }; |
|
|
|
|
})(); |
|
|
|
|
|
|
|
|
|
var cancelFrame = (function () { |
|
|
|
|
var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || |
|
|
|
|
window.clearTimeout; |
|
|
|
|
var cancel = _global.cancelAnimationFrame || _global.mozCancelAnimationFrame || _global.webkitCancelAnimationFrame || |
|
|
|
|
_global.clearTimeout; |
|
|
|
|
return function (id) { return cancel(id); }; |
|
|
|
|
})(); |
|
|
|
|
|
|
|
|
@ -23564,7 +23598,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = {
|
|
|
|
|
return Math.floor(node / 2); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var Int32Array = window.Int32Array || function (size) { |
|
|
|
|
var Int32Array = _global.Int32Array || function (size) { |
|
|
|
|
var xs = []; |
|
|
|
|
for (var i = size - 1; i >= 0; --i) { |
|
|
|
|
xs[i] = 0; |
|
|
|
@ -24589,6 +24623,10 @@ BI.Layout = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.element.append(frag); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
@ -24600,7 +24638,7 @@ BI.Layout = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
this.element.append(frag); |
|
|
|
|
this.appendFragment(frag); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -25242,8 +25280,18 @@ BI.ShowAction = BI.inherit(BI.Action, {
|
|
|
|
|
callback && callback(); |
|
|
|
|
} |
|
|
|
|
});(function () { |
|
|
|
|
if (!window.BI) { |
|
|
|
|
window.BI = {}; |
|
|
|
|
var _global; |
|
|
|
|
if (typeof window !== "undefined") { |
|
|
|
|
_global = window; |
|
|
|
|
} else if (typeof global !== "undefined") { |
|
|
|
|
_global = global; |
|
|
|
|
} else if (typeof self !== "undefined") { |
|
|
|
|
_global = self; |
|
|
|
|
} else { |
|
|
|
|
_global = this; |
|
|
|
|
} |
|
|
|
|
if (!_global.BI) { |
|
|
|
|
_global.BI = {}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function isEmpty (value) { |
|
|
|
@ -25771,7 +25819,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
|
|
|
|
|
try { |
|
|
|
|
// 注意0啊
|
|
|
|
|
// var jo = $.parseJSON(text) || {};
|
|
|
|
|
var jo = $ ? $.parseJSON(text) : window.JSON.parse(text); |
|
|
|
|
var jo = $ ? $.parseJSON(text) : _global.JSON.parse(text); |
|
|
|
|
if (jo == null) { |
|
|
|
|
jo = {}; |
|
|
|
|
} |
|
|
|
@ -25824,7 +25872,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
|
|
|
|
|
url = url.replaceAll(BI.keys(BI.specialCharsMap || []).join("|"), function (str) { |
|
|
|
|
return BI.specialCharsMap[str] || str; |
|
|
|
|
}); |
|
|
|
|
return window.encodeURIComponent(url); |
|
|
|
|
return _global.encodeURIComponent(url); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.decodeURIComponent = function (url) { |
|
|
|
@ -25836,7 +25884,7 @@ BI.ShowAction = BI.inherit(BI.Action, {
|
|
|
|
|
url = url.replaceAll(BI.keys(reserveSpecialCharsMap || []).join("|"), function (str) { |
|
|
|
|
return reserveSpecialCharsMap[str] || str; |
|
|
|
|
}); |
|
|
|
|
return window.decodeURIComponent(url); |
|
|
|
|
return _global.decodeURIComponent(url); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
BI.contentFormat = function (cv, fmt) { |
|
|
|
@ -26276,12 +26324,6 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, {
|
|
|
|
|
return ob; |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
// IE8下滚动条用原生的
|
|
|
|
|
$(function () { |
|
|
|
|
if (BI.isIE9Below()) { |
|
|
|
|
BI.GridTableScrollbar.SIZE = 18; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}());/** |
|
|
|
|
* guy |
|
|
|
|
* 控制器 |
|
|
|
@ -26908,7 +26950,7 @@ BI.ResizeController = BI.inherit(BI.Controller, {
|
|
|
|
|
self._resize(ev); |
|
|
|
|
// }
|
|
|
|
|
}, 30); |
|
|
|
|
$(window).resize(fn); |
|
|
|
|
_global.$ && $(window).resize(fn); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_resize: function (ev) { |
|
|
|
@ -27617,9 +27659,9 @@ BI.extend(jQuery.fn, {
|
|
|
|
|
var computedStyle = void 0; |
|
|
|
|
|
|
|
|
|
// W3C Standard
|
|
|
|
|
if (window.getComputedStyle) { |
|
|
|
|
if (_global.getComputedStyle) { |
|
|
|
|
// In certain cases such as within an iframe in FF3, this returns null.
|
|
|
|
|
computedStyle = window.getComputedStyle(node, null); |
|
|
|
|
computedStyle = _global.getComputedStyle(node, null); |
|
|
|
|
if (computedStyle) { |
|
|
|
|
return computedStyle.getPropertyValue(BI.hyphenate(name)); |
|
|
|
|
} |
|
|
|
@ -28452,7 +28494,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
var constantInjection = {}; |
|
|
|
|
BI.constant = function (xtype, cls) { |
|
|
|
|
if (constantInjection[xtype] != null) { |
|
|
|
|
console.error("constant:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("constant:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
constantInjection[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -28460,7 +28502,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
var modelInjection = {}; |
|
|
|
|
BI.model = function (xtype, cls) { |
|
|
|
|
if (modelInjection[xtype] != null) { |
|
|
|
|
console.error("model:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("model:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
modelInjection[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -28468,7 +28510,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
var storeInjection = {}; |
|
|
|
|
BI.store = function (xtype, cls) { |
|
|
|
|
if (storeInjection[xtype] != null) { |
|
|
|
|
console.error("store:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("store:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
storeInjection[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -28476,7 +28518,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
var serviceInjection = {}; |
|
|
|
|
BI.service = function (xtype, cls) { |
|
|
|
|
if (serviceInjection[xtype] != null) { |
|
|
|
|
console.error("service:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("service:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
serviceInjection[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -28484,7 +28526,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
var providerInjection = {}; |
|
|
|
|
BI.provider = function (xtype, cls) { |
|
|
|
|
if (providerInjection[xtype] != null) { |
|
|
|
|
console.error("provider:[" + xtype + "] has been registed"); |
|
|
|
|
_global.console && console.error("provider:[" + xtype + "] has been registed"); |
|
|
|
|
} |
|
|
|
|
providerInjection[xtype] = cls; |
|
|
|
|
}; |
|
|
|
@ -28554,7 +28596,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
try { |
|
|
|
|
bfns[i].apply(inst, arguments); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e); |
|
|
|
|
_global.console && console.error(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -28568,7 +28610,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
try { |
|
|
|
|
afns[i].apply(inst, arguments); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e); |
|
|
|
|
_global.console && console.error(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -28632,7 +28674,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
try { |
|
|
|
|
act(event, config); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e); |
|
|
|
|
_global.console && console.error(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -28642,7 +28684,7 @@ BI.extend(BI.DOM, {
|
|
|
|
|
try { |
|
|
|
|
act.apply(null, args); |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e); |
|
|
|
|
_global.console && console.error(e); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -29069,7 +29111,7 @@ _.extend(Array.prototype, {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
$(function () { |
|
|
|
|
_global.$ && $(function () { |
|
|
|
|
// 牵扯到国际化这些常量在页面加载后再生效
|
|
|
|
|
// full day names
|
|
|
|
|
Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
|
|
|
@ -29901,14 +29943,14 @@ _.extend(String.prototype, {
|
|
|
|
|
} |
|
|
|
|
};!(function () { |
|
|
|
|
var cancelAnimationFrame = |
|
|
|
|
window.cancelAnimationFrame || |
|
|
|
|
window.webkitCancelAnimationFrame || |
|
|
|
|
window.mozCancelAnimationFrame || |
|
|
|
|
window.oCancelAnimationFrame || |
|
|
|
|
window.msCancelAnimationFrame || |
|
|
|
|
window.clearTimeout; |
|
|
|
|
_global.cancelAnimationFrame || |
|
|
|
|
_global.webkitCancelAnimationFrame || |
|
|
|
|
_global.mozCancelAnimationFrame || |
|
|
|
|
_global.oCancelAnimationFrame || |
|
|
|
|
_global.msCancelAnimationFrame || |
|
|
|
|
_global.clearTimeout; |
|
|
|
|
|
|
|
|
|
var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.setTimeout; |
|
|
|
|
var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BI.MouseMoveTracker = function (onMove, onMoveEnd, domNode) { |
|
|
|
@ -30009,7 +30051,7 @@ _.extend(String.prototype, {
|
|
|
|
|
var PIXEL_STEP = 10; |
|
|
|
|
var LINE_HEIGHT = 40; |
|
|
|
|
var PAGE_HEIGHT = 800; |
|
|
|
|
var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || window.setTimeout; |
|
|
|
|
var requestAnimationFrame = _global.requestAnimationFrame || _global.webkitRequestAnimationFrame || _global.mozRequestAnimationFrame || _global.oRequestAnimationFrame || _global.msRequestAnimationFrame || _global.setTimeout; |
|
|
|
|
|
|
|
|
|
function normalizeWheel (/* object*/event) /* object*/ { |
|
|
|
|
var sX = 0, |
|
|
|
@ -30526,20 +30568,9 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return td; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$tr.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
@ -30643,20 +30674,9 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return td; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$tr.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
@ -30933,20 +30953,9 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return td; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$tr.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getWrapper: function () { |
|
|
|
@ -31527,20 +31536,9 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return w; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$wrapper.append(frag); |
|
|
|
|
this.element.append(this.$wrapper); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getWrapper: function () { |
|
|
|
@ -31612,20 +31610,9 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return w; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$wrapper.append(frag); |
|
|
|
|
this.element.append(this.$wrapper); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getWrapper: function () { |
|
|
|
@ -31697,20 +31684,9 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, {
|
|
|
|
|
return w; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$wrapper.append(frag); |
|
|
|
|
this.element.append(this.$wrapper); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getWrapper: function () { |
|
|
|
@ -32840,23 +32816,11 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return td; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$tr.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
|
// console.log("horizontal layout do not need to resize");
|
|
|
|
|
}, |
|
|
|
@ -33523,20 +33487,9 @@ BI.TdLayout = BI.inherit(BI.Layout, {
|
|
|
|
|
return tr; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mountChildren: function () { |
|
|
|
|
var self = this; |
|
|
|
|
var frag = document.createDocumentFragment(); |
|
|
|
|
var hasChild = false; |
|
|
|
|
BI.each(this._children, function (i, widget) { |
|
|
|
|
if (widget.element !== self.element) { |
|
|
|
|
frag.appendChild(widget.element[0]); |
|
|
|
|
hasChild = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
if (hasChild === true) { |
|
|
|
|
appendFragment: function (frag) { |
|
|
|
|
this.$table.append(frag); |
|
|
|
|
this.element.append(this.$table); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
resize: function () { |
|
|
|
@ -34174,12 +34127,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
|
|
var hasProto = '__proto__' in {}; |
|
|
|
|
|
|
|
|
|
var isIE = function isIE() { |
|
|
|
|
if (typeof navigator === "undefined") { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase()) |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var getIEVersion = function getIEVersion() { |
|
|
|
|
var version = 0; |
|
|
|
|
if (typeof navigator === "undefined") { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
var agent = navigator.userAgent.toLowerCase(); |
|
|
|
|
var v1 = agent.match(/(?:msie\s([\w.]+))/); |
|
|
|
|
var v2 = agent.match(/(?:trident.*rv:([\w.]+))/); |
|
|
|
@ -35597,7 +35556,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handler (event) { |
|
|
|
|
var orgEvent = event || window.event, |
|
|
|
|
var orgEvent = event || _global.event, |
|
|
|
|
args = slice.call(arguments, 1), |
|
|
|
|
delta = 0, |
|
|
|
|
deltaX = 0, |
|
|
|
@ -37245,8 +37204,8 @@ BI.TreeView = BI.inherit(BI.Pane, {
|
|
|
|
|
treeNode.times = treeNode.times || 1; |
|
|
|
|
var param = "id=" + treeNode.id |
|
|
|
|
+ "×=" + (treeNode.times++) |
|
|
|
|
+ "&parentValues= " + window.encodeURIComponent(BI.jsonEncode(parentNode)) |
|
|
|
|
+ "&checkState=" + window.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); |
|
|
|
|
+ "&parentValues= " + _global.encodeURIComponent(BI.jsonEncode(parentNode)) |
|
|
|
|
+ "&checkState=" + _global.encodeURIComponent(BI.jsonEncode(treeNode.getCheckStatus())); |
|
|
|
|
|
|
|
|
|
return "&" + param; |
|
|
|
|
} |
|
|
|
@ -42508,8 +42467,7 @@ BI.ImageButton = BI.inherit(BI.BasicButton, {
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; |
|
|
|
|
BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { |
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.image_button", BI.ImageButton); |
|
|
|
|
/** |
|
|
|
|
* 文字类型的按钮 |
|
|
|
|
* @class BI.Button |
|
|
|
@ -42659,7 +42617,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) {
|
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.button", BI.Button); |
|
|
|
|
BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
|
})(jQuery);/** |
|
|
|
|
/** |
|
|
|
|
* guy |
|
|
|
|
* 可以点击的一行文字 |
|
|
|
|
* @class BI.TextButton |
|
|
|
@ -44589,7 +44547,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
* @extends BI.Single |
|
|
|
|
* @abstract |
|
|
|
|
*/ |
|
|
|
|
(function () { |
|
|
|
|
(function (document) { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @description normalize input.files. create if not present, add item method if not present |
|
|
|
@ -44736,7 +44694,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
}, |
|
|
|
|
false |
|
|
|
|
); |
|
|
|
|
xhr.open("post", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName), true); |
|
|
|
|
xhr.open("post", handler.url + "&filename=" + _global.encodeURIComponent(handler.file.fileName), true); |
|
|
|
|
if (!xhr.upload) { |
|
|
|
|
var rpe = {loaded: 0, total: handler.file.fileSize || handler.file.size, simulation: true}; |
|
|
|
|
rpe.interval = setInterval(function () { |
|
|
|
@ -44847,7 +44805,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
handler.attach_array.push(attachO); |
|
|
|
|
} |
|
|
|
|
} catch (e) { |
|
|
|
|
if (isFunction(handler.onerror)) {handler.onerror(rpe, event || window.event);} |
|
|
|
|
if (isFunction(handler.onerror)) {handler.onerror(rpe, event || _global.event);} |
|
|
|
|
} |
|
|
|
|
if (isFunction(handler.onload)) {handler.onload(rpe, {responseText: responseText});} |
|
|
|
|
}, |
|
|
|
@ -44867,7 +44825,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
iframe.onload = onload; |
|
|
|
|
iframe.onerror = function (event) { |
|
|
|
|
if (isFunction(handler.onerror)) { |
|
|
|
|
handler.onerror(rpe, event || window.event); |
|
|
|
|
handler.onerror(rpe, event || _global.event); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
iframe.onreadystatechange = function () { |
|
|
|
@ -44889,7 +44847,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
form.setAttribute("action", handler.url + "&filename=" + window.encodeURIComponent(handler.file.fileName)); |
|
|
|
|
form.setAttribute("action", handler.url + "&filename=" + _global.encodeURIComponent(handler.file.fileName)); |
|
|
|
|
form.setAttribute("target", iframe.id); |
|
|
|
|
form.setAttribute("method", "post"); |
|
|
|
|
form.appendChild(handler.file); |
|
|
|
@ -45197,7 +45155,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
|
|
|
|
|
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; |
|
|
|
|
BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; |
|
|
|
|
BI.shortcut("bi.file", BI.File); |
|
|
|
|
})();/** |
|
|
|
|
})(_global.document || {});/** |
|
|
|
|
* guy |
|
|
|
|
* @class BI.Input 一个button和一行数 组成的一行listitem |
|
|
|
|
* @extends BI.Single |
|
|
|
@ -68226,12 +68184,15 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
|
|
|
|
|
}, |
|
|
|
|
value: this.storeValue |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.vertical", |
|
|
|
|
element: this, |
|
|
|
|
items: [this.button_group], |
|
|
|
|
|
|
|
|
|
BI.createWidget(BI.extend({ |
|
|
|
|
element: this |
|
|
|
|
}, BI.LogicFactory.createLogic(BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Top), BI.extend({ |
|
|
|
|
scrolly: true, |
|
|
|
|
vgap: 5 |
|
|
|
|
}); |
|
|
|
|
}, opts.logic, { |
|
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Top, this.button_group) |
|
|
|
|
})))); |
|
|
|
|
this.button_group.on(BI.Controller.EVENT_CHANGE, function () { |
|
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
|
}); |
|
|
|
@ -81683,9 +81644,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
|
|
|
|
|
|
|
|
|
|
function createStore() { |
|
|
|
|
var needPop = false; |
|
|
|
|
if (!this._storeCreated && window.Fix && this._store && this.isVisible()) { |
|
|
|
|
if (window.Fix && this._store) { |
|
|
|
|
var store = findStore(this.options.context || this.options.element); |
|
|
|
|
this._storeCreated = true; |
|
|
|
|
if (store) { |
|
|
|
|
pushTarget(store); |
|
|
|
|
needPop = true; |
|
|
|
@ -81747,7 +81707,6 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
|
|
|
|
|
_.each(["_mount"], function (name) { |
|
|
|
|
var old = BI.Widget.prototype[name]; |
|
|
|
|
old && (BI.Widget.prototype[name] = function () { |
|
|
|
|
createStore.call(this); |
|
|
|
|
this.store && pushTarget(this.store); |
|
|
|
|
var res = old.apply(this, arguments); |
|
|
|
|
this.store && popTarget(); |
|
|
|
@ -82128,8 +82087,8 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
|
|
|
|
|
|
|
|
|
|
// Ensure that `History` can be used outside of the browser.
|
|
|
|
|
if (typeof window !== "undefined") { |
|
|
|
|
this.location = window.location; |
|
|
|
|
this.history = window.history; |
|
|
|
|
this.location = _global.location; |
|
|
|
|
this.history = _global.history; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -82247,7 +82206,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Add a cross-platform `addEventListener` shim for older browsers.
|
|
|
|
|
var addEventListener = window.addEventListener || function (eventName, listener) { |
|
|
|
|
var addEventListener = _global.addEventListener || function (eventName, listener) { |
|
|
|
|
return attachEvent("on" + eventName, listener); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -82268,7 +82227,7 @@ BI.shortcut("bi.value_chooser_pane", BI.ValueChooserPane);;(function () {
|
|
|
|
|
// but possibly useful for unit testing Routers.
|
|
|
|
|
stop: function () { |
|
|
|
|
// Add a cross-platform `removeEventListener` shim for older browsers.
|
|
|
|
|
var removeEventListener = window.removeEventListener || function (eventName, listener) { |
|
|
|
|
var removeEventListener = _global.removeEventListener || function (eventName, listener) { |
|
|
|
|
return detachEvent("on" + eventName, listener); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|