Explorar o código

Dashboard: When deleting dashboard show dashboard title in confirmation popup, Closes #860

Torkel Ödegaard %!s(int64=11) %!d(string=hai) anos
pai
achega
978a345ad8
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      src/app/controllers/dashboardNavCtrl.js
  2. 1 1
      src/app/controllers/search.js

+ 1 - 1
src/app/controllers/dashboardNavCtrl.js

@@ -93,7 +93,7 @@ function (angular, _, moment, config, store) {
     };
     };
 
 
     $scope.deleteDashboard = function(evt, options) {
     $scope.deleteDashboard = function(evt, options) {
-      if (!confirm('Are you sure you want to delete dashboard?')) {
+      if (!confirm('Do you want to delete dashboard ' + options.title + ' ?')) {
         return;
         return;
       }
       }
 
 

+ 1 - 1
src/app/controllers/search.js

@@ -121,7 +121,7 @@ function (angular, _, config, $) {
 
 
     $scope.deleteDashboard = function(dash, evt) {
     $scope.deleteDashboard = function(dash, evt) {
       evt.stopPropagation();
       evt.stopPropagation();
-      $scope.emitAppEvent('delete-dashboard', { id: dash.id });
+      $scope.emitAppEvent('delete-dashboard', { id: dash.id, title: dash.title });
       $scope.results.dashboards = _.without($scope.results.dashboards, dash);
       $scope.results.dashboards = _.without($scope.results.dashboards, dash);
     };
     };