You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
634 B
24 lines
634 B
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:row:fileselected', this.model);
|
|
} else {
|
|
this.model.collection.trigger('filebrowser:row:folderselected', this.model);
|
|
}
|
|
}
|
|
}); |