mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed selecting a new folder on add new series.
This commit is contained in:
parent
b7c569d30d
commit
f3194279e4
7 changed files with 60 additions and 15 deletions
|
@ -27,7 +27,8 @@ define(
|
|||
initialize: function () {
|
||||
this.collection = RootFolderCollection;
|
||||
this.rootfolderListView = new RootFolderCollectionView({ collection: RootFolderCollection });
|
||||
this.rootfolderListView.on('itemview:folderSelected', this._onFolderSelected, this);
|
||||
|
||||
this.listenTo(this.rootfolderListView, 'itemview:folderSelected', this._onFolderSelected);
|
||||
},
|
||||
|
||||
onRender: function () {
|
||||
|
@ -41,14 +42,17 @@ define(
|
|||
},
|
||||
|
||||
_addFolder: function () {
|
||||
|
||||
var self = this;
|
||||
|
||||
var newDir = new RootFolderModel({
|
||||
Path: this.ui.pathInput.val()
|
||||
});
|
||||
|
||||
RootFolderCollection.create(newDir, {
|
||||
wait: true, success: function () {
|
||||
RootFolderCollection.fetch();
|
||||
}
|
||||
RootFolderCollection.add(newDir);
|
||||
|
||||
newDir.save().done(function () {
|
||||
self.trigger('folderSelected', {model: newDir});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue