hedera-web/js/htk/column/image.js

61 lines
926 B
JavaScript
Raw Normal View History

2016-09-26 09:28:47 +00:00
module.exports = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-image'
,Properties:
{
/**
* The directory where the images are allocated.
2022-05-26 06:08:31 +00:00
*/
directory:
{
type: String
2016-05-02 13:05:49 +00:00
,value: null
},
/**
2016-05-02 13:05:49 +00:00
* The subdirectory where the images are allocated.
2022-05-26 06:08:31 +00:00
*/
subdir:
{
type: String
,value: null
},
/**
* Subdirectory where full images are allocated.
2022-05-26 06:08:31 +00:00
*/
fullDir:
{
type: String
2016-05-02 13:05:49 +00:00
,value: null
2016-09-24 14:32:31 +00:00
},
/**
* The REST connection used to upload the image.
2022-05-26 06:08:31 +00:00
*/
2016-09-24 14:32:31 +00:00
conn:
{
type: Vn.JsonConnection
}
}
2022-05-26 06:08:31 +00:00
,initialize: function(props) {
this._cssClass = 'cell-image';
2022-05-26 06:08:31 +00:00
this.parent(props);
}
2022-05-26 06:08:31 +00:00
,render: function(tr) {
var image = new Htk.Image({
2016-05-02 13:05:49 +00:00
directory: this.directory
,subdir: this.subdir
,fullDir: this.fullDir
2016-09-24 14:32:31 +00:00
,value: this.value
2016-10-16 14:16:08 +00:00
,conn: this.conn
,doc: this.doc
});
2022-05-26 06:08:31 +00:00
var td = this.parent(tr);
td.appendChild(image.node);
2016-05-02 13:05:49 +00:00
return td;
}
});