|
|
@ -68927,7 +68927,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { |
|
|
|
}] |
|
|
|
}] |
|
|
|
}, |
|
|
|
}, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
minHeight: 400 |
|
|
|
maxHeight: 400 |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -69006,7 +69006,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/** |
|
|
|
* @class BI.MultiLayerSelectLevelTree |
|
|
|
* @class BI.MultiLayerSelectLevelTree |
|
|
|
* @extends BI.Select |
|
|
|
* @extends BI.Select |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { |
|
|
|
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-multilayer-select-level-tree", |
|
|
|
baseCls: "bi-multilayer-select-level-tree", |
|
|
@ -69020,9 +69020,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
|
|
|
|
var o = this.options; |
|
|
|
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments); |
|
|
|
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.storeValue = o.value; |
|
|
|
|
|
|
|
|
|
|
|
this.initTree(this.options.items); |
|
|
|
this.initTree(this.options.items); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.check(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_formatItems: function (nodes, layer, pNode) { |
|
|
|
_formatItems: function (nodes, layer, pNode) { |
|
|
@ -69090,16 +69095,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), |
|
|
|
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
hasNext = ob.hasNext; |
|
|
|
hasNext = ob.hasNext; |
|
|
|
|
|
|
|
self._populate(ob.items); |
|
|
|
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node)); |
|
|
|
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node)); |
|
|
|
|
|
|
|
self.setValue(self.storeValue); |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loaded(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
|
|
|
|
|
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.loader", |
|
|
|
type: "bi.loader", |
|
|
|
isDefaultInit: true, |
|
|
|
isDefaultInit: o.itemsCreator !== BI.emptyFn, |
|
|
|
chooseType: o.chooseType, |
|
|
|
chooseType: o.chooseType, |
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.button_tree", |
|
|
|
type: "bi.button_tree", |
|
|
@ -69113,9 +69126,10 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.tree.on(BI.Controller.EVENT_CHANGE, function (type) { |
|
|
|
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, value) { |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
|
|
|
|
self.setValue(value); |
|
|
|
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -69128,16 +69142,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_populate: function () { |
|
|
|
|
|
|
|
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (nodes) { |
|
|
|
populate: function (nodes) { |
|
|
|
|
|
|
|
this._populate(nodes); |
|
|
|
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); |
|
|
|
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
|
|
|
|
this.storeValue = v; |
|
|
|
this.tree.setValue(v); |
|
|
|
this.tree.setValue(v); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
|
return BI.uniq(this.tree.getValue()); |
|
|
|
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getAllLeaves: function () { |
|
|
|
getAllLeaves: function () { |
|
|
@ -69161,7 +69181,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/** |
|
|
|
* @extends BI.Pane |
|
|
|
* @extends BI.Pane |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, { |
|
|
|
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), { |
|
|
@ -69183,18 +69203,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, { |
|
|
|
type: "bi.multilayer_select_level_tree", |
|
|
|
type: "bi.multilayer_select_level_tree", |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
items: o.items, |
|
|
|
items: o.items, |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: o.itemsCreator, |
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
|
|
|
|
self._populate(ob.items); |
|
|
|
|
|
|
|
callback(ob); |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loaded(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
keywordGetter: o.keywordGetter, |
|
|
|
keywordGetter: o.keywordGetter, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
scrollable: null |
|
|
|
scrollable: null |
|
|
@ -69216,12 +69225,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, { |
|
|
|
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () { |
|
|
|
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () { |
|
|
|
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.check(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_populate: function() { |
|
|
|
|
|
|
|
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
@ -69234,7 +69237,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
|
this._populate(items); |
|
|
|
|
|
|
|
this.tree.populate(items); |
|
|
|
this.tree.populate(items); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -69856,7 +69858,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { |
|
|
|
}] |
|
|
|
}] |
|
|
|
}, |
|
|
|
}, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
minHeight: 400 |
|
|
|
maxHeight: 400 |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -69935,7 +69937,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/** |
|
|
|
* @class BI.MultiLayerSingleLevelTree |
|
|
|
* @class BI.MultiLayerSingleLevelTree |
|
|
|
* @extends BI.Single |
|
|
|
* @extends BI.Single |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, { |
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
baseCls: "bi-multilayer-single-level-tree", |
|
|
|
baseCls: "bi-multilayer-single-level-tree", |
|
|
@ -69952,6 +69954,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments); |
|
|
|
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
|
|
this.initTree(this.options.items); |
|
|
|
this.initTree(this.options.items); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.check(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_formatItems: function (nodes, layer, pNode) { |
|
|
|
_formatItems: function (nodes, layer, pNode) { |
|
|
@ -70019,15 +70023,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), |
|
|
|
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0), |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
hasNext = ob.hasNext; |
|
|
|
hasNext = ob.hasNext; |
|
|
|
|
|
|
|
self._populate(ob.items); |
|
|
|
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node)); |
|
|
|
callback(self._formatItems(BI.Tree.transformToTreeFormat(ob.items), op.node ? op.node.layer + 1 : 0, op.node)); |
|
|
|
|
|
|
|
self.setValue(self.storeValue); |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loaded(); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.loader", |
|
|
|
type: "bi.loader", |
|
|
|
isDefaultInit: true, |
|
|
|
isDefaultInit: false, |
|
|
|
chooseType: o.chooseType, |
|
|
|
chooseType: o.chooseType, |
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.button_tree", |
|
|
|
type: "bi.button_tree", |
|
|
@ -70044,6 +70056,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) { |
|
|
|
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) { |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
if (type === BI.Events.CLICK) { |
|
|
|
|
|
|
|
self.setValue(v); |
|
|
|
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v); |
|
|
|
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -70056,19 +70069,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_populate: function () { |
|
|
|
|
|
|
|
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (nodes) { |
|
|
|
populate: function (nodes) { |
|
|
|
|
|
|
|
this._populate(nodes); |
|
|
|
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); |
|
|
|
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
|
|
|
|
this.storeValue = v; |
|
|
|
this.tree.setValue(v); |
|
|
|
this.tree.setValue(v); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
|
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) { |
|
|
|
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue]; |
|
|
|
return BI.isNotNull(value); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getAllLeaves: function () { |
|
|
|
getAllLeaves: function () { |
|
|
@ -70093,7 +70109,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree); |
|
|
|
* @extends BI.Pane |
|
|
|
* @extends BI.Pane |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, { |
|
|
|
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, { |
|
|
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
_defaultConfig: function () { |
|
|
|
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), { |
|
|
|
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), { |
|
|
@ -70114,18 +70130,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, { |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
isDefaultInit: o.isDefaultInit, |
|
|
|
items: o.items, |
|
|
|
items: o.items, |
|
|
|
itemsCreator: function (op, callback) { |
|
|
|
itemsCreator: o.itemsCreator, |
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loading(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
o.itemsCreator(op, function (ob) { |
|
|
|
|
|
|
|
self._populate(ob.items); |
|
|
|
|
|
|
|
callback(ob); |
|
|
|
|
|
|
|
(op.times === 1 && !op.node) && BI.nextTick(function () { |
|
|
|
|
|
|
|
self.loaded(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
keywordGetter: o.keywordGetter, |
|
|
|
keywordGetter: o.keywordGetter, |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
scrollable: null |
|
|
|
scrollable: null |
|
|
@ -70147,12 +70152,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, { |
|
|
|
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () { |
|
|
|
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () { |
|
|
|
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE); |
|
|
|
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.check(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_populate: function() { |
|
|
|
|
|
|
|
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValue: function () { |
|
|
|
getValue: function () { |
|
|
@ -70165,7 +70164,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
populate: function (items) { |
|
|
|
this._populate(items); |
|
|
|
|
|
|
|
this.tree.populate(items); |
|
|
|
this.tree.populate(items); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|