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
@@ -4,7 +4,6 @@
<td class="col-md-3 x-folder folder-free-space">
<span>{{Bytes freeSpace}}</span>
</td>
<td class="col-md-1 nz-row-action">
<div class="btn btn-sm btn-icon-only icon-nd-delete x-delete">
</div>
<td class="col-md-1">
<i class="icon-nd-delete x-delete"></i>
</td>
@@ -8,14 +8,14 @@ define(
'AddSeries/RootFolders/RootFolderModel',
'Shared/LoadingView',
'Mixins/AsValidatedView',
'Mixins/AutoComplete'
'Mixins/FileBrowser'
], function (Marionette, RootFolderCollectionView, RootFolderCollection, RootFolderModel, LoadingView, AsValidatedView) {
var layout = Marionette.Layout.extend({
template: 'AddSeries/RootFolders/RootFolderLayoutTemplate',
ui: {
pathInput: '.x-path input'
pathInput: '.x-path'
},
regions: {
@@ -42,7 +42,7 @@ define(
this._showCurrentDirs();
}
this.ui.pathInput.autoComplete('/directories');
this.ui.pathInput.fileBrowser({ showFiles: true, showLastModified: true });
},
_onFolderSelected: function (options) {
@@ -7,22 +7,28 @@
<div class="validation-errors"></div>
<div class="alert alert-info">Enter the path that contains some or all of your TV series, you will be able to choose which series you want to import<button type="button" class="close" data-dismiss="alert">×</button></div>
<div class="form-group">
<div class="input-group x-path">
<span class="input-group-addon">&nbsp;<i class="icon-folder-open"></i></span>
<input class="col-md-9 form-control" type="text" validation-name="path" placeholder="Enter path to folder that contains your shows">
<span class="input-group-btn ">
<button class="btn btn-success x-add">
<i class="icon-ok"/>
</button>
</span>
<div class="row">
<div class="form-group">
<div class="col-md-12">
<div class="input-group">
<span class="input-group-addon">&nbsp;<i class="icon-folder-open"></i></span>
<input class="form-control x-path" type="text" validation-name="path" placeholder="Enter path to folder that contains your shows">
<span class="input-group-btn"><button class="btn btn-success x-add"><i class="icon-ok"/></button></span>
</div>
</div>
</div>
</div>
{{#if items}}
<h4>Recent Folders</h4>
{{/if}}
<div id="current-dirs" class="root-folders-list"></div>
<div class="row root-folders">
<div class="col-md-12">
{{#if items}}
<h4>Recent Folders</h4>
{{/if}}
<div id="current-dirs" class="root-folders-list"></div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal">close</button>