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

27 lines
440 B
JavaScript

module.exports = new Class({
Extends: Htk.Field
,Tag: 'htk-check'
,render() {
var node = this.createRoot('input');
node.type = 'checkbox';
node.addEventListener('change', this.changed.bind(this));
}
,changed() {
this.valueChanged(this.node.checked);
}
,putValue(value) {
if (value)
this.node.checked = true;
else
this.node.checked = false;
}
,setEditable(editable) {
this.node.disabled = !editable;
}
});