mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Added auto complete to AddSeries RootDir
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/// <reference path="../../app.js" />
|
||||
/// <reference path="RootDirModel.js" />
|
||||
/// <reference path="RootDirCollection.js" />
|
||||
/// <reference path="../../Shared/AutoComplete.js" />
|
||||
|
||||
NzbDrone.AddSeries.RootDirItemView = Backbone.Marionette.ItemView.extend({
|
||||
|
||||
@@ -53,6 +54,8 @@ NzbDrone.AddSeries.RootDirView = Backbone.Marionette.Layout.extend({
|
||||
|
||||
this.currentDirs.show(new NzbDrone.AddSeries.RootDirListView({ collection: this.collection }));
|
||||
this.collection.fetch();
|
||||
|
||||
this.ui.pathInput.folderAutoComplete();
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -41,6 +41,10 @@ body {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nz-center .typeahead {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#footer-region {
|
||||
font-size: 16px;
|
||||
text-decoration: none;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
$.fn.folderAutoComplete = function () {
|
||||
$(this).typeahead({
|
||||
source: function (query, process) {
|
||||
$.ajax({
|
||||
url: '/api/directories',
|
||||
dataType: "json",
|
||||
type: "POST",
|
||||
data: { query: query },
|
||||
success: function (data) {
|
||||
process(data);
|
||||
}
|
||||
});
|
||||
},
|
||||
minLength: 3
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user