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.

45 lines
1.2 KiB

4 years ago
!(function () {
var Node = BI.inherit(BI.NodeButton, {
props: {
baseCls: "bi-list-item"
},
render: function () {
var self = this
return {
type: "bi.vertical_adapt",
items: [
{
el: {
type: "bi.label",
ref: function (_ref) {
self.icon = _ref
},
text: this.options.open ? "-" : "+",
height: 24,
width: 24,
},
lgap: this.options.layer * 24,
}, {
type: "bi.label",
textAlign: "left",
text: this.options.text
}
]
}
},
setOpened: function (b) {
Node.superclass.setOpened.apply(this, arguments);
this.icon.setText(b ? "-" : "+")
},
getValue: function () {
return this.options.id;
},
});
BI.shortcut("bi.example.single_custom_tree.node", Node);
}())