|
|
@ -1,22 +1,4 @@ |
|
|
|
/** |
|
|
|
// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
|
|
|
* 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 = {}; |
|
|
|
|
|
|
|
}// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
|
|
|
|
|
|
|
// Reference: http://es5.github.io/#x15.4.4.14
|
|
|
|
// Reference: http://es5.github.io/#x15.4.4.14
|
|
|
|
if (!Array.prototype.indexOf) { |
|
|
|
if (!Array.prototype.indexOf) { |
|
|
|
Array.prototype.indexOf = function (searchElement, fromIndex) { |
|
|
|
Array.prototype.indexOf = function (searchElement, fromIndex) { |
|
|
@ -208,8 +190,8 @@ if(!Date.now) { |
|
|
|
this.set = {}; |
|
|
|
this.set = {}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}// 修复ie9下sort方法的bug
|
|
|
|
}// 修复ie9下sort方法的bug
|
|
|
|
!function (_global) { |
|
|
|
!function (window) { |
|
|
|
var ua = _global.navigator.userAgent.toLowerCase(), |
|
|
|
var ua = window.navigator.userAgent.toLowerCase(), |
|
|
|
reg = /msie|applewebkit.+safari/; |
|
|
|
reg = /msie|applewebkit.+safari/; |
|
|
|
if (reg.test(ua)) { |
|
|
|
if (reg.test(ua)) { |
|
|
|
var _sort = Array.prototype.sort; |
|
|
|
var _sort = Array.prototype.sort; |
|
|
@ -237,7 +219,7 @@ if(!Date.now) { |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}(_global);/** |
|
|
|
}(window);/** |
|
|
|
* Created by richie on 15/7/8. |
|
|
|
* Created by richie on 15/7/8. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
/** |
|
|
|
/** |
|
|
@ -21333,6 +21315,9 @@ if (!_global.BI) { |
|
|
|
// 浏览器相关方法
|
|
|
|
// 浏览器相关方法
|
|
|
|
_.extend(BI, { |
|
|
|
_.extend(BI, { |
|
|
|
isIE: function () { |
|
|
|
isIE: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
if (this.__isIE == null) { |
|
|
|
if (this.__isIE == null) { |
|
|
|
this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
this.__isIE = /(msie|trident)/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
} |
|
|
|
} |
|
|
@ -21340,6 +21325,9 @@ if (!_global.BI) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getIEVersion: function () { |
|
|
|
getIEVersion: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} |
|
|
|
if (this.__IEVersion != null) { |
|
|
|
if (this.__IEVersion != null) { |
|
|
|
return this.__IEVersion; |
|
|
|
return this.__IEVersion; |
|
|
|
} |
|
|
|
} |
|
|
@ -21367,38 +21355,65 @@ if (!_global.BI) { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isEdge: function () { |
|
|
|
isEdge: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /edge/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
return /edge/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isChrome: function () { |
|
|
|
isChrome: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /chrome/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
return /chrome/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isFireFox: function () { |
|
|
|
isFireFox: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /firefox/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
return /firefox/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isOpera: function () { |
|
|
|
isOpera: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /opera/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
return /opera/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isSafari: function () { |
|
|
|
isSafari: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /safari/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
return /safari/i.test(navigator.userAgent.toLowerCase()); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isKhtml: function () { |
|
|
|
isKhtml: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); |
|
|
|
return /Konqueror|Safari|KHTML/i.test(navigator.userAgent); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isMac: function () { |
|
|
|
isMac: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /macintosh|mac os x/i.test(navigator.userAgent); |
|
|
|
return /macintosh|mac os x/i.test(navigator.userAgent); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isWindows: function () { |
|
|
|
isWindows: function () { |
|
|
|
|
|
|
|
if(!_global.navigator) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return /windows|win32/i.test(navigator.userAgent); |
|
|
|
return /windows|win32/i.test(navigator.userAgent); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isSupportCss3: function (style) { |
|
|
|
isSupportCss3: function (style) { |
|
|
|
|
|
|
|
if(!_global.document) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
var prefix = ["webkit", "Moz", "ms", "o"], |
|
|
|
var prefix = ["webkit", "Moz", "ms", "o"], |
|
|
|
i, len, |
|
|
|
i, len, |
|
|
|
humpString = [], |
|
|
|
humpString = [], |
|
|
@ -23103,10 +23118,10 @@ BI.ScalingCellSizeAndPositionManager.prototype = { |
|
|
|
* version: 0.5.3 |
|
|
|
* version: 0.5.3 |
|
|
|
**/ |
|
|
|
**/ |
|
|
|
!(function () { |
|
|
|
!(function () { |
|
|
|
var attachEvent = document.attachEvent, |
|
|
|
var attachEvent = _global.document && _global.document.attachEvent, |
|
|
|
stylesCreated = false; |
|
|
|
stylesCreated = false; |
|
|
|
|
|
|
|
|
|
|
|
if (!attachEvent) { |
|
|
|
if (_global.document && !attachEvent) { |
|
|
|
var requestFrame = (function () { |
|
|
|
var requestFrame = (function () { |
|
|
|
var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame || |
|
|
|
var raf = _global.requestAnimationFrame || _global.mozRequestAnimationFrame || _global.webkitRequestAnimationFrame || |
|
|
|
function (fn) { return _global.setTimeout(fn, 20); }; |
|
|
|
function (fn) { return _global.setTimeout(fn, 20); }; |
|
|
@ -26309,12 +26324,6 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, { |
|
|
|
return ob; |
|
|
|
return ob; |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
// IE8下滚动条用原生的
|
|
|
|
|
|
|
|
$(function () { |
|
|
|
|
|
|
|
if (BI.isIE9Below()) { |
|
|
|
|
|
|
|
BI.GridTableScrollbar.SIZE = 18; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}());/** |
|
|
|
}());/** |
|
|
|
* guy |
|
|
|
* guy |
|
|
|
* 控制器 |
|
|
|
* 控制器 |
|
|
@ -26941,7 +26950,7 @@ BI.ResizeController = BI.inherit(BI.Controller, { |
|
|
|
self._resize(ev); |
|
|
|
self._resize(ev); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}, 30); |
|
|
|
}, 30); |
|
|
|
$(window).resize(fn); |
|
|
|
_global.$ && $(window).resize(fn); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_resize: function (ev) { |
|
|
|
_resize: function (ev) { |
|
|
@ -29102,7 +29111,7 @@ _.extend(Array.prototype, { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
$(function () { |
|
|
|
_global.$ && $(function () { |
|
|
|
// 牵扯到国际化这些常量在页面加载后再生效
|
|
|
|
// 牵扯到国际化这些常量在页面加载后再生效
|
|
|
|
// full day names
|
|
|
|
// full day names
|
|
|
|
Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
|
|
|
Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
|
|
@ -34118,12 +34127,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons |
|
|
|
var hasProto = '__proto__' in {}; |
|
|
|
var hasProto = '__proto__' in {}; |
|
|
|
|
|
|
|
|
|
|
|
var isIE = function isIE() { |
|
|
|
var isIE = function isIE() { |
|
|
|
|
|
|
|
if (typeof navigator === "undefined") { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase()) |
|
|
|
return (/(msie|trident)/i.test(navigator.userAgent.toLowerCase()) |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
var getIEVersion = function getIEVersion() { |
|
|
|
var getIEVersion = function getIEVersion() { |
|
|
|
var version = 0; |
|
|
|
var version = 0; |
|
|
|
|
|
|
|
if (typeof navigator === "undefined") { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
var agent = navigator.userAgent.toLowerCase(); |
|
|
|
var agent = navigator.userAgent.toLowerCase(); |
|
|
|
var v1 = agent.match(/(?:msie\s([\w.]+))/); |
|
|
|
var v1 = agent.match(/(?:msie\s([\w.]+))/); |
|
|
|
var v2 = agent.match(/(?:trident.*rv:([\w.]+))/); |
|
|
|
var v2 = agent.match(/(?:trident.*rv:([\w.]+))/); |
|
|
@ -42452,9 +42467,8 @@ BI.ImageButton = BI.inherit(BI.BasicButton, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.ImageButton.EVENT_CHANGE = "ImageButton.EVENT_CHANGE"; |
|
|
|
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 |
|
|
|
* @class BI.Button |
|
|
|
* @extends BI.BasicButton |
|
|
|
* @extends BI.BasicButton |
|
|
@ -42462,7 +42476,7 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { |
|
|
|
* @cfg {JSON} options 配置属性 |
|
|
|
* @cfg {JSON} options 配置属性 |
|
|
|
* @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 |
|
|
|
* @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.Button = BI.inherit(BI.BasicButton, { |
|
|
|
BI.Button = BI.inherit(BI.BasicButton, { |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function (props) { |
|
|
|
_defaultConfig: function (props) { |
|
|
|
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); |
|
|
|
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); |
|
|
@ -42600,10 +42614,10 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { |
|
|
|
destroy: function () { |
|
|
|
destroy: function () { |
|
|
|
BI.Button.superclass.destroy.apply(this, arguments); |
|
|
|
BI.Button.superclass.destroy.apply(this, arguments); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.button", BI.Button); |
|
|
|
BI.shortcut("bi.button", BI.Button); |
|
|
|
BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; |
|
|
|
})(jQuery);/** |
|
|
|
/** |
|
|
|
* guy |
|
|
|
* guy |
|
|
|
* 可以点击的一行文字 |
|
|
|
* 可以点击的一行文字 |
|
|
|
* @class BI.TextButton |
|
|
|
* @class BI.TextButton |
|
|
@ -44533,7 +44547,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
* @abstract |
|
|
|
* @abstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
(function () { |
|
|
|
(function (document) { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @description normalize input.files. create if not present, add item method if not present |
|
|
|
* @description normalize input.files. create if not present, add item method if not present |
|
|
@ -45141,7 +45155,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** |
|
|
|
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; |
|
|
|
BI.File.EVENT_PROGRESS = "EVENT_PROGRESS"; |
|
|
|
BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; |
|
|
|
BI.File.EVENT_UPLOADED = "EVENT_UPLOADED"; |
|
|
|
BI.shortcut("bi.file", BI.File); |
|
|
|
BI.shortcut("bi.file", BI.File); |
|
|
|
})();/** |
|
|
|
})(_global.document || {});/** |
|
|
|
* guy |
|
|
|
* guy |
|
|
|
* @class BI.Input 一个button和一行数 组成的一行listitem |
|
|
|
* @class BI.Input 一个button和一行数 组成的一行listitem |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|