converted confirm_click.js to .ts (#9674)

* converted confirm_click.js to .ts

* deleted confirm_click.ts

* removed import of confirm_click
This commit is contained in:
Patrick O'Carroll
2017-10-31 13:58:38 +01:00
committed by Torkel Ödegaard
parent afd4f37f39
commit c3a9a04dad
2 changed files with 0 additions and 24 deletions
-1
View File
@@ -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";
@@ -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));
}
}
});
},
};
});
});