From 075c72252707a217ed29338590147b01996ea3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 2 Nov 2016 22:24:08 +0100 Subject: [PATCH] ux(dashboard): worked on single row edit mode, #6442 --- public/app/features/dashboard/model.ts | 1 + .../app/features/dashboard/row/add_panel.ts | 2 +- public/app/features/dashboard/row/row.html | 4 ++-- public/app/features/dashboard/row/row_ctrl.ts | 21 ++++++++++++++----- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/public/app/features/dashboard/model.ts b/public/app/features/dashboard/model.ts index 99c2eef7660..a6091cbf49e 100644 --- a/public/app/features/dashboard/model.ts +++ b/public/app/features/dashboard/model.ts @@ -192,6 +192,7 @@ export class DashboardModel { this.editMode = !this.editMode; this.updateSubmenuVisibility(); + this.events.emit('edit-mode-changed', this.editMode); } setPanelFocus(id) { diff --git a/public/app/features/dashboard/row/add_panel.ts b/public/app/features/dashboard/row/add_panel.ts index b85e33e09c6..f89da910612 100644 --- a/public/app/features/dashboard/row/add_panel.ts +++ b/public/app/features/dashboard/row/add_panel.ts @@ -93,7 +93,7 @@ export class AddPanelCtrl { isNew: true, }; - this.rowCtrl.dropView = 0; + this.rowCtrl.closeDropView(); this.dashboard.addPanel(panel, this.row); this.$timeout(() => { this.$rootScope.$broadcast('render'); diff --git a/public/app/features/dashboard/row/row.html b/public/app/features/dashboard/row/row.html index 6323c3288f6..85ce4fe73ed 100644 --- a/public/app/features/dashboard/row/row.html +++ b/public/app/features/dashboard/row/row.html @@ -1,4 +1,4 @@ -
+
-
+