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.

69 lines
1.7 KiB

8 years ago
/**
* 树叶子节点
* Created by GUY on 2015/9/6.
* @class BI.TreeTextLeafItem
* @extends BI.BasicButton
*/
BI.TreeTextLeafItem = BI.inherit(BI.BasicButton, {
7 years ago
_defaultConfig: function () {
8 years ago
return BI.extend(BI.TreeTextLeafItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-tree-text-leaf-item bi-list-item-active",
id: "",
pId: "",
height: 24,
8 years ago
hgap: 0,
lgap: 0,
rgap: 0
7 years ago
});
8 years ago
},
7 years ago
_init: function () {
8 years ago
BI.TreeTextLeafItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
whiteSpace: "nowrap",
textHeight: o.height,
height: o.height,
hgap: o.hgap,
lgap: o.lgap,
rgap: o.hgap,
text: o.text,
value: o.value,
py: o.py
});
BI.createWidget({
type: "bi.htape",
8 years ago
element: this,
8 years ago
items: [{
el: this.text
}]
7 years ago
});
8 years ago
},
7 years ago
doRedMark: function () {
8 years ago
this.text.doRedMark.apply(this.text, arguments);
},
7 years ago
unRedMark: function () {
8 years ago
this.text.unRedMark.apply(this.text, arguments);
},
7 years ago
doHighLight: function () {
8 years ago
this.text.doHighLight.apply(this.text, arguments);
},
7 years ago
unHighLight: function () {
8 years ago
this.text.unHighLight.apply(this.text, arguments);
},
7 years ago
getId: function () {
8 years ago
return this.options.id;
},
7 years ago
getPId: function () {
8 years ago
return this.options.pId;
}
});
8 years ago
BI.shortcut("bi.tree_text_leaf_item", BI.TreeTextLeafItem);