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-date'
|
|
|
|
,Properties:
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Format that applies to the value.
|
|
|
|
**/
|
|
|
|
format:
|
|
|
|
{
|
|
|
|
type: String
|
|
|
|
,set: function (x)
|
|
|
|
{
|
|
|
|
this._format = _(x);
|
|
|
|
}
|
|
|
|
,get: function ()
|
|
|
|
{
|
|
|
|
return this._format;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
,_format: _('%a, %e %b %Y')
|
2015-11-26 12:30:04 +00:00
|
|
|
|
|
|
|
,initialize: function (props)
|
|
|
|
{
|
|
|
|
this._cssClass = 'cell-date';
|
|
|
|
this.parent (props);
|
|
|
|
}
|
2015-01-23 13:09:30 +00:00
|
|
|
|
|
|
|
,render: function (tr)
|
|
|
|
{
|
|
|
|
var text = Vn.Date.strftime (this.value, this._format);
|
|
|
|
|
|
|
|
var td = this.parent (tr);
|
2016-10-16 14:16:08 +00:00
|
|
|
td.appendChild (this.createTextNode (text));
|
2015-01-23 13:09:30 +00:00
|
|
|
|
|
|
|
return td;
|
|
|
|
}
|
|
|
|
});
|