fineui是帆软报表和BI产品线所使用的前端框架。
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.

81 lines
2.3 KiB

8 years ago
BI.MidTreeLeafItem = BI.inherit(BI.BasicButton, {
_defaultConfig: function () {
return BI.extend(BI.MidTreeLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-mid-tree-leaf-item bi-list-item-active",
logic: {
dynamic: false
},
id: "",
pId: "",
layer: 0,
6 years ago
height: 24
7 years ago
});
8 years ago
},
_init: function () {
BI.MidTreeLeafItem.superclass._init.apply(this, arguments);
var o = this.options;
8 years ago
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
text: o.text,
value: o.value,
py: o.py,
keyword: o.keyword
8 years ago
});
var type = BI.LogicFactory.createLogicTypeByDirection(BI.Direction.Left);
var items = BI.LogicFactory.createLogicItemsByDirection(BI.Direction.Left, ((o.layer === 0) ? "" : {
6 years ago
width: 12,
8 years ago
el: {
type: "bi.layout",
cls: (o.pNode && o.pNode.isLastNode) ? "" : "base-line-conn-background",
6 years ago
width: 12,
8 years ago
height: o.height
}
}), {
6 years ago
width: 24,
8 years ago
el: {
type: "bi.layout",
cls: "mid-line-conn-background",
6 years ago
width: 24,
8 years ago
height: o.height
}
}, {
el: this.text
});
BI.createWidget(BI.extend({
8 years ago
element: this
8 years ago
}, BI.LogicFactory.createLogic(type, BI.extend(o.logic, {
items: items
}))));
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doHighLight: function () {
this.text.doHighLight.apply(this.text, arguments);
},
unHighLight: function () {
this.text.unHighLight.apply(this.text, arguments);
},
getId: function () {
return this.options.id;
},
getPId: function () {
return this.options.pId;
}
});
8 years ago
BI.shortcut("bi.mid_tree_leaf_item", BI.MidTreeLeafItem);