diff --git a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js index 11feb4e790..507032e4b4 100644 --- a/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js +++ b/src/Umbraco.Web.UI.Client/src/common/directives/components/umbconfirm.directive.js @@ -1,12 +1,51 @@ /** - * @ngdoc directive - * @name umbraco.directives.directive:umbConfirm - * @function - * @description - * A confirmation dialog - * - * @restrict E - */ +@ngdoc directive +@name umbraco.directives.directive:umbConfirm +@restrict E +@scope + +@description +A confirmation dialog + + +

Markup example

+
+	
+ + + +
+
+ +

Controller example

+
+	(function () {
+		"use strict";
+
+		function Controller() {
+
+            var vm = this;
+
+            vm.onConfirm = function() {
+                alert('Confirm clicked');
+            };
+
+            vm.onCancel = function() {
+                alert('Cancel clicked');
+            }
+
+
+        }
+
+		angular.module("umbraco").controller("My.Controller", Controller);
+
+	})();
+
+ +@param {string} caption (attribute): The caption shown above the buttons +@param {callback} on-confirm (attribute): The call back when the "OK" button is clicked. If not set the button will not be shown +@param {callback} on-cancel (atribute): The call back when the "Cancel" button is clicked. If not set the button will not be shown +**/ function confirmDirective() { return { restrict: "E", // restrict to an element