From 923df8244bc94a30a8adf87d1d0d812a388c9250 Mon Sep 17 00:00:00 2001 From: ubhatnagar Date: Fri, 18 Sep 2015 02:30:02 -0700 Subject: [PATCH] Search Dashboard Panel will hide if 'Manage Dashboards' is clicked. --- public/app/features/dashboard/dashboardNavCtrl.js | 3 ++- public/app/features/dashboard/directives/dashSearchView.js | 7 +++++++ .../app/features/dashboard/partials/dashboardTopNav.html | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard/dashboardNavCtrl.js b/public/app/features/dashboard/dashboardNavCtrl.js index 88a38eeaea8..e6a325c512c 100644 --- a/public/app/features/dashboard/dashboardNavCtrl.js +++ b/public/app/features/dashboard/dashboardNavCtrl.js @@ -51,8 +51,9 @@ function (angular, _) { $scope.exitFullscreen(); }; - $scope.removeToolTip = function() { + $scope.manageButtonClickAction = function() { $('.tooltip').not(this).hide(); + $scope.appEvent('hide-dash-search'); }; $scope.saveDashboard = function(options) { diff --git a/public/app/features/dashboard/directives/dashSearchView.js b/public/app/features/dashboard/directives/dashSearchView.js index ad73b84043c..a274568a031 100644 --- a/public/app/features/dashboard/directives/dashSearchView.js +++ b/public/app/features/dashboard/directives/dashSearchView.js @@ -54,7 +54,14 @@ function (angular, $) { hookUpHideWhenClickedOutside(); } + function hideSearch() { + if (editorScope) { + editorScope.dismiss(); + } + } + scope.onAppEvent('show-dash-search', showSearch); + scope.onAppEvent('hide-dash-search', hideSearch); } }; }); diff --git a/public/app/features/dashboard/partials/dashboardTopNav.html b/public/app/features/dashboard/partials/dashboardTopNav.html index 98396cd4359..e99191b0054 100644 --- a/public/app/features/dashboard/partials/dashboardTopNav.html +++ b/public/app/features/dashboard/partials/dashboardTopNav.html @@ -30,7 +30,7 @@