From 7a5cad20ec1ab3990aaa53a0815bcfeb3ae6a376 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Tue, 6 Sep 2016 09:58:08 -0700 Subject: [PATCH] [API] Add JSDoc for Dialog --- src/ui/Dialog.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/ui/Dialog.js b/src/ui/Dialog.js index 9f462fb444..3bb431baf3 100644 --- a/src/ui/Dialog.js +++ b/src/ui/Dialog.js @@ -1,9 +1,24 @@ define(['text!./dialog.html', 'zepto'], function (dialogTemplate, $) { + + /** + * A dialog may be displayed to show blocking content to users. + * @param {module:openmct.View} view the view to show in the dialog + * @param {string [title] the title for this dialog + * @constructor + * @memberof module:openmct + */ function Dialog(view, title) { this.view = view; this.title = title; } + /** + * Display this dialog. + * @returns {Promise} a promise that will be resolved if the user + * chooses "OK", an rejected if the user chooses "cancel" + * @method show + * @memberof module:openmct.Dialog# + */ Dialog.prototype.show = function () { var $body = $('body'); var $dialog = $(dialogTemplate);