Sha256: d5ddd50abefc403501a4dc93383199d37172ff275486ab20592e7bfb9b8643f9
Contents?: true
Size: 1.06 KB
Versions: 27
Compression:
Stored size: 1.06 KB
Contents
/** * @namespace WORKAREA.impersonationNotification */ WORKAREA.registerModule('impersonationNotification', (function () { 'use strict'; var pathExcluded = function () { var paths = WORKAREA.config.impersonationNotification.excludedPaths; return _.reduce(paths, function (result, path) { return _.includes(window.location.pathname, path); }, false); }, confirm = function ($form) { var confirmed = window.confirm( $form.data('impersonationNotification') ); if (confirmed) { return; } $form.trigger('submit'); }, /** * @method * @name init * @memberof WORKAREA.impersonationNotification */ init = _.once(function ($scope) { var $form = $('[data-impersonation-notification]', $scope); if (_.isEmpty($form)) { return; } if (pathExcluded()) { return; } confirm($form); }); return { init: init }; }()));
Version data entries
27 entries across 27 versions & 1 rubygems