Doc: Get class doc into docs

This commit is contained in:
nathan 2023-10-16 13:33:55 -06:00
parent 105343e98d
commit a6d3a87c75
2 changed files with 17 additions and 11 deletions

View File

@ -40,8 +40,6 @@ export interface DialogButton
} }
/** /**
* Et2Dialog widget
*
* A common dialog widget that makes it easy to inform users or prompt for information. * A common dialog widget that makes it easy to inform users or prompt for information.
* *
* It is possible to have a custom dialog by using a template, but you can also use * It is possible to have a custom dialog by using a template, but you can also use
@ -52,7 +50,7 @@ export interface DialogButton
* *
* Or a more complete example: * Or a more complete example:
* ```js * ```js
* let callback = function (button_id) * let callback = function (button_id)
* { * {
* if(button_id == Et2Dialog.YES_BUTTON) * if(button_id == Et2Dialog.YES_BUTTON)
* { * {
@ -83,22 +81,22 @@ export interface DialogButton
* ``` * ```
* *
* The parameters for the above are all optional, except callback (which can be null) and message: * The parameters for the above are all optional, except callback (which can be null) and message:
* callback - function called when the dialog closes, or false/null. * - callback - function called when the dialog closes, or false/null.
* The ID of the button will be passed. Button ID will be one of the Et2Dialog.*_BUTTON constants. * The ID of the button will be passed. Button ID will be one of the Et2Dialog.*_BUTTON constants.
* The callback is _not_ called if the user closes the dialog with the X in the corner, or presses ESC. * The callback is _not_ called if the user closes the dialog with the X in the corner, or presses ESC.
* message - (plain) text to display * - message - (plain) text to display
* title - Dialog title * - title - Dialog title
* value (for prompt) * - value (for prompt)
* buttons - Et2Dialog BUTTONS_* constant, or an array of button settings. Use DialogButton interface. * - buttons - Et2Dialog BUTTONS_* constant, or an array of button settings. Use DialogButton interface.
* dialog_type - Et2Dialog *_MESSAGE constant * - dialog_type - Et2Dialog *_MESSAGE constant
* icon - URL of icon * - icon - URL of icon
* *
* Note that these methods will _not_ block program flow while waiting for user input unless you use "await" on getComplete(). * Note that these methods will _not_ block program flow while waiting for user input unless you use "await" on getComplete().
* The user's input will be provided to the callback. * The user's input will be provided to the callback.
* *
* You can also create a custom dialog using an etemplate, even setting all the buttons yourself. * You can also create a custom dialog using an etemplate, even setting all the buttons yourself.
* ```ts * ```ts
* // Pass egw in the constructor * // Pass egw in the constructor
* let dialog = new Et2Dialog(my_egw_reference); * let dialog = new Et2Dialog(my_egw_reference);
* *
* // Set attributes. They can be set in any way, but this is convenient. * // Set attributes. They can be set in any way, but this is convenient.
@ -136,6 +134,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
* *
* @type {IegwAppLocal} * @type {IegwAppLocal}
* @protected * @protected
* @internal
*/ */
protected __egw : IegwAppLocal protected __egw : IegwAppLocal
@ -145,6 +144,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
* *
* @type {et2_template | null} * @type {et2_template | null}
* @protected * @protected
* @internal
*/ */
protected _template_widget : etemplate2 | null; protected _template_widget : etemplate2 | null;
protected _template_promise : Promise<boolean>; protected _template_promise : Promise<boolean>;
@ -153,6 +153,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
* Treat the dialog as an atomic operation, and use this promise to notify when * Treat the dialog as an atomic operation, and use this promise to notify when
* "done" instead of (or in addition to) using the callback function. * "done" instead of (or in addition to) using the callback function.
* It gives the button ID and the dialog value. * It gives the button ID and the dialog value.
* @internal
*/ */
protected _complete_promise : Promise<[number, Object]>; protected _complete_promise : Promise<[number, Object]>;
@ -171,6 +172,7 @@ export class Et2Dialog extends Et2Widget(SlotMixin(SlDialog))
* *
* @type {number|null} * @type {number|null}
* @protected * @protected
* @internal
*/ */
protected _button_id : number | null; protected _button_id : number | null;

View File

@ -41,6 +41,10 @@
{% if component.summary %} {% if component.summary %}
{{ component.summary | markdownInline | safe }} {{ component.summary | markdownInline | safe }}
{% endif %} {% endif %}
{% if component.description %}
<h2>Overview</h2>
{{ component.description | markdown | safe}}
{% endif %}
</p> </p>
{# Markdown content #} {# Markdown content #}