mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-23 06:45:19 -07: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:
parent
db6e91cd95
commit
e6dfd89300
1 changed files with 5 additions and 1 deletions
|
@ -109,6 +109,7 @@ module.exports = Marionette.ItemView.extend({
|
||||||
});
|
});
|
||||||
var filterKey = this.moviesCollection.state.filterKey;
|
var filterKey = this.moviesCollection.state.filterKey;
|
||||||
var filterValue = this.moviesCollection.state.filterValue;
|
var filterValue = this.moviesCollection.state.filterValue;
|
||||||
|
var currentPage = this.moviesCollection.state.currentPage;
|
||||||
this.moviesCollection.setFilterMode('all');
|
this.moviesCollection.setFilterMode('all');
|
||||||
//this.moviesCollection.fullCollection.resetFiltered();
|
//this.moviesCollection.fullCollection.resetFiltered();
|
||||||
for (var j=0; j<i; j++) {
|
for (var j=0; j<i; j++) {
|
||||||
|
@ -136,13 +137,16 @@ module.exports = Marionette.ItemView.extend({
|
||||||
|
|
||||||
if (rootFolder !== 'noChange') {
|
if (rootFolder !== 'noChange') {
|
||||||
var rootFolderPath = RootFolders.get(parseInt(rootFolder, 10));
|
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.filterKey = filterKey;
|
||||||
this.moviesCollection.state.filterValue = filterValue;
|
this.moviesCollection.state.filterValue = filterValue;
|
||||||
this.moviesCollection.fullCollection.resetFiltered();
|
this.moviesCollection.fullCollection.resetFiltered();
|
||||||
|
this.moviesCollection.getPage(currentPage, { fetch: false});
|
||||||
|
|
||||||
FullMovieCollection.save();
|
FullMovieCollection.save();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue