Browse Source

Merge pull request #957 in VISUAL/fineui from ~WINDY/fineui:master to master

* commit '9ca5038918ebe61fd0591ac391e2517c2f8315f1':
  BI-46489 fix: encrypt修改
  update
  update
  BI-46525 fix: value和异步加载问题
  同步與異步的問題
es6
guy 5 years ago
parent
commit
efc447576c
  1. 102
      dist/2.0/fineui.ie.js
  2. 102
      dist/2.0/fineui.js
  3. 102
      dist/bundle.ie.js
  4. 102
      dist/bundle.js
  5. 102
      dist/fineui.ie.js
  6. 102
      dist/fineui.js
  7. 102
      dist/fineui_without_jquery_polyfill.js
  8. 102
      dist/widget.js
  9. 110
      src/core/base.js
  10. 3
      src/core/utils/aes.js
  11. 2
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  12. 28
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  13. 22
      src/widget/multilayerselecttree/multilayerselecttree.popup.js
  14. 2
      src/widget/multilayersingletree/multilayersingletree.combo.js
  15. 26
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  16. 22
      src/widget/multilayersingletree/multilayersingletree.popup.js

102
dist/2.0/fineui.ie.js vendored

@ -68613,7 +68613,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -68692,7 +68692,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -68706,9 +68706,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -68776,16 +68781,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -68799,9 +68812,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -68814,16 +68828,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -68847,7 +68867,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -68869,18 +68889,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -68902,12 +68911,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -68920,7 +68923,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69542,7 +69544,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69621,7 +69623,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -69638,6 +69640,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69705,15 +69709,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69730,6 +69742,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -69742,19 +69755,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69779,7 +69795,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69800,18 +69816,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69833,12 +69838,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69851,7 +69850,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/2.0/fineui.js vendored

@ -69017,7 +69017,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69096,7 +69096,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -69110,9 +69110,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69180,16 +69185,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69203,9 +69216,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -69218,16 +69232,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69251,7 +69271,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69273,18 +69293,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69306,12 +69315,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69324,7 +69327,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69946,7 +69948,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70025,7 +70027,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -70042,6 +70044,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -70109,15 +70113,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -70134,6 +70146,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -70146,19 +70159,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -70183,7 +70199,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -70204,18 +70220,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -70237,12 +70242,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -70255,7 +70254,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/bundle.ie.js vendored

@ -68613,7 +68613,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -68692,7 +68692,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -68706,9 +68706,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -68776,16 +68781,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -68799,9 +68812,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -68814,16 +68828,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -68847,7 +68867,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -68869,18 +68889,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -68902,12 +68911,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -68920,7 +68923,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69542,7 +69544,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69621,7 +69623,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -69638,6 +69640,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69705,15 +69709,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69730,6 +69742,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -69742,19 +69755,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69779,7 +69795,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69800,18 +69816,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69833,12 +69838,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69851,7 +69850,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/bundle.js vendored

@ -69017,7 +69017,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69096,7 +69096,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -69110,9 +69110,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69180,16 +69185,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69203,9 +69216,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -69218,16 +69232,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69251,7 +69271,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69273,18 +69293,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69306,12 +69315,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69324,7 +69327,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69946,7 +69948,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70025,7 +70027,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -70042,6 +70044,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -70109,15 +70113,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -70134,6 +70146,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -70146,19 +70159,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -70183,7 +70199,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -70204,18 +70220,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -70237,12 +70242,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -70255,7 +70254,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/fineui.ie.js vendored

@ -68858,7 +68858,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -68937,7 +68937,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -68951,9 +68951,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69021,16 +69026,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69044,9 +69057,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -69059,16 +69073,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69092,7 +69112,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69114,18 +69134,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69147,12 +69156,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69165,7 +69168,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69787,7 +69789,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69866,7 +69868,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -69883,6 +69885,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69950,15 +69954,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69975,6 +69987,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -69987,19 +70000,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -70024,7 +70040,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -70045,18 +70061,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -70078,12 +70083,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -70096,7 +70095,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/fineui.js vendored

@ -69262,7 +69262,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69341,7 +69341,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -69355,9 +69355,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -69425,16 +69430,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -69448,9 +69461,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -69463,16 +69477,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -69496,7 +69516,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -69518,18 +69538,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -69551,12 +69560,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -69569,7 +69572,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -70191,7 +70193,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70270,7 +70272,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -70287,6 +70289,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -70354,15 +70358,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -70379,6 +70391,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -70391,19 +70404,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -70428,7 +70444,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -70449,18 +70465,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -70482,12 +70487,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -70500,7 +70499,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/fineui_without_jquery_polyfill.js vendored

@ -51601,7 +51601,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -51680,7 +51680,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -51694,9 +51694,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -51764,16 +51769,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -51787,9 +51800,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -51802,16 +51816,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -51835,7 +51855,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -51857,18 +51877,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -51890,12 +51899,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -51908,7 +51911,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -52530,7 +52532,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -52609,7 +52611,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -52626,6 +52628,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -52693,15 +52697,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -52718,6 +52730,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -52730,19 +52743,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -52767,7 +52783,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -52788,18 +52804,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -52821,12 +52826,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -52839,7 +52838,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/widget.js vendored

@ -6691,7 +6691,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -6770,7 +6770,7 @@ BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo);/**
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -6784,9 +6784,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -6854,16 +6859,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -6877,9 +6890,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -6892,16 +6906,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -6925,7 +6945,7 @@ BI.shortcut("bi.multilayer_select_level_tree", BI.MultiLayerSelectLevelTree);/**
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -6947,18 +6967,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -6980,12 +6989,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -6998,7 +7001,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -7620,7 +7622,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -7699,7 +7701,7 @@ BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo);/**
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -7716,6 +7718,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -7783,15 +7787,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -7808,6 +7820,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -7820,19 +7833,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {
@ -7857,7 +7873,7 @@ BI.shortcut("bi.multilayer_single_level_tree", BI.MultiLayerSingleLevelTree);
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -7878,18 +7894,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -7911,12 +7916,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -7929,7 +7928,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

110
src/core/base.js

@ -906,112 +906,14 @@ if (!_global.BI) {
},
/**
* 对字符串进行加密 {@link #decrypt}
* @static
* @param str 原始字符<EFBFBD>?
* @param keyt 密钥
* @returns {String} 加密后的字符<EFBFBD>?
*/
encrypt: function (str, keyt) {
if (str == "") {
return "";
}
str = escape(str);
if (!keyt || keyt == "") {
keyt = "655";
}
keyt = escape(keyt);
if (keyt == null || keyt.length <= 0) {
alert("Please enter a password with which to encrypt the message.");
return null;
}
var prand = "";
for (var i = 0; i < keyt.length; i++) {
prand += keyt.charCodeAt(i).toString();
}
var sPos = Math.floor(prand.length / 5);
var mult = parseInt(prand.charAt(sPos) + prand.charAt(sPos * 2) + prand.charAt(sPos * 3) + prand.charAt(sPos * 4) + prand.charAt(sPos * 5));
var incr = Math.ceil(keyt.length / 2);
var modu = Math.pow(2, 31) - 1;
if (mult < 2) {
alert("Algorithm cannot find a suitable hash. Please choose a different password. \nPossible considerations are to choose a more complex or longer password.");
return null;
}
// var salt = Math.round(Math.random() * 1000000000) % 100000000;
var salt = 101;
prand += salt;
while (prand.length > 10) {
prand = (parseInt(prand.substring(0, 10)) + parseInt(prand.substring(10, prand.length), 10)).toString();
}
prand = (mult * prand + incr) % modu;
var enc_chr = "";
var enc_str = "";
for (var i = 0; i < str.length; i++) {
enc_chr = parseInt(str.charCodeAt(i) ^ Math.floor((prand / modu) * 255));
if (enc_chr < 16) {
enc_str += "0" + enc_chr.toString(16);
} else {
enc_str += enc_chr.toString(16);
}
prand = (mult * prand + incr) % modu;
}
salt = salt.toString(16);
while (salt.length < 8) {
salt = "0" + salt;
}
enc_str += salt;
return enc_str;
},
/**
* 对加密后的字符串解密 {@link #encrypt}
* @static
* @param str 加密过的字符<EFBFBD>?
* @param keyt 密钥
* @returns {String} 解密后的字符<EFBFBD>?
* 通用加密方法
*/
decrypt: function (str, keyt) {
if (str == "") {
return "";
encrypt: function (type, text, key) {
switch (type) {
case BI.CRYPT_TYPE.AES:
default:
return BI.aesEncrypt(text, key);
}
if (!keyt || keyt == "") {
keyt = "655";
}
keyt = escape(keyt);
if (str == null || str.length < 8) {
return;
}
if (keyt == null || keyt.length <= 0) {
return;
}
var prand = "";
for (var i = 0; i < keyt.length; i++) {
prand += keyt.charCodeAt(i).toString();
}
var sPos = Math.floor(prand.length / 5);
var tempmult = prand.charAt(sPos) + prand.charAt(sPos * 2) + prand.charAt(sPos * 3) + prand.charAt(sPos * 4);
if (sPos * 5 < prand.length) {
tempmult += prand.charAt(sPos * 5);
}
var mult = parseInt(tempmult);
var incr = Math.round(keyt.length / 2);
var modu = Math.pow(2, 31) - 1;
var salt = parseInt(str.substring(str.length - 8, str.length), 16);
str = str.substring(0, str.length - 8);
prand += salt;
while (prand.length > 10) {
prand = (parseInt(prand.substring(0, 10), 10) + parseInt(prand.substring(10, prand.length), 10)).toString();
}
prand = (mult * prand + incr) % modu;
var enc_chr = "";
var enc_str = "";
for (var i = 0; i < str.length; i += 2) {
enc_chr = parseInt(parseInt(str.substring(i, i + 2), 16) ^ Math.floor((prand / modu) * 255));
enc_str += String.fromCharCode(enc_chr);
prand = (mult * prand + incr) % modu;
}
return unescape(enc_str);
},
/**

3
src/core/utils/aes.js

@ -8,6 +8,9 @@
/**
* CryptoJS core components.
*/
BI.CRYPT_TYPE = BI.CRYPT_TYPE || {};
BI.CRYPT_TYPE.AES = "aes";
var CryptoJS = CryptoJS || (function (Math, undefined) {
/**
* CryptoJS namespace.

2
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -85,7 +85,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},

28
src/widget/multilayerselecttree/multilayerselecttree.leveltree.js

@ -4,7 +4,7 @@
* @class BI.MultiLayerSelectLevelTree
* @extends BI.Select
*/
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSelectLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-select-level-tree",
@ -18,9 +18,14 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
},
_init: function () {
var o = this.options;
BI.MultiLayerSelectLevelTree.superclass._init.apply(this, arguments);
this.storeValue = o.value;
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -88,16 +93,24 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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,
el: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: o.itemsCreator !== BI.emptyFn,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -111,9 +124,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);
if (type === BI.Events.CLICK) {
self.setValue(value);
self.fireEvent(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, arguments);
}
});
@ -126,16 +140,22 @@ BI.MultiLayerSelectLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.uniq(this.tree.getValue());
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {

22
src/widget/multilayerselecttree/multilayerselecttree.popup.js

@ -5,7 +5,7 @@
* @extends BI.Pane
*/
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSelectTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -27,18 +27,7 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_select_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -60,12 +49,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSelectLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSelectTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSelectTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -78,7 +61,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

2
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -88,7 +88,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},

26
src/widget/multilayersingletree/multilayersingletree.leveltree.js

@ -4,7 +4,7 @@
* @class BI.MultiLayerSingleLevelTree
* @extends BI.Single
*/
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree = BI.inherit(BI.Pane, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleLevelTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multilayer-single-level-tree",
@ -21,6 +21,8 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
BI.MultiLayerSingleLevelTree.superclass._init.apply(this, arguments);
this.initTree(this.options.items);
this.check();
},
_formatItems: function (nodes, layer, pNode) {
@ -88,15 +90,23 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
items: this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0),
value: o.value,
itemsCreator: function (op, callback) {
(op.times === 1 && !op.node) && BI.nextTick(function () {
self.loading();
});
o.itemsCreator(op, function (ob) {
hasNext = ob.hasNext;
self._populate(ob.items);
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: {
type: "bi.loader",
isDefaultInit: true,
isDefaultInit: false,
chooseType: o.chooseType,
el: {
type: "bi.button_tree",
@ -113,6 +123,7 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
this.tree.on(BI.Controller.EVENT_CHANGE, function (type, v) {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
if (type === BI.Events.CLICK) {
self.setValue(v);
self.fireEvent(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, v);
}
});
@ -125,19 +136,22 @@ BI.MultiLayerSingleLevelTree = BI.inherit(BI.Widget, {
});
},
_populate: function () {
BI.MultiLayerSelectLevelTree.superclass.populate.apply(this, arguments);
},
populate: function (nodes) {
this._populate(nodes);
BI.isNull(nodes) ? this.tree.populate() : this.tree.populate(this._formatItems(BI.Tree.transformToTreeFormat(nodes), 0));
},
setValue: function (v) {
this.storeValue = v;
this.tree.setValue(v);
},
getValue: function () {
return BI.filter(BI.uniq(this.tree.getValue()), function (idx, value) {
return BI.isNotNull(value);
});
return BI.isArray(this.storeValue) ? this.storeValue : [this.storeValue];
},
getAllLeaves: function () {

22
src/widget/multilayersingletree/multilayersingletree.popup.js

@ -5,7 +5,7 @@
* @extends BI.Pane
*/
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
BI.MultiLayerSingleTreePopup = BI.inherit(BI.Widget, {
_defaultConfig: function () {
return BI.extend(BI.MultiLayerSingleTreePopup.superclass._defaultConfig.apply(this, arguments), {
@ -26,18 +26,7 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
type: "bi.multilayer_single_level_tree",
isDefaultInit: o.isDefaultInit,
items: o.items,
itemsCreator: function (op, callback) {
(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();
});
});
},
itemsCreator: o.itemsCreator,
keywordGetter: o.keywordGetter,
value: o.value,
scrollable: null
@ -59,12 +48,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
this.tree.on(BI.MultiLayerSingleLevelTree.EVENT_CHANGE, function () {
self.fireEvent(BI.MultiLayerSingleTreePopup.EVENT_CHANGE);
});
this.check();
},
_populate: function() {
BI.MultiLayerSingleTreePopup.superclass.populate.apply(this, arguments);
},
getValue: function () {
@ -77,7 +60,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

Loading…
Cancel
Save