U4-5222 Rollback Feature fails to update the UI to show the rolled back content - requires refresh

This commit is contained in:
Shannon
2017-09-28 02:38:53 +10:00
parent 4b581a2182
commit d2d43255aa
5 changed files with 70 additions and 50 deletions

View File

@@ -361,11 +361,29 @@ Umbraco.Sys.registerNamespace("Umbraco.Application");
rootScope : function(){
return getRootScope();
},
reloadLocation: function() {
var injector = getRootInjector();
var $route = injector.get("$route");
$route.reload();
/**
This will reload the content frame based on it's current route, if pathToMatch is specified it will only reload it if the current
location matches the path
*/
reloadLocation: function(pathToMatch) {
var injector = getRootInjector();
var doChange = true;
if (pathToMatch) {
var $location = injector.get("$location");
var path = $location.path();
if (path != pathToMatch) {
doChange = false;
}
}
if (doChange) {
var $route = injector.get("$route");
$route.reload();
var $rootScope = injector.get("$rootScope");
$rootScope.$apply();
}
},
closeModalWindow: function(rVal) {