windy 5 years ago
parent
commit
d63739c8c5
  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. 9
      src/widget/multilayerselecttree/multilayerselecttree.combo.js
  10. 28
      src/widget/multilayerselecttree/multilayerselecttree.leveltree.js
  11. 22
      src/widget/multilayerselecttree/multilayerselecttree.popup.js
  12. 9
      src/widget/multilayersingletree/multilayersingletree.combo.js
  13. 24
      src/widget/multilayersingletree/multilayersingletree.leveltree.js
  14. 22
      src/widget/multilayersingletree/multilayersingletree.popup.js

102
dist/2.0/fineui.ie.js vendored

@ -68927,7 +68927,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69006,7 +69006,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",
@ -69020,9 +69020,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) {
@ -69090,16 +69095,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",
@ -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);
if (type === BI.Events.CLICK) {
self.setValue(value);
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) {
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 () {
@ -69161,7 +69181,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), {
@ -69183,18 +69203,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
@ -69216,12 +69225,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 () {
@ -69234,7 +69237,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69856,7 +69858,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69935,7 +69937,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",
@ -69952,6 +69954,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) {
@ -70019,15 +70023,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",
@ -70044,6 +70056,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);
}
});
@ -70056,19 +70069,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 () {
@ -70093,7 +70109,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), {
@ -70114,18 +70130,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
@ -70147,12 +70152,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 () {
@ -70165,7 +70164,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/2.0/fineui.js vendored

@ -69331,7 +69331,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69410,7 +69410,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",
@ -69424,9 +69424,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) {
@ -69494,16 +69499,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",
@ -69517,9 +69530,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);
}
});
@ -69532,16 +69546,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 () {
@ -69565,7 +69585,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), {
@ -69587,18 +69607,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
@ -69620,12 +69629,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 () {
@ -69638,7 +69641,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -70260,7 +70262,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70339,7 +70341,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",
@ -70356,6 +70358,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) {
@ -70423,15 +70427,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",
@ -70448,6 +70460,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);
}
});
@ -70460,19 +70473,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 () {
@ -70497,7 +70513,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), {
@ -70518,18 +70534,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
@ -70551,12 +70556,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 () {
@ -70569,7 +70568,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/bundle.ie.js vendored

@ -68927,7 +68927,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69006,7 +69006,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",
@ -69020,9 +69020,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) {
@ -69090,16 +69095,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",
@ -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);
if (type === BI.Events.CLICK) {
self.setValue(value);
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) {
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 () {
@ -69161,7 +69181,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), {
@ -69183,18 +69203,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
@ -69216,12 +69225,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 () {
@ -69234,7 +69237,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -69856,7 +69858,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69935,7 +69937,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",
@ -69952,6 +69954,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) {
@ -70019,15 +70023,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",
@ -70044,6 +70056,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);
}
});
@ -70056,19 +70069,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 () {
@ -70093,7 +70109,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), {
@ -70114,18 +70130,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
@ -70147,12 +70152,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 () {
@ -70165,7 +70164,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/bundle.js vendored

@ -69331,7 +69331,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69410,7 +69410,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",
@ -69424,9 +69424,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) {
@ -69494,16 +69499,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",
@ -69517,9 +69530,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);
}
});
@ -69532,16 +69546,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 () {
@ -69565,7 +69585,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), {
@ -69587,18 +69607,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
@ -69620,12 +69629,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 () {
@ -69638,7 +69641,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -70260,7 +70262,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70339,7 +70341,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",
@ -70356,6 +70358,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) {
@ -70423,15 +70427,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",
@ -70448,6 +70460,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);
}
});
@ -70460,19 +70473,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 () {
@ -70497,7 +70513,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), {
@ -70518,18 +70534,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
@ -70551,12 +70556,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 () {
@ -70569,7 +70568,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/fineui.ie.js vendored

@ -69172,7 +69172,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69251,7 +69251,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",
@ -69265,9 +69265,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) {
@ -69335,16 +69340,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",
@ -69358,9 +69371,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);
}
});
@ -69373,16 +69387,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 () {
@ -69406,7 +69426,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), {
@ -69428,18 +69448,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
@ -69461,12 +69470,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 () {
@ -69479,7 +69482,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -70101,7 +70103,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70180,7 +70182,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",
@ -70197,6 +70199,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) {
@ -70264,15 +70268,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",
@ -70289,6 +70301,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);
}
});
@ -70301,19 +70314,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 () {
@ -70338,7 +70354,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), {
@ -70359,18 +70375,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
@ -70392,12 +70397,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 () {
@ -70410,7 +70409,6 @@ BI.MultiLayerSingleTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});

102
dist/fineui.js vendored

@ -69576,7 +69576,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -69655,7 +69655,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",
@ -69669,9 +69669,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) {
@ -69739,16 +69744,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",
@ -69762,9 +69775,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);
}
});
@ -69777,16 +69791,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 () {
@ -69810,7 +69830,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), {
@ -69832,18 +69852,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
@ -69865,12 +69874,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 () {
@ -69883,7 +69886,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -70505,7 +70507,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -70584,7 +70586,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",
@ -70601,6 +70603,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) {
@ -70668,15 +70672,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",
@ -70693,6 +70705,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);
}
});
@ -70705,19 +70718,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 () {
@ -70742,7 +70758,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), {
@ -70763,18 +70779,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
@ -70796,12 +70801,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 () {
@ -70814,7 +70813,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

@ -51915,7 +51915,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -51994,7 +51994,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",
@ -52008,9 +52008,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) {
@ -52078,16 +52083,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",
@ -52101,9 +52114,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);
}
});
@ -52116,16 +52130,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 () {
@ -52149,7 +52169,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), {
@ -52171,18 +52191,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
@ -52204,12 +52213,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 () {
@ -52222,7 +52225,6 @@ BI.MultiLayerSelectTreePopup = BI.inherit(BI.Pane, {
},
populate: function (items) {
this._populate(items);
this.tree.populate(items);
}
});
@ -52844,7 +52846,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
}]
},
value: o.value,
minHeight: 400
maxHeight: 400
}
};
},
@ -52923,7 +52925,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",
@ -52940,6 +52942,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) {
@ -53007,15 +53011,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",
@ -53032,6 +53044,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);
}
});
@ -53044,19 +53057,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 () {
@ -53081,7 +53097,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), {
@ -53102,18 +53118,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
@ -53135,12 +53140,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 () {
@ -53153,7 +53152,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);
}
});

9
src/widget/multilayerselecttree/multilayerselecttree.combo.js

@ -23,7 +23,6 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
this.storeValue = BI.isArray(o.value) ? o.value[0] : o.value;
var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();
return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {
@ -140,23 +139,17 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
action: function () {
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.populate();
}
}]
});
},
setValue: function (v) {
v = BI.isArray(v) ? v : [v];
this.storeValue = v[0];
this.combo.setValue(v);
},
getValue: function () {
return [this.storeValue];
return this.combo.getValue();
},
populate: function (items) {

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: false,
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);
}
});

9
src/widget/multilayersingletree/multilayersingletree.combo.js

@ -26,7 +26,6 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
render: function () {
var self = this, o = this.options;
this.storeValue = BI.isArray(o.value) ? o.value[0] : o.value;
var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig();
return (!o.allowEdit && o.itemsCreator === BI.emptyFn) ? combo : {
@ -143,23 +142,17 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, {
action: function () {
self.trigger.stopEditing();
}
}, {
eventName: BI.Combo.EVENT_BEFORE_POPUPVIEW,
action: function () {
self.populate();
}
}]
});
},
setValue: function (v) {
v = BI.isArray(v) ? v : [v];
this.storeValue = v[0];
this.combo.setValue(v);
},
getValue: function () {
return [this.storeValue];
return this.combo.getValue();
},
populate: function (items) {

24
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,9 +90,17 @@ 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();
});
});
},
@ -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