File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /// <reference path="../types/index.d.ts" />
2+
13( function ( ) {
24
35var plaster_action ;
Original file line number Diff line number Diff line change 1+ interface DialogFormElement {
2+ label : string
3+ type : string
4+ nocolon ?: boolean
5+ readonly ?: boolean
6+ value ?: any
7+ placeholder ?: string
8+ text ?: string
9+ colorpicker ?: any
10+ min ?: number
11+ max ?: number
12+ step ?: number
13+ height ?: number
14+ options : object
15+ }
16+ interface DialogOptions {
17+ title : string
18+ id : string
19+ /**
20+ * Array of HTML object strings for each line of content in the dialog.
21+ */
22+ lines : string [ ]
23+ /**
24+ * If false, the confirm button of the dialog is disabled
25+ */
26+ confirmEnabled ?: boolean
27+ /**
28+ * If false, the cancel button of the dialog is disabled
29+ */
30+ cancelEnabled ?: boolean
31+ /**
32+ * Function to execute when the user confirms the dialog
33+ */
34+ onConfirm ?: ( formResult : object ) => void
35+ /**
36+ * Function to execute when the user cancels the dialog
37+ */
38+ onCancel ?: ( ) => void
39+ /**
40+ * Creates a form in the dialog
41+ */
42+ form ?: {
43+ [ formElement : string ] : string | DialogFormElement
44+ }
45+ }
46+
47+ class Dialog {
48+ constructor ( options : DialogOptions )
49+ show : ( ) => Dialog
50+ hide : ( ) => Dialog
51+ /**
52+ * Triggers the confirm event of the dialog.
53+ */
54+ confirm : ( ) => void
55+ /**
56+ * Triggers the cancel event of the dialog.
57+ */
58+ cancel : ( ) => void
59+
60+ }
You can’t perform that action at this time.
0 commit comments