mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-27 22:57:09 -04:00
File Browser
New: File Browser to navigate to folders when choosing paths
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'marionette',
|
||||
'Mixins/AsModelBoundView',
|
||||
'Mixins/AsValidatedView',
|
||||
'Mixins/AutoComplete'
|
||||
], function (Marionette, AsModelBoundView, AsValidatedView) {
|
||||
'Mixins/DirectoryAutoComplete',
|
||||
'Mixins/FileBrowser'
|
||||
], function (vent, Marionette, AsModelBoundView, AsValidatedView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/MediaManagement/FileManagement/FileManagementViewTemplate',
|
||||
@@ -15,7 +17,7 @@ define(
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.ui.recyclingBin.autoComplete('/directories');
|
||||
this.ui.recyclingBin.fileBrowser();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -93,5 +93,6 @@
|
||||
<div class="col-sm-8 col-sm-pull-1">
|
||||
<input type="text" name="recycleBin" class="form-control x-path"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -3,37 +3,11 @@ define(
|
||||
[
|
||||
'marionette',
|
||||
'Mixins/AsModelBoundView',
|
||||
'Mixins/AsValidatedView',
|
||||
'Mixins/AutoComplete'
|
||||
'Mixins/AsValidatedView'
|
||||
], function (Marionette, AsModelBoundView, AsValidatedView) {
|
||||
|
||||
var view = Marionette.ItemView.extend({
|
||||
template: 'Settings/MediaManagement/Permissions/PermissionsViewTemplate',
|
||||
|
||||
ui: {
|
||||
recyclingBin : '.x-path',
|
||||
failedDownloadHandlingCheckbox: '.x-failed-download-handling',
|
||||
failedDownloadOptions : '.x-failed-download-options'
|
||||
},
|
||||
|
||||
events: {
|
||||
'change .x-failed-download-handling': '_setFailedDownloadOptionsVisibility'
|
||||
},
|
||||
|
||||
onShow: function () {
|
||||
this.ui.recyclingBin.autoComplete('/directories');
|
||||
},
|
||||
|
||||
_setFailedDownloadOptionsVisibility: function () {
|
||||
var checked = this.ui.failedDownloadHandlingCheckbox.prop('checked');
|
||||
if (checked) {
|
||||
this.ui.failedDownloadOptions.slideDown();
|
||||
}
|
||||
|
||||
else {
|
||||
this.ui.failedDownloadOptions.slideUp();
|
||||
}
|
||||
}
|
||||
template: 'Settings/MediaManagement/Permissions/PermissionsViewTemplate'
|
||||
});
|
||||
|
||||
AsModelBoundView.call(view);
|
||||
|
||||
Reference in New Issue
Block a user