2015-01-23 13:09:30 +00:00
|
|
|
|
2022-06-06 08:53:59 +00:00
|
|
|
module.exports = new Class({
|
2015-01-23 13:09:30 +00:00
|
|
|
Extends: Htk.Column
|
|
|
|
,Tag: 'htk-column-link'
|
2022-06-06 08:53:59 +00:00
|
|
|
,Properties: {
|
2015-01-23 13:09:30 +00:00
|
|
|
/**
|
|
|
|
* The link url.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
href:{
|
2015-01-23 13:09:30 +00:00
|
|
|
type: String
|
|
|
|
,value: null
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
* the target where the link is opened.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
target:{
|
2015-01-23 13:09:30 +00:00
|
|
|
type: String
|
|
|
|
,value: null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-16 01:46:44 +00:00
|
|
|
,render(tr) {
|
2022-05-26 06:08:31 +00:00
|
|
|
var link = this.createElement('a');
|
2015-01-23 13:09:30 +00:00
|
|
|
link.href = this.href;
|
2022-05-26 06:08:31 +00:00
|
|
|
link.appendChild(this.createTextNode(this.value));
|
2015-01-23 13:09:30 +00:00
|
|
|
|
|
|
|
if (this.target)
|
|
|
|
link.target = this.target;
|
|
|
|
|
2022-06-06 16:02:17 +00:00
|
|
|
var td = Htk.Column.prototype.render.call(this, tr);
|
2022-05-26 06:08:31 +00:00
|
|
|
td.appendChild(link);
|
2015-01-23 13:09:30 +00:00
|
|
|
return td;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|