0
1
Fork 0
hedera-web-mindshore/js/htk/columns/radio/index.js

33 lines
558 B
JavaScript
Raw Normal View History

2022-06-06 08:53:59 +00:00
module.exports = new Class({
Extends: Htk.Column
,Tag: 'htk-column-radio'
,Properties: {
param:{
type: Vn.Param
2022-11-16 01:46:44 +00:00
,set(x) {
2022-06-06 08:53:59 +00:00
this.radioGroup.master = x;
}
}
}
2022-11-16 01:46:44 +00:00
,initialize(props) {
2022-06-06 08:53:59 +00:00
this._cssClass = 'cell-radio';
this.radioGroup = new Htk.RadioGroup(this.doc);
2022-06-06 16:02:17 +00:00
Htk.Column.prototype.initialize.call(this, props);
2022-06-06 08:53:59 +00:00
}
2022-11-16 01:46:44 +00:00
,render(tr) {
2022-06-06 16:02:17 +00:00
var td = Htk.Column.prototype.render.call(this, tr);
2022-06-06 08:53:59 +00:00
var radio = this.radioGroup.createButton(this.value);
td.appendChild(radio);
return td;
}
2022-11-16 01:46:44 +00:00
,clear() {
2022-06-06 08:53:59 +00:00
this.radioGroup.clear();
}
});