mirror of
https://github.com/Lidarr/Lidarr
synced 2026-02-05 22:33:35 +01:00
24 lines
No EOL
626 B
JavaScript
24 lines
No EOL
626 B
JavaScript
var _ = require('underscore');
|
|
var Backgrid = require('backgrid');
|
|
|
|
module.exports = Backgrid.Row.extend({
|
|
className : 'file-browser-row',
|
|
|
|
events : {
|
|
'click' : '_selectRow'
|
|
},
|
|
|
|
_originalInit : Backgrid.Row.prototype.initialize,
|
|
|
|
initialize : function() {
|
|
this._originalInit.apply(this, arguments);
|
|
},
|
|
|
|
_selectRow : function() {
|
|
if (this.model.get('type') === 'file') {
|
|
this.model.collection.trigger('filebrowser:fileselected', this.model);
|
|
} else {
|
|
this.model.collection.trigger('filebrowser:folderselected', this.model);
|
|
}
|
|
}
|
|
}); |