From c3a9a04daddf83e8d9659e8f34e3af60e3e67678 Mon Sep 17 00:00:00 2001 From: Patrick O'Carroll Date: Tue, 31 Oct 2017 13:58:38 +0100 Subject: [PATCH] converted confirm_click.js to .ts (#9674) * converted confirm_click.js to .ts * deleted confirm_click.ts * removed import of confirm_click --- public/app/core/core.ts | 1 - public/app/core/directives/confirm_click.js | 23 --------------------- 2 files changed, 24 deletions(-) delete mode 100644 public/app/core/directives/confirm_click.js diff --git a/public/app/core/core.ts b/public/app/core/core.ts index 9630fdac9c0..fb92fd81d19 100644 --- a/public/app/core/core.ts +++ b/public/app/core/core.ts @@ -1,5 +1,4 @@ import "./directives/dash_class"; -import "./directives/confirm_click"; import "./directives/dash_edit_link"; import "./directives/dropdown_typeahead"; import "./directives/metric_segment"; diff --git a/public/app/core/directives/confirm_click.js b/public/app/core/directives/confirm_click.js deleted file mode 100644 index 95b60347e10..00000000000 --- a/public/app/core/directives/confirm_click.js +++ /dev/null @@ -1,23 +0,0 @@ -define([ - '../core_module', -], -function (coreModule) { - 'use strict'; - - coreModule.default.directive('confirmClick', function() { - return { - restrict: 'A', - link: function(scope, elem, attrs) { - elem.bind('click', function() { - var message = attrs.confirmation || "Are you sure you want to do that?"; - if (window.confirm(message)) { - var action = attrs.confirmClick; - if (action) { - scope.$apply(scope.$eval(action)); - } - } - }); - }, - }; - }); -});