mirror of
https://github.com/Radarr/Radarr.git
synced 2026-03-27 17:54:34 -04:00
keep the current page the same after clicking Save
the path needs to be updated on models that are changes
This commit is contained in:
@@ -109,6 +109,7 @@ module.exports = Marionette.ItemView.extend({
|
||||
});
|
||||
var filterKey = this.moviesCollection.state.filterKey;
|
||||
var filterValue = this.moviesCollection.state.filterValue;
|
||||
var currentPage = this.moviesCollection.state.currentPage;
|
||||
this.moviesCollection.setFilterMode('all');
|
||||
//this.moviesCollection.fullCollection.resetFiltered();
|
||||
for (var j=0; j<i; j++) {
|
||||
@@ -136,13 +137,16 @@ module.exports = Marionette.ItemView.extend({
|
||||
|
||||
if (rootFolder !== 'noChange') {
|
||||
var rootFolderPath = RootFolders.get(parseInt(rootFolder, 10));
|
||||
m.set('rootFolderPath', rootFolderPath.get('path'));
|
||||
var currentPath = m.get('path');
|
||||
var folderName = currentPath.substring(currentPath.lastIndexOf('\\')+1);
|
||||
m.set('path', rootFolderPath.get('path')+ folderName);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.moviesCollection.state.filterKey = filterKey;
|
||||
this.moviesCollection.state.filterValue = filterValue;
|
||||
this.moviesCollection.fullCollection.resetFiltered();
|
||||
this.moviesCollection.getPage(currentPage, { fetch: false});
|
||||
|
||||
FullMovieCollection.save();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user