diff --git a/plugins/Dashboard/javascripts/dashboard.js b/plugins/Dashboard/javascripts/dashboard.js index d4502d02abb..3ba6c82e22c 100644 --- a/plugins/Dashboard/javascripts/dashboard.js +++ b/plugins/Dashboard/javascripts/dashboard.js @@ -239,30 +239,37 @@ function copyDashboardToUser() { DashboardSettingsControlBase.call(this, element); $(this).on('resetDashboard', function () { + this.hide(); resetDashboard(); }); $(this).on('showChangeDashboardLayoutDialog', function () { + this.hide(); showChangeDashboardLayoutDialog(); }); $(this).on('renameDashboard', function () { + this.hide(); renameDashboard(); }); $(this).on('removeDashboard', function () { + this.hide(); removeDashboard(); }); $(this).on('setAsDefaultWidgets', function () { + this.hide(); setAsDefaultWidgets(); }); $(this).on('copyDashboardToUser', function () { + this.hide(); copyDashboardToUser(); }); $(this).on('createDashboard', function () { + this.hide(); createDashboard(); }); }; @@ -276,6 +283,10 @@ function copyDashboardToUser() { } }, + hide: function () { + this.$element.removeClass('visible'); + }, + isWidgetAvailable: function (widgetUniqueId) { return !$('#dashboardWidgetsArea').find('[widgetId=' + widgetUniqueId + ']').length; },