63 lines
934 B
JavaScript
63 lines
934 B
JavaScript
|
|
module.exports = new Class
|
|
({
|
|
Extends: Htk.Column
|
|
,Tag: 'htk-column-image'
|
|
,Properties:
|
|
{
|
|
/**
|
|
* The directory where the images are allocated.
|
|
*/
|
|
directory:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
/**
|
|
* The subdirectory where the images are allocated.
|
|
*/
|
|
subdir:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
/**
|
|
* Subdirectory where full images are allocated.
|
|
*/
|
|
fullDir:
|
|
{
|
|
type: String
|
|
,value: null
|
|
},
|
|
/**
|
|
* The REST connection used to upload the image.
|
|
*/
|
|
conn:
|
|
{
|
|
type: Vn.JsonConnection
|
|
}
|
|
}
|
|
|
|
,initialize: function (props)
|
|
{
|
|
this._cssClass = 'cell-image';
|
|
this.parent (props);
|
|
}
|
|
|
|
,render: function (tr)
|
|
{
|
|
var image = new Htk.Image ({
|
|
directory: this.directory
|
|
,subdir: this.subdir
|
|
,fullDir: this.fullDir
|
|
,value: this.value
|
|
,conn: this.conn
|
|
,doc: this.doc
|
|
});
|
|
|
|
var td = this.parent (tr);
|
|
td.appendChild (image.node);
|
|
return td;
|
|
}
|
|
});
|