From 4846125ec07d8ee73dcb0809d538205c1f3a867c Mon Sep 17 00:00:00 2001 From: Marcus Efraimsson Date: Tue, 19 Dec 2017 13:37:27 +0100 Subject: [PATCH] dashfolders: support creating new folder when moving dashboards. #10197 --- .../dashboard/move_to_folder_modal/move_to_folder.html | 5 ++++- .../dashboard/move_to_folder_modal/move_to_folder.ts | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/public/app/features/dashboard/move_to_folder_modal/move_to_folder.html b/public/app/features/dashboard/move_to_folder_modal/move_to_folder.html index 8f04d393a5d..8a67517aa92 100644 --- a/public/app/features/dashboard/move_to_folder_modal/move_to_folder.html +++ b/public/app/features/dashboard/move_to_folder_modal/move_to_folder.html @@ -18,12 +18,15 @@
- + Cancel
diff --git a/public/app/features/dashboard/move_to_folder_modal/move_to_folder.ts b/public/app/features/dashboard/move_to_folder_modal/move_to_folder.ts index 9f252783cf7..84fc16833a1 100644 --- a/public/app/features/dashboard/move_to_folder_modal/move_to_folder.ts +++ b/public/app/features/dashboard/move_to_folder_modal/move_to_folder.ts @@ -6,6 +6,7 @@ export class MoveToFolderCtrl { folder: any; dismiss: any; afterSave: any; + isValidFolderSelection = true; /** @ngInject */ constructor(private backendSrv) {} @@ -39,6 +40,14 @@ export class MoveToFolderCtrl { return this.afterSave(); }); } + + onEnterFolderCreation() { + this.isValidFolderSelection = false; + } + + onExitFolderCreation() { + this.isValidFolderSelection = true; + } } export function moveToFolderModal() {