Commit c3a9a04d by Patrick O'Carroll Committed by Torkel Ödegaard

converted confirm_click.js to .ts (#9674)

* converted confirm_click.js to .ts

* deleted confirm_click.ts

* removed import of confirm_click
parent afd4f37f
import "./directives/dash_class";
import "./directives/confirm_click";
import "./directives/dash_edit_link";
import "./directives/dropdown_typeahead";
import "./directives/metric_segment";
......
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));
}
}
});
},
};
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment