keep the current page the same after clicking Save

the path needs to be updated on models that are changes
pull/2/head
geogolem 8 years ago
parent db6e91cd95
commit e6dfd89300

@ -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();
},

Loading…
Cancel
Save