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

36 lines
560 B
JavaScript

module.exports = new Class({
Extends: Htk.Column
,Tag: 'htk-column-link'
,Properties: {
/**
* The link url.
*/
href:{
type: String
,value: null
},
/**
* the target where the link is opened.
*/
target:{
type: String
,value: null
}
}
,render(tr) {
var link = this.createElement('a');
link.href = this.href;
link.appendChild(this.createTextNode(this.value));
if (this.target)
link.target = this.target;
var td = Htk.Column.prototype.render.call(this, tr);
td.appendChild(link);
return td;
}
});