From 7b0eb6d0bba7edcd5f27b178d9816ec8d76ff729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Tue, 25 Oct 2016 16:36:40 +0200 Subject: [PATCH] feat(dashboard): progress on dash edit mode --- .../app/features/annotations/editor_ctrl.ts | 2 +- .../app/features/dashboard/dashboard_ctrl.ts | 6 +- .../features/dashboard/dashnav/dashnav.html | 5 +- public/app/features/dashboard/keybindings.js | 2 +- public/app/features/dashboard/model.ts | 15 +- .../app/features/dashboard/row/options.html | 42 +++++ public/app/features/dashboard/row/options.ts | 24 +++ public/app/features/dashboard/row/row.html | 152 ++++++++---------- public/app/features/dashboard/row/row.ts | 41 ++++- .../features/dashboard/submenu/submenu.html | 19 +++ .../app/features/dashboard/submenu/submenu.ts | 9 ++ public/app/features/dashlinks/module.js | 4 +- public/app/features/templating/editor_ctrl.ts | 4 +- public/app/partials/dashboard.html | 2 +- public/sass/pages/_dashboard.scss | 59 +++---- 15 files changed, 238 insertions(+), 148 deletions(-) create mode 100644 public/app/features/dashboard/row/options.html create mode 100644 public/app/features/dashboard/row/options.ts 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 -