mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Set loonknfeel to default for everypage, and change only if looknfeel is different
This commit is contained in:
parent
bdf3a8e09d
commit
bdde389b1a
1 changed files with 6 additions and 1 deletions
|
|
@ -40,10 +40,15 @@ angular.module('zeppelinWebApp').controller('MainCtrl', function($scope, $rootSc
|
|||
});
|
||||
|
||||
$rootScope.$on('setLookAndFeel', function(event, data) {
|
||||
if (!event.defaultPrevented && data && data !== '') {
|
||||
if (!event.defaultPrevented && data && data !== '' && data != $scope.looknfeel) {
|
||||
$scope.looknfeel = data;
|
||||
event.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
// Set The lookAndFeel to default on every page
|
||||
$rootScope.$on('$routeChangeStart', function(event, next, current) {
|
||||
$rootScope.$broadcast('setLookAndFeel', 'default');
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue