mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-09 06:31:22 +00:00
GUAC-919: Add page-specific CSS class support. Use client-specific body style.
This commit is contained in:
@@ -51,7 +51,10 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
|
||||
};
|
||||
|
||||
// Put some useful variables in the top level scope
|
||||
$scope.page = { title: '' };
|
||||
$scope.page = {
|
||||
title: '',
|
||||
bodyClassName: ''
|
||||
};
|
||||
$scope.currentUserID = null;
|
||||
$scope.currentUserIsAdmin = false;
|
||||
$scope.currentUserHasUpdate = false;
|
||||
@@ -106,11 +109,15 @@ angular.module('index').controller('indexController', ['$scope', '$injector',
|
||||
keyboard.reset();
|
||||
};
|
||||
|
||||
// Update title upon navigation
|
||||
// Update title and CSS class upon navigation
|
||||
$scope.$on('$routeChangeSuccess', function(event, current, previous) {
|
||||
|
||||
var title = current.$$route.title;
|
||||
if (title)
|
||||
$scope.page.title = title;
|
||||
|
||||
$scope.page.bodyClassName = current.$$route.bodyClassName || '';
|
||||
|
||||
});
|
||||
|
||||
}]);
|
||||
|
Reference in New Issue
Block a user