|
|
@ -16077,13 +16077,15 @@ BI.ScalingCellSizeAndPositionManager.prototype = { |
|
|
|
BI.PrefixIntervalTree = function (xs) { |
|
|
|
BI.PrefixIntervalTree = function (xs) { |
|
|
|
this._size = xs.length; |
|
|
|
this._size = xs.length; |
|
|
|
this._half = ceilLog2(this._size); |
|
|
|
this._half = ceilLog2(this._size); |
|
|
|
|
|
|
|
// _heap是一个_size两倍以上的堆
|
|
|
|
this._heap = new Int32Array(2 * this._half); |
|
|
|
this._heap = new Int32Array(2 * this._half); |
|
|
|
|
|
|
|
|
|
|
|
var i; |
|
|
|
var i; |
|
|
|
|
|
|
|
// 初始化 >= _size 的堆空间, 即叶子节点
|
|
|
|
for (i = 0; i < this._size; ++i) { |
|
|
|
for (i = 0; i < this._size; ++i) { |
|
|
|
this._heap[this._half + i] = xs[i]; |
|
|
|
this._heap[this._half + i] = xs[i]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间
|
|
|
|
for (i = this._half - 1; i > 0; --i) { |
|
|
|
for (i = this._half - 1; i > 0; --i) { |
|
|
|
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1]; |
|
|
|
this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1]; |
|
|
|
} |
|
|
|
} |
|
|
@ -16091,6 +16093,7 @@ BI.ScalingCellSizeAndPositionManager.prototype = { |
|
|
|
|
|
|
|
|
|
|
|
BI.PrefixIntervalTree.prototype = { |
|
|
|
BI.PrefixIntervalTree.prototype = { |
|
|
|
constructor: BI.PrefixIntervalTree, |
|
|
|
constructor: BI.PrefixIntervalTree, |
|
|
|
|
|
|
|
// 往_half之后的空间set值,需要更新其所有祖先节点的值
|
|
|
|
set: function (index, value) { |
|
|
|
set: function (index, value) { |
|
|
|
var node = this._half + index; |
|
|
|
var node = this._half + index; |
|
|
|
this._heap[node] = value; |
|
|
|
this._heap[node] = value; |
|
|
@ -17625,7 +17628,8 @@ BI.Layout = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.layout", BI.Layout);BI.Plugin = BI.Plugin || {}; |
|
|
|
BI.shortcut("bi.layout", BI.Layout); |
|
|
|
|
|
|
|
BI.Plugin = BI.Plugin || {}; |
|
|
|
!(function () { |
|
|
|
!(function () { |
|
|
|
var _WidgetsPlugin = {}; |
|
|
|
var _WidgetsPlugin = {}; |
|
|
|
var _ObjectPlugin = {}; |
|
|
|
var _ObjectPlugin = {}; |
|
|
@ -34163,7 +34167,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { |
|
|
|
_addElement: function (i, item) { |
|
|
|
_addElement: function (i, item) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments); |
|
|
|
var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
w.element.css({ |
|
|
|
|
|
|
|
position: "relative", |
|
|
|
|
|
|
|
"flex-shrink": "0" |
|
|
|
|
|
|
|
}); |
|
|
|
if (o.columnSize[i] > 0) { |
|
|
|
if (o.columnSize[i] > 0) { |
|
|
|
w.element.width(o.columnSize[i]); |
|
|
|
w.element.width(o.columnSize[i]); |
|
|
|
} |
|
|
|
} |
|
|
@ -34298,7 +34305,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { |
|
|
|
_addElement: function (i, item) { |
|
|
|
_addElement: function (i, item) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments); |
|
|
|
var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments); |
|
|
|
w.element.css({position: "relative"}); |
|
|
|
w.element.css({ |
|
|
|
|
|
|
|
position: "relative", |
|
|
|
|
|
|
|
"flex-shrink": "0" |
|
|
|
|
|
|
|
}); |
|
|
|
if (o.rowSize[i] > 0) { |
|
|
|
if (o.rowSize[i] > 0) { |
|
|
|
w.element.height(o.rowSize[i]); |
|
|
|
w.element.height(o.rowSize[i]); |
|
|
|
} |
|
|
|
} |
|
|
@ -41413,6 +41423,12 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
if ((this.element.find(e.target).length > 0) |
|
|
|
if ((this.element.find(e.target).length > 0) |
|
|
|
|| (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" || BI.Widget._renderEngine.createElement(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的公式弹框需要特殊处理下
|
|
|
|
|
|
|
|
var directions = this.options.direction.split(","); |
|
|
|
|
|
|
|
if (BI.contains(directions, "innerLeft") || BI.contains(directions, "innerRight")) { |
|
|
|
|
|
|
|
// popup可以出现的trigger内部的combo,滚动时不需要消失,而是调整位置
|
|
|
|
|
|
|
|
this.adjustWidth(); |
|
|
|
|
|
|
|
this.adjustHeight(); |
|
|
|
|
|
|
|
} |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
@ -43731,7 +43747,7 @@ BI.GridView = BI.inherit(BI.Widget, { |
|
|
|
_columnIndex: columnIndex, |
|
|
|
_columnIndex: columnIndex, |
|
|
|
_left: columnDatum.offset + horizontalOffsetAdjustment, |
|
|
|
_left: columnDatum.offset + horizontalOffsetAdjustment, |
|
|
|
_top: rowDatum.offset + verticalOffsetAdjustment |
|
|
|
_top: rowDatum.offset + verticalOffsetAdjustment |
|
|
|
})); |
|
|
|
}), this); |
|
|
|
renderedCells.push({ |
|
|
|
renderedCells.push({ |
|
|
|
el: child, |
|
|
|
el: child, |
|
|
|
left: columnDatum.offset + horizontalOffsetAdjustment, |
|
|
|
left: columnDatum.offset + horizontalOffsetAdjustment, |
|
|
@ -43777,7 +43793,8 @@ BI.GridView = BI.inherit(BI.Widget, { |
|
|
|
BI.each(addSet, function (index, key) { |
|
|
|
BI.each(addSet, function (index, key) { |
|
|
|
addedItems.push(renderedCells[key[2]]); |
|
|
|
addedItems.push(renderedCells[key[2]]); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.container.addItems(addedItems); |
|
|
|
// 与listview一样, 给上下文
|
|
|
|
|
|
|
|
this.container.addItems(addedItems, this); |
|
|
|
// 拦截父子级关系
|
|
|
|
// 拦截父子级关系
|
|
|
|
this.container._children = renderedWidgets; |
|
|
|
this.container._children = renderedWidgets; |
|
|
|
this.container.attr("items", renderedCells); |
|
|
|
this.container.attr("items", renderedCells); |
|
|
@ -43945,7 +43962,8 @@ BI.GridView = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; |
|
|
|
BI.GridView.EVENT_SCROLL = "EVENT_SCROLL"; |
|
|
|
BI.shortcut("bi.grid_view", BI.GridView);/** |
|
|
|
BI.shortcut("bi.grid_view", BI.GridView); |
|
|
|
|
|
|
|
/** |
|
|
|
* Popover弹出层, |
|
|
|
* Popover弹出层, |
|
|
|
* @class BI.Popover |
|
|
|
* @class BI.Popover |
|
|
|
* @extends BI.Widget |
|
|
|
* @extends BI.Widget |
|
|
@ -44770,7 +44788,7 @@ BI.VirtualList = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_clearChildren: function () { |
|
|
|
_clearChildren: function () { |
|
|
|
BI.each(this.container._children, function (i, cell) { |
|
|
|
BI.each(this.container._children, function (i, cell) { |
|
|
|
cell && cell.el._destroy(); |
|
|
|
cell && cell._destroy(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.container._children = {}; |
|
|
|
this.container._children = {}; |
|
|
|
this.container.attr("items", []); |
|
|
|
this.container.attr("items", []); |
|
|
@ -44781,6 +44799,9 @@ BI.VirtualList = BI.inherit(BI.Widget, { |
|
|
|
this._clearChildren(); |
|
|
|
this._clearChildren(); |
|
|
|
this.cache = {}; |
|
|
|
this.cache = {}; |
|
|
|
this.options.scrollTop = 0; |
|
|
|
this.options.scrollTop = 0; |
|
|
|
|
|
|
|
// 依赖于cache的占位元素也要初始化
|
|
|
|
|
|
|
|
this.topBlank.setHeight(0); |
|
|
|
|
|
|
|
this.bottomBlank.setHeight(0); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
@ -47427,6 +47448,7 @@ BI.Iframe = BI.inherit(BI.Single, { |
|
|
|
tagName: "iframe", |
|
|
|
tagName: "iframe", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-iframe", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-iframe", |
|
|
|
src: "", |
|
|
|
src: "", |
|
|
|
|
|
|
|
name: "", |
|
|
|
attributes: {}, |
|
|
|
attributes: {}, |
|
|
|
width: "100%", |
|
|
|
width: "100%", |
|
|
|
height: "100%" |
|
|
|
height: "100%" |
|
|
@ -47437,6 +47459,7 @@ BI.Iframe = BI.inherit(BI.Single, { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
o.attributes.frameborder = "0"; |
|
|
|
o.attributes.frameborder = "0"; |
|
|
|
o.attributes.src = o.src; |
|
|
|
o.attributes.src = o.src; |
|
|
|
|
|
|
|
o.attributes.name = o.name; |
|
|
|
BI.Iframe.superclass._init.apply(this, arguments); |
|
|
|
BI.Iframe.superclass._init.apply(this, arguments); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -47456,14 +47479,6 @@ BI.Iframe = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
|
|
getName: function () { |
|
|
|
getName: function () { |
|
|
|
return this.options.name; |
|
|
|
return this.options.name; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getWidth: function () { |
|
|
|
|
|
|
|
return this.options.width; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getHeight: function () { |
|
|
|
|
|
|
|
return this.options.height; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -48260,7 +48275,7 @@ BI.Input = BI.inherit(BI.Single, { |
|
|
|
this.element |
|
|
|
this.element |
|
|
|
.keydown(function (e) { |
|
|
|
.keydown(function (e) { |
|
|
|
inputEventValid = false; |
|
|
|
inputEventValid = false; |
|
|
|
ctrlKey = e.ctrlKey; |
|
|
|
ctrlKey = e.ctrlKey || e.metaKey; // mac的cmd支持一下
|
|
|
|
keyCode = e.keyCode; |
|
|
|
keyCode = e.keyCode; |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments); |
|
|
|
self.fireEvent(BI.Input.EVENT_QUICK_DOWN, arguments); |
|
|
|
}) |
|
|
|
}) |
|
|
@ -55283,6 +55298,7 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.each(Ws, function (i, w) { |
|
|
|
BI.each(Ws, function (i, w) { |
|
|
|
w.on(BI.TextEditor.EVENT_CHANGE, function () { |
|
|
|
w.on(BI.TextEditor.EVENT_CHANGE, function () { |
|
|
|
|
|
|
|
self._checkEditors(); |
|
|
|
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { |
|
|
|
if (self.R.isValid() && self.G.isValid() && self.B.isValid()) { |
|
|
|
self.colorShow.element.css("background-color", self.getValue()); |
|
|
|
self.colorShow.element.css("background-color", self.getValue()); |
|
|
|
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.SimpleColorPickerEditor.EVENT_CHANGE); |
|
|
@ -55323,6 +55339,18 @@ BI.SimpleColorPickerEditor = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_checkEditors: function () { |
|
|
|
|
|
|
|
if(BI.isEmptyString(this.R.getValue())) { |
|
|
|
|
|
|
|
this.R.setValue(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(BI.isEmptyString(this.G.getValue())) { |
|
|
|
|
|
|
|
this.G.setValue(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(BI.isEmptyString(this.B.getValue())) { |
|
|
|
|
|
|
|
this.B.setValue(0); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (color) { |
|
|
|
setValue: function (color) { |
|
|
|
this.colorShow.element.css({"background-color": color}); |
|
|
|
this.colorShow.element.css({"background-color": color}); |
|
|
|
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); |
|
|
|
var json = BI.DOM.rgb2json(BI.DOM.hex2rgb(color)); |
|
|
@ -63556,7 +63584,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, { |
|
|
|
}), |
|
|
|
}), |
|
|
|
popup: { |
|
|
|
popup: { |
|
|
|
el: this.popupview, |
|
|
|
el: this.popupview, |
|
|
|
stopPropagation: true, |
|
|
|
stopPropagation: o.stopPropagation, |
|
|
|
maxHeight: 1000, |
|
|
|
maxHeight: 1000, |
|
|
|
minWidth: 140 |
|
|
|
minWidth: 140 |
|
|
|
} |
|
|
|
} |
|
|
@ -68111,7 +68139,7 @@ BI.DownListCombo = BI.inherit(BI.Widget, { |
|
|
|
}), |
|
|
|
}), |
|
|
|
popup: { |
|
|
|
popup: { |
|
|
|
el: this.popupview, |
|
|
|
el: this.popupview, |
|
|
|
stopPropagation: true, |
|
|
|
stopPropagation: o.stopPropagation, |
|
|
|
maxHeight: 1000 |
|
|
|
maxHeight: 1000 |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -68691,7 +68719,7 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { |
|
|
|
if (!BI.isKey(node.id)) { |
|
|
|
if (!BI.isKey(node.id)) { |
|
|
|
node.id = BI.UUID(); |
|
|
|
node.id = BI.UUID(); |
|
|
|
} |
|
|
|
} |
|
|
|
node.keyword = keyword; |
|
|
|
node.keyword = node.keyword || keyword; |
|
|
|
extend.pNode = pNode; |
|
|
|
extend.pNode = pNode; |
|
|
|
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) { |
|
|
|
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) { |
|
|
|
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; |
|
|
|
extend.type = "bi.multilayer_select_tree_mid_plus_group_node"; |
|
|
@ -69454,7 +69482,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.MultiLayerSingleTreeCombo.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-multilayer-singletree-combo", |
|
|
|
baseCls: "bi-multilayer-single-tree-combo", |
|
|
|
isDefaultInit: false, |
|
|
|
isDefaultInit: false, |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
text: "", |
|
|
|
text: "", |
|
|
@ -69665,7 +69693,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, { |
|
|
|
if (!BI.isKey(node.id)) { |
|
|
|
if (!BI.isKey(node.id)) { |
|
|
|
node.id = BI.UUID(); |
|
|
|
node.id = BI.UUID(); |
|
|
|
} |
|
|
|
} |
|
|
|
node.keyword = keyword; |
|
|
|
node.keyword = node.keyword || keyword; |
|
|
|
extend.pNode = pNode; |
|
|
|
extend.pNode = pNode; |
|
|
|
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) { |
|
|
|
if (node.isParent === true || node.parent === true || BI.isNotEmptyArray(node.children)) { |
|
|
|
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; |
|
|
|
extend.type = "bi.multilayer_single_tree_mid_plus_group_node"; |
|
|
|