Skip to content

Commit

Permalink
Fix #588
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Sep 27, 2013
1 parent eb092f3 commit 525b1a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
6 changes: 6 additions & 0 deletions hawtio-web/src/main/webapp/app/core/js/navbar.ts
Expand Up @@ -30,6 +30,12 @@ module Core {
$location.search(Perspective.perspectiveSearchId, perspective.id);
reloadPerspective();
$scope.topLevelTabs = Perspective.topLevelTabs($location, workspace, jolokia, localStorage);
if (oldValue) {
oldValue.lastPage = $location.url();
if (newValue.lastPage) {
$location.url(Core.trimLeading(newValue.lastPage, "#"));
}
}
}
}
});
Expand Down
Expand Up @@ -6,23 +6,10 @@ module Perspective {
when('/perspective/defaultPage', {templateUrl: 'app/perspective/html/defaultPage.html',
controller: Perspective.DefaultPageController});
}).
run(($location:ng.ILocationService, workspace:Workspace, viewRegistry, layoutFull, $rootScope, jolokia, localStorage) => {
run(($location:ng.ILocationService, workspace:Workspace, viewRegistry, layoutFull) => {

viewRegistry['perspective'] = layoutFull;

$rootScope.$on('$locationChangeStart', (event, newRoute, oldRoute) => {

var perspectives = Perspective.getPerspectives($location, workspace, jolokia, localStorage);
var currentId = Perspective.currentPerspectiveId($location, workspace, jolokia, localStorage);

var perspective = perspectives.find({id: currentId});

if (perspective) {
Core.pathSet(perspective, ['lastPage'], Core.extractHashURL(oldRoute));
}
});


});

hawtioPluginLoader.addModule(pluginName);
Expand Down

0 comments on commit 525b1a7

Please sign in to comment.