Fixes redirect when creating new content for a specific culture

This commit is contained in:
Shannon
2018-08-29 13:30:48 +10:00
parent c743ac760d
commit c85128dd11
2 changed files with 4 additions and 3 deletions

View File

@@ -682,7 +682,7 @@ function contentEditingHelper(fileManager, $q, $location, $routeParams, notifica
// /belle/#/content/edit/9876 (where 9876 is the new id)
//clear the query strings
navigationService.clearSearch();
navigationService.clearSearch(["cculture"]);
//change to new path
$location.path("/" + $routeParams.section + "/" + $routeParams.tree + "/" + $routeParams.method + "/" + id);

View File

@@ -30,6 +30,7 @@ function navigationService($rootScope, $route, $routeParams, $log, $location, $q
//A list of query strings defined that when changed will not cause a reload of the route
var nonRoutingQueryStrings = ["mculture", "cculture"];
var retainedQueryStrings = ['mculture'];
//used to track the current dialog object
var currentDialog = null;
@@ -192,8 +193,8 @@ function navigationService($rootScope, $route, $routeParams, $log, $location, $q
* @description
* utility to clear the querystring/search params while maintaining a known list of parameters that should be maintained throughout the app
*/
clearSearch: function () {
var toRetain = ["mculture"];
clearSearch: function (toRetain) {
var toRetain = _.union(retainedQueryStrings, toRetain);
var currentSearch = $location.search();
$location.search('');
_.each(toRetain, function (k) {