Skip to content

Commit 17f6544

Browse files
committed
Dialog: Added option examples.
1 parent b1406a0 commit 17f6544

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

entries/dialog.xml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
<note id="functional-css"/>
1313
<added>1.0</added>
1414
<options>
15-
<option name="autoOpen" default="true">
15+
<option name="autoOpen" default="true" example-value="false">
1616
<desc>If set to <code>true</code>, the dialog will automatically open upon initialization. If <code>false</code>, the dialog will stay hidden until the <a href="#method-open"><code>open()</code></a> method is called.</desc>
1717
<type name="Boolean" />
1818
</option>
19-
<option name="buttons" default="{}">
19+
<option name="buttons" default="{}" example-value='{ Ok: function() { $( this ).dialog( "close" ); } }'>
2020
<desc>Specifies which buttons should be displayed on the dialog. The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object.</desc>
2121
<type name="Object">
2222
<desc>The keys are the button labels and the values are the callbacks for when the associated button is clicked.</desc>
@@ -25,24 +25,24 @@
2525
<desc>Each element of the array must be an object defining the attributes, properties, and event handlers to set on the button.</desc>
2626
</type>
2727
</option>
28-
<option name="closeOnEscape" default="true">
28+
<option name="closeOnEscape" default="true" example-value="false">
2929
<desc>Specifies whether the dialog should close when it has focus and the user presses the esacpe (ESC) key.</desc>
3030
<type name="Boolean" />
3131
</option>
32-
<option name="closeText" default='"close"'>
32+
<option name="closeText" default='"close"' example-value='"hide"'>
3333
<desc>Specifies the text for the close button. Note that the close text is visibly hidden when using a standard theme.</desc>
3434
<type name="String" />
3535
</option>
36-
<option name="dialogClass" default='""'>
36+
<option name="dialogClass" default='""' example-value='"alert"'>
3737
<desc>The specified class name(s) will be added to the dialog, for additional theming.</desc>
3838
<type name="String" />
3939
</option>
4040
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
41-
<option name="draggable" default="true">
41+
<option name="draggable" default="true" example-value="false">
4242
<desc>If set to <code>true</code>, the dialog will be draggable by the title bar. Requires the <a href="/draggable/">jQuery UI Draggable wiget</a> to be included.</desc>
4343
<type name="Boolean" />
4444
</option>
45-
<option name="height" default='"auto"'>
45+
<option name="height" default='"auto"' example-value="400">
4646
<desc>The height of the dialog.</desc>
4747
<type name="Number">
4848
<desc>The height in pixels.</desc>
@@ -51,7 +51,7 @@
5151
<desc>The only supported string value is <code>"auto"</code> which will allow the dialog height to adjust based on its content.</desc>
5252
</type>
5353
</option>
54-
<option name="hide" default="null">
54+
<option name="hide" default="null" example-value='"explode"'>
5555
<desc>If and how to animate the hiding of the dialog.</desc>
5656
<type name="Number">
5757
<desc>
@@ -67,27 +67,27 @@
6767
<desc>If the value is an object, then <code>effect</code>, <code>duration</code>, and <code>easing</code> properties may be provided. The <code>effect</code> property must be the name of a jQuery UI effect. When using a jQuery UI effect that supports additional settings, you may include those settings in the object and they will be passed to the effect. If <code>duration</code> or <code>easing</code> is omitted, then the default values will be used.</desc>
6868
</type>
6969
</option>
70-
<option name="maxHeight" default="false">
70+
<option name="maxHeight" default="false" example-value="600">
7171
<desc>The maximum height to which the dialog can be resized, in pixels.</desc>
7272
<type name="Number" />
7373
</option>
74-
<option name="maxWidth" default="false">
74+
<option name="maxWidth" default="false" example-value="600">
7575
<desc>The maximum width to which the dialog can be resized, in pixels.</desc>
7676
<type name="Number" />
7777
</option>
78-
<option name="minHeight" default="150">
78+
<option name="minHeight" default="150" example-value="200">
7979
<desc>The minimum height to which the dialog can be resized, in pixels.</desc>
8080
<type name="Number" />
8181
</option>
82-
<option name="minWidth" default="150">
82+
<option name="minWidth" default="150" example-value="200">
8383
<desc>The minimum width to which the dialog can be resized, in pixels.</desc>
8484
<type name="Number" />
8585
</option>
86-
<option name="modal" default="false">
86+
<option name="modal" default="false" example-value="true">
8787
<desc>If set to <code>true</code>, the dialog will have modal behavior; other items on the page will be disabled, i.e., cannot be interacted with. Modal dialogs create an overlay below the dialog but above other page elements.</desc>
8888
<type name="Boolean" />
8989
</option>
90-
<option name="position" default='{ my: "center", at: "center", of: window }'>
90+
<option name="position" default='{ my: "center", at: "center", of: window }' example-value='{ my: "left top", at: "left bottom", of: button }'>
9191
<desc>Specifies where the dialog should be displayed. The dialog will handle collisions such that as much of the dialog is visible as possible.</desc>
9292
<type name="Object">
9393
<desc>Identifies the position of the dialog when opened. The <code>of</code> option defaults to the window, but you can specify another element to position against. You can refer to the <a href="/position">jQuery UI Position</a> utility for more details about the various options.</desc>
@@ -99,11 +99,11 @@
9999
<desc>An array containing an <em>x, y</em> coordinate pair in pixel offset from the top left corner of the viewport or the name of a possible string value.</desc>
100100
</type>
101101
</option>
102-
<option name="resizable" default="true">
102+
<option name="resizable" default="true" example-value="false">
103103
<desc>If set to <code>true</code>, the dialog will be resizable. Requires the <a href="/resizable/">jQuery UI Resizable widget</a> to be included.</desc>
104104
<type name="Boolean" />
105105
</option>
106-
<option name="show" default="null">
106+
<option name="show" default="null" example-value='"slow"'>
107107
<desc>If and how to animate the showing of the dialog.</desc>
108108
<type name="Number">
109109
<desc>
@@ -119,19 +119,19 @@
119119
<desc>If the value is an object, then <code>effect</code>, <code>duration</code>, and <code>easing</code> properties may be provided. The <code>effect</code> property must be the name of a jQuery UI effect. When using a jQuery UI effect that supports additional settings, you may include those settings in the object and they will be passed to the effect. If <code>duration</code> or <code>easing</code> is omitted, then the default values will be used.</desc>
120120
</type>
121121
</option>
122-
<option name="stack" default="true">
122+
<option name="stack" default="true" example-value="false">
123123
<desc>Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.</desc>
124124
<type name="Boolean" />
125125
</option>
126-
<option name="title" default='""'>
126+
<option name="title" default='""' example-value='"Dialog Title"'>
127127
<desc>Specifies the title of the dialog. Any valid HTML may be set as the title. The title can also be specified by the <code>title</code> attribute on the dialog source element.</desc>
128128
<type name="String" />
129129
</option>
130-
<option name="width" default="300">
130+
<option name="width" default="300" example-value="500">
131131
<desc>The width of the dialog, in pixels.</desc>
132132
<type name="Number" />
133133
</option>
134-
<option name="zIndex" default="1000">
134+
<option name="zIndex" default="1000" example-value="20">
135135
<desc>The starting z-index for the dialog.</desc>
136136
<type name="Integer" />
137137
</option>

0 commit comments

Comments
 (0)