2015-01-23 13:09:30 +00:00
|
|
|
|
2016-09-26 09:28:47 +00:00
|
|
|
module.exports = new Class
|
2015-01-23 13:09:30 +00:00
|
|
|
({
|
|
|
|
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: function (tr)
|
|
|
|
{
|
2016-10-16 14:16:08 +00:00
|
|
|
var link = this.createElement ('a');
|
2015-01-23 13:09:30 +00:00
|
|
|
link.href = this.href;
|
2016-10-16 14:16:08 +00:00
|
|
|
link.appendChild (this.createTextNode (this.value));
|
2015-01-23 13:09:30 +00:00
|
|
|
|
|
|
|
if (this.target)
|
|
|
|
link.target = this.target;
|
|
|
|
|
|
|
|
var td = this.parent (tr);
|
|
|
|
td.appendChild (link);
|
|
|
|
return td;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|