@@ -32,33 +32,59 @@ export default class UieCustomDialogsDashboard extends UmbElementMixin(LitElemen
32
32
33
33
render ( ) {
34
34
return html `
35
- <uui- box>
35
+ <umb- code-block copy= "true" > Your last action was : <b> ${ this . message ?? "Nothing clicked yet..." } </ b>
36
+ With data : ${ this . returnData ?? "{}" } </ umb- code-block>
37
+
38
+ <uui- box style= "margin-top:20px;" >
36
39
<div slot= "header" class = "header-bar" >
37
40
<div>
38
41
<h5 class= "title" > Modals <br/ > <span class= "sub-header" > Modals are the mechanism to display content on-top of the current display .</ span> </ h5>
39
42
</ div>
40
43
</ div>
41
44
<div slot= "header-actions" >
42
45
<uui- butto n href= "https://apidocs.umbraco.com/v14/ui/?path=/docs/uui_layout-modals-documentation--docs" target = "_blank" look = "primary" color = "positive" >
43
- <uui- badge slot= "extra" label = "A11Y label" > !</ uui- badge>
44
46
<uui- icon name= "info" > </ uui- icon>
45
47
View the Storybook library </ uui- butto n>
48
+ <uui- butto n href= "https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/modals/confirm-dialog" target = "_blank" look = "primary" color = "positive" >
49
+ <uui- icon name= "info" > </ uui- icon>
50
+ View the dialog tutorial </ uui- butto n>
46
51
</ div>
47
52
<slot>
48
- <p> The overlay service has a confirm option built , in with this you can quickly create a confirm dialog , to present your users with a simple option . The term "Modal" covers both types of pop-overs ; <b> Dialogs </ b> and <b> Sidebars </ b> .</ p>
49
- <!- - https: / / docs.umbraco .com / umbraco- cms/ custo mizing/ extending- overview/ extension- types/ modals/ confirm- dialog - - >
50
- <p> You can checkout all of the prebuilt modals by checking the <a href= "https://github.com/umbraco/Umbraco.CMS.Backoffice/tree/849368269126fa816aca394e8e41ef1703cfe0c2/src/packages/core/modal/token" target = "_blank">GitHub Source</a></p>
53
+ <p> The term "Modal" covers both types of pop-overs ; <b> Dialogs </ b> and <b> Sidebars </ b> . You can see examples below that define how you would open an Umbraco pre-built modal .</ p>
54
+
55
+ <p> Modals come in two parts ; the element and the to ken.<br/ >
56
+ The <b> token </ b> is responsible for triggering the modal to be displayed using the <a href= "https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/modals#basic-usage" target = "_blank"> ModalManagerContext </ a> <br/ >
57
+ The <b> element </ b> is the UI components and is responsible for showing the HTML on screen , along with any in-modal functionality
58
+ </ p>
59
+
60
+ <p> You can see all of the prebuilt modals by checking the <a href= "https://github.com/umbraco/Umbraco.CMS.Backoffice/tree/849368269126fa816aca394e8e41ef1703cfe0c2/src/packages/core/modal/token" target = "_blank">GitHub Source</a></p>
51
61
52
62
<uui-button look=" primary" color=" default" @click=${ this . _openConfirmationModal } >Confirm Dialog</uui-button>
53
63
<uui-button look=" primary" color=" danger" @click=${ this . _openDebugDialog } >Debug Sidebar</uui-button>
54
64
<uui-button look=" secondary" color=" danger" @click=${ this . _openCodeDialog } >Code Editor Sidebar</uui-button>
55
- <uui-button look=" primary" color=" warning" @click=${ this . _openCustomSidebar } >Custom Sidebar</uui-button>
56
- <uui-button look=" outline" color=" positive" @click=${ this . _openCustomModal } >Custom Dialog</uui-button>
57
65
58
- <p>Your last action was: <b> ${ this . message ?? "Nothing clicked yet..." } </b> </p>
59
- <p>With data: <code> ${ this . returnData ?? "{}" } </code></p>
66
+ <p></p>
67
+ <p></code></p>
60
68
61
69
</slot>
70
+ </uui-box>
71
+ <uui-box style=" margin-top: 20px;">
72
+ <div slot=" header" class=" header-bar">
73
+ <div>
74
+ <h5 class=" title">Custom Modals</h5>
75
+ </div>
76
+ </div>
77
+ <div slot=" header-actions">
78
+ <uui-button href=" https: / / docs.umbraco .com / umbraco- cms/ custo mizing/ extending- overview/ extension- types/ modals/ custo m- modals" target=" _blank" look=" primary" color=" positive">
79
+ <uui-icon name=" info"></uui-icon>
80
+ View the custom modal tutorial</uui-button>
81
+ </div>
82
+ <slot>
83
+ <p>When you have specific requirements and the inbuilt modals don't suit your needs, you can create your own custom modal and put anything you want in there.</p>
84
+
85
+ <uui-button look=" primary" color=" warning" @click=${ this . _openCustomSidebar } >Custom Sidebar</uui-button>
86
+ <uui-button look=" outline" color=" positive" @click=${ this . _openCustomModal } >Custom Dialog</uui-button>
87
+ </slot>
62
88
</uui-box>`
63
89
}
64
90
@@ -71,11 +97,10 @@ export default class UieCustomDialogsDashboard extends UmbElementMixin(LitElemen
71
97
const ctx = this . #modalManagerContext?. open ( this , UMB_CODE_EDITOR_MODAL , {
72
98
data : {
73
99
headline :"text" ,
74
- content :"Enter something" ,
100
+ content :"Enter something and it will be sent back from the modal " ,
75
101
language :"javascript"
76
102
} ,
77
103
} ) ;
78
-
79
104
ctx ?. onSubmit ( ) . then ( ( e ) => {
80
105
this . _handleSubmit ( true , JSON . stringify ( e ) ) ;
81
106
} ) . catch ( ( ) => {
0 commit comments