You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
8 years ago
|
/**
|
||
|
* Created by zcf on 2016/12/21.
|
||
|
*/
|
||
8 years ago
|
BI.MultiSelectTreePopup = BI.inherit(BI.Widget, {
|
||
|
_defaultConfig: function () {
|
||
|
return BI.extend(BI.MultiSelectTreePopup.superclass._defaultConfig.apply(this, arguments), {
|
||
8 years ago
|
baseCls: "bi-multi-select-tree-popup bi-border-left bi-border-right bi-border-bottom",
|
||
8 years ago
|
itemsCreator: BI.emptyFn
|
||
|
});
|
||
|
},
|
||
8 years ago
|
_init: function () {
|
||
|
BI.MultiSelectTreePopup.superclass._init.apply(this, arguments);
|
||
8 years ago
|
var self = this, o = this.options;
|
||
|
this.popup = BI.createWidget({
|
||
8 years ago
|
type: "bi.async_tree",
|
||
8 years ago
|
height: 400,
|
||
8 years ago
|
element: this,
|
||
8 years ago
|
itemsCreator: o.itemsCreator
|
||
|
});
|
||
|
this.popup.on(BI.TreeView.EVENT_AFTERINIT, function () {
|
||
8 years ago
|
self.fireEvent(BI.MultiSelectTreePopup.EVENT_AFTER_INIT)
|
||
8 years ago
|
});
|
||
|
this.popup.on(BI.TreeView.EVENT_CHANGE, function () {
|
||
8 years ago
|
self.fireEvent(BI.MultiSelectTreePopup.EVENT_CHANGE)
|
||
8 years ago
|
});
|
||
|
},
|
||
|
|
||
|
hasChecked: function () {
|
||
|
return this.popup.hasChecked();
|
||
|
},
|
||
|
|
||
|
getValue: function () {
|
||
|
return this.popup.getValue();
|
||
|
},
|
||
|
|
||
|
setValue: function (v) {
|
||
|
v || (v = {});
|
||
|
this.popup.setValue(v.value);
|
||
|
},
|
||
|
|
||
|
populate: function (config) {
|
||
|
this.popup.stroke(config);
|
||
|
}
|
||
|
|
||
|
});
|
||
8 years ago
|
BI.MultiSelectTreePopup.EVENT_AFTER_INIT = "BI.MultiSelectTreePopup.EVENT_AFTER_INIT";
|
||
|
BI.MultiSelectTreePopup.EVENT_CHANGE = "BI.MultiSelectTreePopup.EVENT_CHANGE";
|
||
|
BI.shortcut("bi.multi_select_tree_popup", BI.MultiSelectTreePopup);
|