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

33 lines
501 B
JavaScript

module.exports = new Class({
Extends: Htk.Field
,Tag: 'htk-textarea'
,render() {
var node = this.createRoot('textarea');
node.addEventListener('change', this.changed.bind(this));
}
,changed() {
var value;
if (this.node.value == '')
value = null;
else
value = this.node.value;
this.valueChanged(value);
}
,setEditable(editable) {
this.node.readOnly = !editable;
}
,putValue(value) {
if (!value)
this.node.value = '';
else
this.node.value = value;
}
});