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)
|
|
|
|
{
|
|
|
|
var link = document.createElement ('a');
|
|
|
|
link.href = this.href;
|
|
|
|
link.appendChild (document.createTextNode (this.value));
|
|
|
|
|
|
|
|
if (this.target)
|
|
|
|
link.target = this.target;
|
|
|
|
|
|
|
|
var td = this.parent (tr);
|
|
|
|
td.appendChild (link);
|
|
|
|
return td;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|