2022-06-06 16:02:17 +00:00
|
|
|
require('./style.scss');
|
2016-09-26 09:28:47 +00:00
|
|
|
|
2022-06-06 08:53:59 +00:00
|
|
|
module.exports = new Class({
|
2015-01-23 13:09:30 +00:00
|
|
|
Extends: Htk.Column
|
|
|
|
,Tag: 'htk-column-image'
|
2022-06-06 08:53:59 +00:00
|
|
|
,Properties: {
|
2015-01-23 13:09:30 +00:00
|
|
|
/**
|
|
|
|
* The directory where the images are allocated.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
directory:{
|
2015-01-23 13:09:30 +00:00
|
|
|
type: String
|
2016-05-02 13:05:49 +00:00
|
|
|
,value: null
|
2015-01-23 13:09:30 +00:00
|
|
|
},
|
|
|
|
/**
|
2016-05-02 13:05:49 +00:00
|
|
|
* The subdirectory where the images are allocated.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
subdir:{
|
2015-01-23 13:09:30 +00:00
|
|
|
type: String
|
|
|
|
,value: null
|
|
|
|
},
|
2015-08-21 14:13:21 +00:00
|
|
|
/**
|
2015-08-25 09:16:13 +00:00
|
|
|
* Subdirectory where full images are allocated.
|
2022-05-26 06:08:31 +00:00
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
fullDir:{
|
2015-08-21 14:13:21 +00:00
|
|
|
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
|
|
|
*/
|
2022-06-06 08:53:59 +00:00
|
|
|
conn:{
|
2016-09-24 14:32:31 +00:00
|
|
|
type: Vn.JsonConnection
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-16 01:46:44 +00:00
|
|
|
,initialize(props) {
|
2015-11-26 12:30:04 +00:00
|
|
|
this._cssClass = 'cell-image';
|
2022-06-06 16:02:17 +00:00
|
|
|
Htk.Column.prototype.initialize.call(this, props);
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
|
2022-11-16 01:46:44 +00:00
|
|
|
,render(tr) {
|
2022-05-26 06:08:31 +00:00
|
|
|
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
|
2015-12-15 16:08:24 +00:00
|
|
|
});
|
2015-01-23 13:09:30 +00:00
|
|
|
|
2022-06-06 16:02:17 +00:00
|
|
|
var td = Htk.Column.prototype.render.call(this, tr);
|
2022-05-26 06:08:31 +00:00
|
|
|
td.appendChild(image.node);
|
2016-05-02 13:05:49 +00:00
|
|
|
return td;
|
2015-01-23 13:09:30 +00:00
|
|
|
}
|
|
|
|
});
|