From 4a2994b53689fc7114ce0d8630a9cf54302e507b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Str=C3=A4=C3=9Fer?= Date: Mon, 11 Jul 2022 12:36:30 +0200 Subject: [PATCH] Update README.md Updated README.md for the dialog extension --- source/extensions/dialog/README.md | 379 +++++++++++++++-------------- 1 file changed, 197 insertions(+), 182 deletions(-) diff --git a/source/extensions/dialog/README.md b/source/extensions/dialog/README.md index 9c8404e..484a9e3 100644 --- a/source/extensions/dialog/README.md +++ b/source/extensions/dialog/README.md @@ -1,226 +1,241 @@ # jsPanel.dialog +This extension adds the property dialog to the global object **jsPanel**. `jsPanel.dialog` offers an easy-to-use interface for dialog elements to virtually any jsPanel. It also offers a `modal()` function to create modal dialogs as well as `alert()`, `confirm()` and `prompt()` functions. -This extension adds an easy-to-use interface for dialog elements to virtually any jsPanel. It also offers a `modal` function to create modal dialogs as well as `alert()`, `confirm()` and `prompt()` functions. - -The extension works with the `name` attribute to recognize dialog elements. Unlike HTML forms, any HTML can have a `name` atribute, including spans, paragraphs and `div`s. - -The extension requires the `jsDialog.modal` extension in order to work with modal dialogs. +The extension requires the jsPanel.modal extension in order to work with modal dialogs. **This extension requires browsers that support ES6 (most modern browsers do). Internet Explorer, for example, is NOT supported!** -## HTML - -The extension accepts several different ways to specify the HTML to display. - -### Nodes or DocumentFragments - -Supply the node to display. - -### CSS Selectors - -Supply the CSS selector of the HTML to display. This approach has two limitations. First, you should refrain from using IDs, because the extension deep-clones the HTML, thus creating multiple IDs with the same name. Second, the HTML should be initially invisible by adding `style="display:none"` to the dialog `
`. - -### CSS Selectors inside a "template" Element - -The extension searches for a `