/**
* @desc
* The deleteLink directive can be used to display a UI control for a delete operation.
* If the confirmDelete property of chaise-config.js is true or undefined, the
* directive will display a modal and, if the user clicks the affirmative button,
* run the provided callback to delete your resource. If confirmDelete is false,
* the directive simply runs the provided callback when the user clicks the UI
* control.
* The deleteLink directive can be used as an element tag (<delete-link></delete-link>)
* or an attribute (<div delete-link></div>). It accepts the following attributes:
* @param {Function} callback - The function to delete your resource (required)
* @param {String} display ["text"] — Can be either "button" or "text". "Button" displays
* a button link. "Text" displays an anchor link.
* @param {Boolean} icon [false] - If true, the UI control will be prepended with
* a trash can icon (specifically, Bootstrap's .glypicon-trash icon).
* @param {String} label - If defined, this is the text to display on the UI control.
* @param {String} button-size - Customize with 'xs', 'sm', or 'lg'. If undefined, the
* default is the regular Bootstrap button size.
* @param {String} tooltip - If defined, the UI control will display this tooltip
* text when the user hovers over the control.
* @example <delete-link button-size="sm" tooltip="Click to delete." icon="true" display="button" callback="ctrl.removeItem(item);"></delete-link>
*/

(function() {
    'use strict';
    angular.module('chaise.delete', [])
    .directive('deleteLink', ['$uibModal', function($uibModal) {
        var TEMPLATES_PATH = '../common/templates/delete-link/';
        var CONFIRM_DELETE =  (chaiseConfig.confirmDelete === undefined || chaiseConfig.confirmDelete) ? true : false;

        function createModal() {
            return $uibModal.open({
                templateUrl: TEMPLATES_PATH + 'confirm_delete.modal.html',
                controller: 'ConfirmDeleteController',
                controllerAs: 'ctrl',
                size: 'sm'
            });
        }

        return {
            restrict: 'EA',
            scope: {
                icon: '=',
                label: '@',
                display: '@',
                callback: '&',
                tooltip: '@',
                buttonSize: '@'
            },
            link: function(scope) {
                scope.deleteFn = function deleteFn() {
                    if (!CONFIRM_DELETE) {
                        return scope.callback();
                    }
                    var modalInstance = createModal();
                    modalInstance.result.then(function success() {
                        return scope.callback();
                    }).catch(function error(response) {
                        console.log(response);
                    });
                }
            },
            templateUrl: function(elem, attrs) {
                if (attrs.display == 'button') {
                    return TEMPLATES_PATH + 'delete-btn.html';
                }
                return TEMPLATES_PATH + 'delete-link.html';
            }
        };
    }]);
})();

@@ -72,33 +72,53 @@
 rol 
-for a delete operation.%0A*
+that performs your%0A* chosen deletion routine.
  If 
@@ -166,16 +166,18 @@
 ig.js is
+%0A*
  true or
@@ -191,18 +191,16 @@
 ned, the
-%0A*
  directi
@@ -242,24 +242,26 @@
  user clicks
+%0A*
  the affirma
@@ -272,18 +272,16 @@
  button,
-%0A*
  run the
@@ -326,16 +326,18 @@
 urce. If
+%0A*
  confirm
@@ -352,18 +352,16 @@
 s false,
-%0A*
  the dir
@@ -401,24 +401,26 @@
 allback when
+%0A*
  the user cl
@@ -430,18 +430,16 @@
 s the UI
-%0A*
  control

Tweak howto text