diff --git a/public/app/features/annotations/editor_ctrl.ts b/public/app/features/annotations/editor_ctrl.ts index 3929d7d9a32..cb76045dbec 100644 --- a/public/app/features/annotations/editor_ctrl.ts +++ b/public/app/features/annotations/editor_ctrl.ts @@ -67,8 +67,8 @@ export class AnnotationsEditorCtrl { this.annotations.push(this.currentAnnotation); this.reset(); this.mode = 'list'; - this.$scope.updateSubmenuVisibility(); this.$scope.broadcastRefresh(); + this.$scope.dashboard.updateSubmenuVisibility(); }; removeAnnotation(annotation) { diff --git a/public/app/features/dashboard/dashboard_ctrl.ts b/public/app/features/dashboard/dashboard_ctrl.ts index ef6258d86d3..1dfe54c6636 100644 --- a/public/app/features/dashboard/dashboard_ctrl.ts +++ b/public/app/features/dashboard/dashboard_ctrl.ts @@ -64,7 +64,7 @@ export class DashboardCtrl { dashboardKeybindings.shortcuts($scope); - $scope.updateSubmenuVisibility(); + $scope.dashboard.updateSubmenuVisibility(); $scope.setWindowTitleAndTheme(); $scope.appEvent("dashboard-initialized", $scope.dashboard); @@ -94,10 +94,6 @@ export class DashboardCtrl { dynamicDashboardSrv.process(); }; - $scope.updateSubmenuVisibility = function() { - $scope.submenuEnabled = $scope.dashboard.isSubmenuFeaturesEnabled(); - }; - $scope.setWindowTitleAndTheme = function() { window.document.title = config.window_title_prefix + $scope.dashboard.title; }; diff --git a/public/app/features/dashboard/dashnav/dashnav.html b/public/app/features/dashboard/dashnav/dashnav.html index 7bd9295de25..47d12d05206 100644 --- a/public/app/features/dashboard/dashnav/dashnav.html +++ b/public/app/features/dashboard/dashnav/dashnav.html @@ -52,6 +52,7 @@ -
  • - - Leave Build Mode -