瀏覽代碼

converted confirm_click.js to .ts (#9674)

* converted confirm_click.js to .ts

* deleted confirm_click.ts

* removed import of confirm_click
Patrick O'Carroll 8 年之前
父節點
當前提交
c3a9a04dad
共有 2 個文件被更改,包括 0 次插入24 次删除
  1. 0 1
      public/app/core/core.ts
  2. 0 23
      public/app/core/directives/confirm_click.js

+ 0 - 1
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";

+ 0 - 23
public/app/core/directives/confirm_click.js

@@ -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));
-            }
-          }
-        });
-      },
-    };
-  });
-});