1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

File Browser

New: File Browser to navigate to folders when choosing paths
This commit is contained in:
Mark McDowall
2014-12-15 23:28:55 -08:00
parent a55a77cb5b
commit 85a9b74008
51 changed files with 955 additions and 228 deletions
@@ -0,0 +1,31 @@
'use strict';
define(
[
'underscore',
'backgrid'
], function (_, Backgrid) {
return 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);
}
}
});
});