Sha256: 61f8876eee1206e78c14cf8470884b9d15d9ea5cf1950b34500eeaa8639c1357

Contents?: true

Size: 573 Bytes

Versions: 10

Compression:

Stored size: 573 Bytes

Contents

/**
 * A generic confirmation for risky actions.
 * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
 */
angular.module('ngReallyClick',[]).directive('ngReallyClick', [function() {
    return {
        restrict: 'A',
        link: function(scope, element, attrs) {
            element.bind('click', function() {
                var message = attrs.ngReallyMessage;
                if (message && confirm(message)) {
                    scope.$apply(attrs.ngReallyClick);
                }
            });
        }
    }
}]);

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mno-enterprise-frontend-2.0.9 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.8 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.7 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.6 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.5 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.4 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.3 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.2 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.1 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js
mno-enterprise-frontend-2.0.0 app/assets/javascripts/mno_enterprise/lib/angular-really-click.js