diff --git a/src/app/controllers/grafanaCtrl.js b/src/app/controllers/grafanaCtrl.js index fb022624045..33c7f028567 100644 --- a/src/app/controllers/grafanaCtrl.js +++ b/src/app/controllers/grafanaCtrl.js @@ -10,7 +10,7 @@ function (angular, config, _, $, store) { var module = angular.module('grafana.controllers'); - module.controller('GrafanaCtrl', function($scope, alertSrv, utilSrv, grafanaVersion, $rootScope, $controller, userSrv) { + module.controller('GrafanaCtrl', function($scope, alertSrv, utilSrv, grafanaVersion, $rootScope, $controller, userSrv, $timeout) { $scope.init = function() { $scope.grafana = {}; @@ -45,6 +45,10 @@ function (angular, config, _, $, store) { $scope.toggleSideMenu = function() { $scope.grafana.sidemenu = !$scope.grafana.sidemenu; store.set('grafana.sidemenu', $scope.grafana.sidemenu); + + $timeout(function() { + $scope.$broadcast("render"); + }, 50); }; $rootScope.onAppEvent = function(name, callback) { diff --git a/src/app/directives/topnav.js b/src/app/directives/topnav.js index 3d670983309..5ff418c7c77 100644 --- a/src/app/directives/topnav.js +++ b/src/app/directives/topnav.js @@ -10,6 +10,53 @@ function (angular) { .directive('topnav', function() { return { restrict: 'E', + transclude: true, + scope: { + title: "@", + section: "@", + titleAction: "&", + toggle: "&", + showMenuBtn: "=", + }, + template: + '
', + link: function(scope, elem, attrs) { + scope.icon = attrs.icon; + } + }; + }); + + angular + .module('grafana.directives') + .directive('topnavDash', function() { + return { + restrict: 'E', + transclude: true, scope: { title: "@", section: "@", @@ -49,4 +96,5 @@ function (angular) { }; }); + }); diff --git a/src/app/features/account/partials/account.html b/src/app/features/account/partials/account.html index 5465d0c7094..56e65c8de35 100644 --- a/src/app/features/account/partials/account.html +++ b/src/app/features/account/partials/account.html @@ -1,15 +1,8 @@ - +