|
|
@ -15,7 +15,9 @@ if (typeof window !== "undefined") { |
|
|
|
_global = this; |
|
|
|
_global = this; |
|
|
|
} |
|
|
|
} |
|
|
|
if (_global.BI == null) { |
|
|
|
if (_global.BI == null) { |
|
|
|
_global.BI = {}; |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_global.BI.prepares = []; |
|
|
|
}// Production steps of ECMA-262, Edition 5, 15.4.4.14
|
|
|
|
}// 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) { |
|
|
@ -254,7 +256,9 @@ if (typeof window !== "undefined") { |
|
|
|
_global = this; |
|
|
|
_global = this; |
|
|
|
} |
|
|
|
} |
|
|
|
if (_global.BI == null) { |
|
|
|
if (_global.BI == null) { |
|
|
|
_global.BI = {}; |
|
|
|
_global.BI = {prepares: []}; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
_global.BI.prepares = []; |
|
|
|
}/*! |
|
|
|
}/*! |
|
|
|
* jQuery JavaScript Library v1.9.1 |
|
|
|
* jQuery JavaScript Library v1.9.1 |
|
|
|
* http://jquery.com/
|
|
|
|
* http://jquery.com/
|
|
|
@ -21723,10 +21727,10 @@ _.extend(BI.OB.prototype, { |
|
|
|
// if (o.root !== true) {
|
|
|
|
// if (o.root !== true) {
|
|
|
|
// throw new Error("root is a required property");
|
|
|
|
// throw new Error("root is a required property");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
this.element = $(o.element); |
|
|
|
this.element = BI.Widget._renderEngine.createElement(this); |
|
|
|
this._isRoot = true; |
|
|
|
this._isRoot = true; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.element = $(document.createElement(o.tagName)); |
|
|
|
this.element = BI.Widget._renderEngine.createElement(this); |
|
|
|
} |
|
|
|
} |
|
|
|
this.element._isWidget = true; |
|
|
|
this.element._isWidget = true; |
|
|
|
if (o.baseCls || o.extraCls || o.cls) { |
|
|
|
if (o.baseCls || o.extraCls || o.cls) { |
|
|
@ -22101,6 +22105,21 @@ _.extend(BI.OB.prototype, { |
|
|
|
this.purgeListeners(); |
|
|
|
this.purgeListeners(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
BI.Widget.registerRenderEngine = function (engine) { |
|
|
|
|
|
|
|
BI.Widget._renderEngine = engine; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
BI.Widget.registerRenderEngine({ |
|
|
|
|
|
|
|
createElement: function (widget) { |
|
|
|
|
|
|
|
if(BI.isWidget(widget)) { |
|
|
|
|
|
|
|
var o = widget.options; |
|
|
|
|
|
|
|
if (o.element) { |
|
|
|
|
|
|
|
return $(o.element); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return $(document.createElement(o.tagName)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return $(widget); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}); |
|
|
|
})();(function () { |
|
|
|
})();(function () { |
|
|
|
var kv = {}; |
|
|
|
var kv = {}; |
|
|
|
BI.shortcut = function (xtype, cls) { |
|
|
|
BI.shortcut = function (xtype, cls) { |
|
|
@ -22121,6 +22140,10 @@ _.extend(BI.OB.prototype, { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
BI.createWidget = function (item, options, context) { |
|
|
|
|
|
|
|
// 先把准备环境准备好
|
|
|
|
|
|
|
|
while(BI.prepares && BI.prepares.length > 0) { |
|
|
|
|
|
|
|
BI.prepares.shift()(); |
|
|
|
|
|
|
|
} |
|
|
|
var el, w; |
|
|
|
var el, w; |
|
|
|
item || (item = {}); |
|
|
|
item || (item = {}); |
|
|
|
if (BI.isWidget(options)) { |
|
|
|
if (BI.isWidget(options)) { |
|
|
@ -26256,7 +26279,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
});// 工程配置
|
|
|
|
});// 工程配置
|
|
|
|
(function () { |
|
|
|
BI.prepares.push(function () { |
|
|
|
// 注册布局
|
|
|
|
// 注册布局
|
|
|
|
var isSupportFlex = BI.isSupportCss3("flex"); |
|
|
|
var isSupportFlex = BI.isSupportCss3("flex"); |
|
|
|
BI.Plugin.registerWidget("bi.horizontal", function (ob) { |
|
|
|
BI.Plugin.registerWidget("bi.horizontal", function (ob) { |
|
|
@ -26302,7 +26325,7 @@ BI.RedMarkBehavior = BI.inherit(BI.Behavior, { |
|
|
|
return ob; |
|
|
|
return ob; |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}());/** |
|
|
|
});/** |
|
|
|
* guy |
|
|
|
* guy |
|
|
|
* 控制器 |
|
|
|
* 控制器 |
|
|
|
* Controller层超类 |
|
|
|
* Controller层超类 |
|
|
@ -26645,7 +26668,7 @@ BI.LayerController = BI.inherit(BI.Controller, { |
|
|
|
w = from.element; |
|
|
|
w = from.element; |
|
|
|
} |
|
|
|
} |
|
|
|
if (BI.isNotEmptyString(w)) { |
|
|
|
if (BI.isNotEmptyString(w)) { |
|
|
|
w = $(w); |
|
|
|
w = BI.Widget._renderEngine.createElement(w); |
|
|
|
} |
|
|
|
} |
|
|
|
if (this.has(name)) { |
|
|
|
if (this.has(name)) { |
|
|
|
return this.get(name); |
|
|
|
return this.get(name); |
|
|
@ -26862,7 +26885,7 @@ BI.PopoverController = BI.inherit(BI.Controller, { |
|
|
|
this.floatContainer[name].visible(); |
|
|
|
this.floatContainer[name].visible(); |
|
|
|
var popover = this.get(name); |
|
|
|
var popover = this.get(name); |
|
|
|
popover.show && popover.show(); |
|
|
|
popover.show && popover.show(); |
|
|
|
var W = $(this.options.render).width(), H = $(this.options.render).height(); |
|
|
|
var W = BI.Widget._renderEngine.createElement(this.options.render).width(), H = BI.Widget._renderEngine.createElement(this.options.render).height(); |
|
|
|
var w = popover.element.width(), h = popover.element.height(); |
|
|
|
var w = popover.element.width(), h = popover.element.height(); |
|
|
|
var left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
var left = (W - w) / 2, top = (H - h) / 2; |
|
|
|
if (left < 0) { |
|
|
|
if (left < 0) { |
|
|
@ -26928,7 +26951,7 @@ BI.ResizeController = BI.inherit(BI.Controller, { |
|
|
|
self._resize(ev); |
|
|
|
self._resize(ev); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}, 30); |
|
|
|
}, 30); |
|
|
|
_global.$ && $(window).resize(fn); |
|
|
|
BI.Widget._renderEngine.createElement(window).resize(fn); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_resize: function (ev) { |
|
|
|
_resize: function (ev) { |
|
|
@ -27067,10 +27090,10 @@ BI.TooltipsController = BI.inherit(BI.Controller, { |
|
|
|
// var scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;
|
|
|
|
// var scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;
|
|
|
|
// var x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;
|
|
|
|
// var x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;
|
|
|
|
var x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15; |
|
|
|
var x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15; |
|
|
|
if (x + tooltip.element.outerWidth() > $("body").outerWidth()) { |
|
|
|
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
x -= tooltip.element.outerWidth() + 15; |
|
|
|
} |
|
|
|
} |
|
|
|
if (y + tooltip.element.outerHeight() > $("body").outerHeight()) { |
|
|
|
if (y + tooltip.element.outerHeight() > BI.Widget._renderEngine.createElement("body").outerHeight()) { |
|
|
|
y -= tooltip.element.outerHeight() + 15; |
|
|
|
y -= tooltip.element.outerHeight() + 15; |
|
|
|
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); |
|
|
|
!opt.belowMouse && (y = Math.min(y, offset.top - tooltip.element.outerHeight() - 5)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -28239,7 +28262,7 @@ BI.extend(BI.DOM, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
isExist: function (obj) { |
|
|
|
isExist: function (obj) { |
|
|
|
return $("body").find(obj.element).length > 0; |
|
|
|
return BI.Widget._renderEngine.createElement("body").find(obj.element).length > 0; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 预加载图片
|
|
|
|
// 预加载图片
|
|
|
@ -28415,7 +28438,7 @@ BI.extend(BI.DOM, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getTextSizeWidth: function (text, fontSize) { |
|
|
|
getTextSizeWidth: function (text, fontSize) { |
|
|
|
var span = $("<span></span>").addClass("text-width-span").appendTo($("body")); |
|
|
|
var span = BI.Widget._renderEngine.createElement("<span></span>").addClass("text-width-span").appendTo($("body")); |
|
|
|
|
|
|
|
|
|
|
|
if (fontSize == null) { |
|
|
|
if (fontSize == null) { |
|
|
|
fontSize = 12; |
|
|
|
fontSize = 12; |
|
|
@ -28433,11 +28456,11 @@ BI.extend(BI.DOM, { |
|
|
|
// 获取滚动条的宽度
|
|
|
|
// 获取滚动条的宽度
|
|
|
|
getScrollWidth: function () { |
|
|
|
getScrollWidth: function () { |
|
|
|
if (this._scrollWidth == null) { |
|
|
|
if (this._scrollWidth == null) { |
|
|
|
var ul = $("<div>").width(50).height(50).css({ |
|
|
|
var ul = BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({ |
|
|
|
position: "absolute", |
|
|
|
position: "absolute", |
|
|
|
top: "-9999px", |
|
|
|
top: "-9999px", |
|
|
|
overflow: "scroll" |
|
|
|
overflow: "scroll" |
|
|
|
}).appendTo($("body")); |
|
|
|
}).appendTo("body"); |
|
|
|
this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth; |
|
|
|
this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth; |
|
|
|
ul.destroy(); |
|
|
|
ul.destroy(); |
|
|
|
} |
|
|
|
} |
|
|
@ -28447,7 +28470,7 @@ BI.extend(BI.DOM, { |
|
|
|
getImage: function (param, fillStyle, backgroundColor) { |
|
|
|
getImage: function (param, fillStyle, backgroundColor) { |
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
var canvas = document.createElement("canvas"); |
|
|
|
var ratio = 2; |
|
|
|
var ratio = 2; |
|
|
|
$("body").append(canvas); |
|
|
|
BI.Widget._renderEngine.createElement("body").append(canvas); |
|
|
|
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; |
|
|
|
var w = BI.DOM.getTextSizeWidth(param, 14) + 6; |
|
|
|
canvas.width = w * ratio; |
|
|
|
canvas.width = w * ratio; |
|
|
|
canvas.height = 24 * ratio; |
|
|
|
canvas.height = 24 * ratio; |
|
|
@ -28457,7 +28480,7 @@ BI.extend(BI.DOM, { |
|
|
|
ctx.fillStyle = fillStyle || "#3D4D66"; |
|
|
|
ctx.fillStyle = fillStyle || "#3D4D66"; |
|
|
|
ctx.textBaseline = "middle"; |
|
|
|
ctx.textBaseline = "middle"; |
|
|
|
ctx.fillText(param, 6 * ratio, 12 * ratio); |
|
|
|
ctx.fillText(param, 6 * ratio, 12 * ratio); |
|
|
|
$(canvas).destroy(); |
|
|
|
BI.Widget._renderEngine.createElement(canvas).destroy(); |
|
|
|
var backColor = backgroundColor || "#EAF2FD"; |
|
|
|
var backColor = backgroundColor || "#EAF2FD"; |
|
|
|
// IE可以放大缩小所以要固定最大最小宽高
|
|
|
|
// IE可以放大缩小所以要固定最大最小宽高
|
|
|
|
return { |
|
|
|
return { |
|
|
@ -29093,7 +29116,7 @@ _.extend(Array.prototype, { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
_global.$ && $(function () { |
|
|
|
BI.prepares.push(function () { |
|
|
|
// 牵扯到国际化这些常量在页面加载后再生效
|
|
|
|
// 牵扯到国际化这些常量在页面加载后再生效
|
|
|
|
// full day names
|
|
|
|
// full day names
|
|
|
|
Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
|
|
|
Date._DN = [BI.i18nText("BI-Basic_Sunday"), |
|
|
@ -29296,25 +29319,7 @@ Date.prototype.getWeekEndDate = function () { |
|
|
|
return this.getOffsetDate(Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6); |
|
|
|
return this.getOffsetDate(Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
/** Checks date and time equality */ |
|
|
|
// 格式化打印日期
|
|
|
|
Date.prototype.equalsTo = function (date) { |
|
|
|
|
|
|
|
return ((this.getFullYear() == date.getFullYear()) && |
|
|
|
|
|
|
|
(this.getMonth() == date.getMonth()) && |
|
|
|
|
|
|
|
(this.getDate() == date.getDate()) && |
|
|
|
|
|
|
|
(this.getHours() == date.getHours()) && |
|
|
|
|
|
|
|
(this.getMinutes() == date.getMinutes()) && |
|
|
|
|
|
|
|
(this.getSeconds() == date.getSeconds())); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Set only the year, month, date parts (keep existing time) */ |
|
|
|
|
|
|
|
Date.prototype.setDateOnly = function (date) { |
|
|
|
|
|
|
|
var tmp = BI.getDate(date); |
|
|
|
|
|
|
|
this.setDate(1); |
|
|
|
|
|
|
|
this.setFullYear(tmp.getFullYear()); |
|
|
|
|
|
|
|
this.setMonth(tmp.getMonth()); |
|
|
|
|
|
|
|
this.setDate(tmp.getDate()); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
/** Prints the date in a string according to the given format. */ |
|
|
|
|
|
|
|
Date.prototype.print = function (str) { |
|
|
|
Date.prototype.print = function (str) { |
|
|
|
var m = this.getMonth(); |
|
|
|
var m = this.getMonth(); |
|
|
|
var d = this.getDate(); |
|
|
|
var d = this.getDate(); |
|
|
@ -30481,7 +30486,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.CenterAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = $("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
width: "100%", |
|
|
|
width: "100%", |
|
|
|
height: "100%", |
|
|
|
height: "100%", |
|
|
@ -30490,7 +30495,7 @@ BI.CenterAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
border: "none", |
|
|
|
border: "none", |
|
|
|
"border-collapse": "separate" |
|
|
|
"border-collapse": "separate" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$tr = $("<tr>"); |
|
|
|
this.$tr = BI.Widget._renderEngine.createElement("<tr>"); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -30589,7 +30594,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.HorizontalAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = $("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
width: "100%", |
|
|
|
width: "100%", |
|
|
|
"white-space": "nowrap", |
|
|
|
"white-space": "nowrap", |
|
|
@ -30597,7 +30602,7 @@ BI.HorizontalAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
border: "none", |
|
|
|
border: "none", |
|
|
|
"border-collapse": "separate" |
|
|
|
"border-collapse": "separate" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$tr = $("<tr>"); |
|
|
|
this.$tr = BI.Widget._renderEngine.createElement("<tr>"); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -30866,7 +30871,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.VerticalAdaptLayout.superclass.render.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.$table = $("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto", |
|
|
|
width: o.horizontalAlign === BI.HorizontalAlign.Stretch ? "100%" : "auto", |
|
|
|
height: "100%", |
|
|
|
height: "100%", |
|
|
@ -30875,7 +30880,7 @@ BI.VerticalAdaptLayout = BI.inherit(BI.Layout, { |
|
|
|
border: "none", |
|
|
|
border: "none", |
|
|
|
"border-collapse": "separate" |
|
|
|
"border-collapse": "separate" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$tr = $("<tr>"); |
|
|
|
this.$tr = BI.Widget._renderEngine.createElement("<tr>"); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -31507,7 +31512,7 @@ BI.FlexCenterLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.FlexCenterLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.FlexCenterLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$wrapper = $("<div>").addClass("flex-wrapper-center-layout-wrapper"); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-wrapper-center-layout-wrapper"); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -31561,7 +31566,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.FlexHorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.FlexHorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.$wrapper = $("<div>").addClass("flex-wrapper-horizontal-layout-wrapper " + o.verticalAlign); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-wrapper-horizontal-layout-wrapper " + o.verticalAlign); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -31635,7 +31640,7 @@ BI.FlexVerticalCenter = BI.inherit(BI.Layout, { |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.FlexVerticalCenter.superclass.render.apply(this, arguments); |
|
|
|
BI.FlexVerticalCenter.superclass.render.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.$wrapper = $("<div>").addClass("flex-wrapper-vertical-center-wrapper " + o.horizontalAlign); |
|
|
|
this.$wrapper = BI.Widget._renderEngine.createElement("<div>").addClass("flex-wrapper-vertical-center-wrapper " + o.horizontalAlign); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -32731,14 +32736,14 @@ BI.HorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.HorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.HorizontalLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = $("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
"white-space": "nowrap", |
|
|
|
"white-space": "nowrap", |
|
|
|
"border-spacing": "0px", |
|
|
|
"border-spacing": "0px", |
|
|
|
border: "none", |
|
|
|
border: "none", |
|
|
|
"border-collapse": "separate" |
|
|
|
"border-collapse": "separate" |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$tr = $("<tr>"); |
|
|
|
this.$tr = BI.Widget._renderEngine.createElement("<tr>"); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.$tr.appendTo(this.$table); |
|
|
|
this.populate(this.options.items); |
|
|
|
this.populate(this.options.items); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -33375,7 +33380,7 @@ BI.TdLayout = BI.inherit(BI.Layout, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
BI.TdLayout.superclass.render.apply(this, arguments); |
|
|
|
BI.TdLayout.superclass.render.apply(this, arguments); |
|
|
|
this.$table = $("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
this.$table = BI.Widget._renderEngine.createElement("<table>").attr({cellspacing: 0, cellpadding: 0}).css({ |
|
|
|
position: "relative", |
|
|
|
position: "relative", |
|
|
|
width: "100%", |
|
|
|
width: "100%", |
|
|
|
height: "100%", |
|
|
|
height: "100%", |
|
|
@ -35886,7 +35891,7 @@ BI.Single = BI.inherit(BI.Widget, { |
|
|
|
clearTimeout(this.timeout); |
|
|
|
clearTimeout(this.timeout); |
|
|
|
} |
|
|
|
} |
|
|
|
this._hideTooltip(); |
|
|
|
this._hideTooltip(); |
|
|
|
$(this.element).unbind("mouseenter.title" + this.getName()) |
|
|
|
this.element.unbind("mouseenter.title" + this.getName()) |
|
|
|
.unbind("mousemove.title" + this.getName()) |
|
|
|
.unbind("mousemove.title" + this.getName()) |
|
|
|
.unbind("mouseleave.title" + this.getName()); |
|
|
|
.unbind("mouseleave.title" + this.getName()); |
|
|
|
this._hoverBinded = false; |
|
|
|
this._hoverBinded = false; |
|
|
@ -36202,14 +36207,14 @@ BI.BasicButton = BI.inherit(BI.Single, { |
|
|
|
var selected = false; |
|
|
|
var selected = false; |
|
|
|
hand.mousedown(function (e) { |
|
|
|
hand.mousedown(function (e) { |
|
|
|
// if (e.button === 0) {
|
|
|
|
// if (e.button === 0) {
|
|
|
|
$(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
// if (e.button === 0) {
|
|
|
|
// if (e.button === 0) {
|
|
|
|
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { |
|
|
|
if (BI.DOM.isExist(self) && !hand.__isMouseInBounds__(e) && mouseDown === true && !selected) { |
|
|
|
// self.setSelected(!self.isSelected());
|
|
|
|
// self.setSelected(!self.isSelected());
|
|
|
|
self._trigger(); |
|
|
|
self._trigger(); |
|
|
|
} |
|
|
|
} |
|
|
|
mouseDown = false; |
|
|
|
mouseDown = false; |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}); |
|
|
|
}); |
|
|
|
if (mouseDown === true) { |
|
|
|
if (mouseDown === true) { |
|
|
@ -36231,7 +36236,7 @@ BI.BasicButton = BI.inherit(BI.Single, { |
|
|
|
} |
|
|
|
} |
|
|
|
mouseDown = false; |
|
|
|
mouseDown = false; |
|
|
|
selected = false; |
|
|
|
selected = false; |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); |
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
break; |
|
|
@ -36242,11 +36247,11 @@ BI.BasicButton = BI.inherit(BI.Single, { |
|
|
|
var mouseDown = false; |
|
|
|
var mouseDown = false; |
|
|
|
var interval; |
|
|
|
var interval; |
|
|
|
hand.mousedown(function (e) { |
|
|
|
hand.mousedown(function (e) { |
|
|
|
$(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
BI.Widget._renderEngine.createElement(document).bind("mouseup." + self.getName(), function (e) { |
|
|
|
interval && clearInterval(interval); |
|
|
|
interval && clearInterval(interval); |
|
|
|
interval = null; |
|
|
|
interval = null; |
|
|
|
mouseDown = false; |
|
|
|
mouseDown = false; |
|
|
|
$(document).unbind("mouseup." + self.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + self.getName()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (mouseDown === true) { |
|
|
|
if (mouseDown === true) { |
|
|
|
return; |
|
|
|
return; |
|
|
@ -36476,7 +36481,7 @@ BI.BasicButton = BI.inherit(BI.Single, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
empty: function () { |
|
|
|
empty: function () { |
|
|
|
$(document).unbind("mouseup." + this.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mouseup." + this.getName()); |
|
|
|
BI.BasicButton.superclass.empty.apply(this, arguments); |
|
|
|
BI.BasicButton.superclass.empty.apply(this, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -37970,14 +37975,17 @@ BI.PartTree = BI.inherit(BI.AsyncTree, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.part_tree", BI.PartTree);BI.Resizers = new BI.ResizeController(); |
|
|
|
BI.shortcut("bi.part_tree", BI.PartTree);BI.prepares.push(function () { |
|
|
|
BI.Layers = new BI.LayerController(); |
|
|
|
BI.Resizers = new BI.ResizeController(); |
|
|
|
BI.Maskers = new BI.MaskersController(); |
|
|
|
BI.Layers = new BI.LayerController(); |
|
|
|
BI.Bubbles = new BI.BubblesController(); |
|
|
|
BI.Maskers = new BI.MaskersController(); |
|
|
|
BI.Tooltips = new BI.TooltipsController(); |
|
|
|
BI.Bubbles = new BI.BubblesController(); |
|
|
|
BI.Popovers = new BI.PopoverController(); |
|
|
|
BI.Tooltips = new BI.TooltipsController(); |
|
|
|
BI.Broadcasts = new BI.BroadcastController(); |
|
|
|
BI.Popovers = new BI.PopoverController(); |
|
|
|
BI.StyleLoaders = new BI.StyleLoaderManager();/** |
|
|
|
BI.Broadcasts = new BI.BroadcastController(); |
|
|
|
|
|
|
|
BI.StyleLoaders = new BI.StyleLoaderManager(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
/** |
|
|
|
* CollectionView |
|
|
|
* CollectionView |
|
|
|
* |
|
|
|
* |
|
|
|
* Created by GUY on 2016/1/15. |
|
|
|
* Created by GUY on 2016/1/15. |
|
|
@ -38619,7 +38627,7 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
// BI-10290 公式combo双击公式内容会收起
|
|
|
|
// BI-10290 公式combo双击公式内容会收起
|
|
|
|
if ((this.element.find(e.target).length > 0 && e.type !== "mousewheel") |
|
|
|
if ((this.element.find(e.target).length > 0 && e.type !== "mousewheel") |
|
|
|
|| (this.popupView && this.popupView.element.find(e.target).length > 0) |
|
|
|
|| (this.popupView && this.popupView.element.find(e.target).length > 0) |
|
|
|
|| e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
|
|
|
|
|| e.target.className === "CodeMirror-cursor" || BI.Widget._renderEngine.createElement(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
|
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
@ -38640,7 +38648,7 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
this.element.removeClass(this.options.comboClass); |
|
|
|
this.element.removeClass(this.options.comboClass); |
|
|
|
|
|
|
|
|
|
|
|
$(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); |
|
|
|
this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -38653,8 +38661,8 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
this.adjustHeight(); |
|
|
|
this.adjustHeight(); |
|
|
|
|
|
|
|
|
|
|
|
this.element.addClass(this.options.comboClass); |
|
|
|
this.element.addClass(this.options.comboClass); |
|
|
|
$(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); |
|
|
|
$(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); |
|
|
|
BI.Widget._renderEngine.createElement(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); |
|
|
|
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); |
|
|
|
this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -38822,7 +38830,7 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
destroy: function () { |
|
|
|
destroy: function () { |
|
|
|
$(document).unbind("mousedown." + this.getName()) |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()) |
|
|
|
.unbind("mousewheel." + this.getName()) |
|
|
|
.unbind("mousewheel." + this.getName()) |
|
|
|
.unbind("mouseenter." + this.getName()) |
|
|
|
.unbind("mouseenter." + this.getName()) |
|
|
|
.unbind("mousemove." + this.getName()) |
|
|
|
.unbind("mousemove." + this.getName()) |
|
|
@ -40559,7 +40567,7 @@ BI.Msg = function () { |
|
|
|
}, |
|
|
|
}, |
|
|
|
toast: function (message, options, context) { |
|
|
|
toast: function (message, options, context) { |
|
|
|
options = options || {}; |
|
|
|
options = options || {}; |
|
|
|
context = context || $("body"); |
|
|
|
context = context || BI.Widget._renderEngine.createElement("body"); |
|
|
|
var level = options.level || "normal"; |
|
|
|
var level = options.level || "normal"; |
|
|
|
var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose; |
|
|
|
var autoClose = BI.isNull(options.autoClose) ? true : options.autoClose; |
|
|
|
var toast = BI.createWidget({ |
|
|
|
var toast = BI.createWidget({ |
|
|
@ -40589,7 +40597,7 @@ BI.Msg = function () { |
|
|
|
}, 5000); |
|
|
|
}, 5000); |
|
|
|
}, |
|
|
|
}, |
|
|
|
_show: function (hasCancel, title, message, callback) { |
|
|
|
_show: function (hasCancel, title, message, callback) { |
|
|
|
$mask = $("<div class=\"bi-z-index-mask\">").css({ |
|
|
|
$mask = BI.Widget._renderEngine.createElement("<div class=\"bi-z-index-mask\">").css({ |
|
|
|
position: "absolute", |
|
|
|
position: "absolute", |
|
|
|
zIndex: BI.zIndex_tip - 2, |
|
|
|
zIndex: BI.zIndex_tip - 2, |
|
|
|
top: 0, |
|
|
|
top: 0, |
|
|
@ -40598,7 +40606,7 @@ BI.Msg = function () { |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
opacity: 0.5 |
|
|
|
opacity: 0.5 |
|
|
|
}).appendTo("body"); |
|
|
|
}).appendTo("body"); |
|
|
|
$pop = $("<div class=\"bi-message-depend\">").css({ |
|
|
|
$pop = BI.Widget._renderEngine.createElement("<div class=\"bi-message-depend\">").css({ |
|
|
|
position: "absolute", |
|
|
|
position: "absolute", |
|
|
|
zIndex: BI.zIndex_tip - 1, |
|
|
|
zIndex: BI.zIndex_tip - 1, |
|
|
|
top: 0, |
|
|
|
top: 0, |
|
|
@ -41125,7 +41133,7 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
this.startY = 0; |
|
|
|
this.startY = 0; |
|
|
|
this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { |
|
|
|
this.tracker = new BI.MouseMoveTracker(function (deltaX, deltaY) { |
|
|
|
var size = self._calculateSize(); |
|
|
|
var size = self._calculateSize(); |
|
|
|
var W = $("body").width(), H = $("body").height(); |
|
|
|
var W = BI.Widget._renderEngine.createElement("body").width(), H = BI.Widget._renderEngine.createElement("body").height(); |
|
|
|
self.startX += deltaX; |
|
|
|
self.startX += deltaX; |
|
|
|
self.startY += deltaY; |
|
|
|
self.startY += deltaY; |
|
|
|
self.element.css({ |
|
|
|
self.element.css({ |
|
|
@ -41445,7 +41453,7 @@ BI.PopupView = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
return BI.createWidget({ |
|
|
|
return BI.createWidget({ |
|
|
|
type: "bi.center", |
|
|
|
type: "bi.center", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-border-top", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-split-top", |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
items: BI.createItems(o.buttons, { |
|
|
|
items: BI.createItems(o.buttons, { |
|
|
|
once: false, |
|
|
|
once: false, |
|
|
@ -44270,9 +44278,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { |
|
|
|
self._focus(); |
|
|
|
self._focus(); |
|
|
|
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); |
|
|
|
self.fireEvent(BI.TextAreaEditor.EVENT_FOCUS); |
|
|
|
} |
|
|
|
} |
|
|
|
$(document).bind("mousedown." + self.getName(), function (e) { |
|
|
|
BI.Widget._renderEngine.createElement(document).bind("mousedown." + self.getName(), function (e) { |
|
|
|
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { |
|
|
|
if (BI.DOM.isExist(self) && !self.element.__isMouseInBounds__(e)) { |
|
|
|
$(document).unbind("mousedown." + self.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); |
|
|
|
self.content.element.blur(); |
|
|
|
self.content.element.blur(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -44282,7 +44290,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { |
|
|
|
self._blur(); |
|
|
|
self._blur(); |
|
|
|
self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); |
|
|
|
self.fireEvent(BI.TextAreaEditor.EVENT_BLUR); |
|
|
|
} |
|
|
|
} |
|
|
|
$(document).unbind("mousedown." + self.getName()); |
|
|
|
BI.Widget._renderEngine.createElement(document).unbind("mousedown." + self.getName()); |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (BI.isKey(o.value)) { |
|
|
|
if (BI.isKey(o.value)) { |
|
|
|
self.setValue(o.value); |
|
|
|
self.setValue(o.value); |
|
|
@ -44422,7 +44430,7 @@ BI.Iframe = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.options.element = $("<iframe frameborder='0' src='" + o.src + "'>"); |
|
|
|
this.options.element = BI.Widget._renderEngine.createElement("<iframe frameborder='0' src='" + o.src + "'>"); |
|
|
|
BI.Iframe.superclass._init.apply(this, arguments); |
|
|
|
BI.Iframe.superclass._init.apply(this, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -44474,7 +44482,7 @@ BI.Img = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
this.options.element = $("<img src='" + o.src + "'>"); |
|
|
|
this.options.element = BI.Widget._renderEngine.createElement("<img src='" + o.src + "'>"); |
|
|
|
BI.Img.superclass._init.apply(this, arguments); |
|
|
|
BI.Img.superclass._init.apply(this, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -45105,7 +45113,7 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/** |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
select: function () { |
|
|
|
select: function () { |
|
|
|
$(this.wrap.dom.input).click(); |
|
|
|
BI.Widget._renderEngine.createElement(this.wrap.dom.input).click(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
upload: function (handler) { |
|
|
|
upload: function (handler) { |
|
|
@ -55666,7 +55674,7 @@ BI.MultiPopupView = BI.inherit(BI.PopupView, { |
|
|
|
|
|
|
|
|
|
|
|
this.buttongroup = BI.createWidget({ |
|
|
|
this.buttongroup = BI.createWidget({ |
|
|
|
type: "bi.button_group", |
|
|
|
type: "bi.button_group", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-border-top", |
|
|
|
cls: "list-view-toolbar bi-high-light bi-split-top", |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
items: BI.createItems(text, { |
|
|
|
items: BI.createItems(text, { |
|
|
|
type: "bi.text_button", |
|
|
|
type: "bi.text_button", |
|
|
|