Skip to content

Commit aff0417

Browse files
shahrashipscottgonzalez
authored andcommitted
Added example values for accordion, autocomplete, button, datepicker.
1 parent 94fbada commit aff0417

File tree

5 files changed

+89
-62
lines changed

5 files changed

+89
-62
lines changed

entries/accordion.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<note id="functional-css"/>
3737
<added>1.0</added>
3838
<options>
39-
<option name="active" default="0">
39+
<option name="active" default="0" example-value="2">
4040
<desc>
4141
Which panel is currently open.
4242
</desc>
@@ -47,7 +47,7 @@
4747
<desc>The zero-based index of the panel that is active (open). A negative value selects panels going backward from the last panel.</desc>
4848
</type>
4949
</option>
50-
<option name="animate" default="{}">
50+
<option name="animate" default="{}" example-value='"bounceslide"'>
5151
<desc>If and how to animate changing panels.</desc>
5252
<type name="Boolean">
5353
<desc>A value of <code>false</code> will disable animations.</desc>
@@ -67,19 +67,19 @@
6767
</desc>
6868
</type>
6969
</option>
70-
<option name="collapsible" type="Boolean" default="false">
70+
<option name="collapsible" type="Boolean" default="false" example-value="true">
7171
<desc>Whether all the sections can be closed at once. Allows collapsing the active section.</desc>
7272
</option>
7373
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
74-
<option name="event" type="String" default='"click"'>
74+
<option name="event" type="String" default='"click"' example-value='"mouseover"'>
7575
<desc>The event that accordion headers will react to in order to activate the associated panel. Multiple events can be specificed, separated by a space.</desc>
7676
</option>
77-
<option name="header" type="Selector" default='"> li > :first-child,> :not(li):even"'>
77+
<option name="header" type="Selector" default='"> li > :first-child,> :not(li):even"' example-value='"h3"'>
7878
<desc>
7979
<p>Selector for the header element, applied via <code>.find()</code> on the main accordion element. Content panels must be the sibling immedately after their associated headers.</p>
8080
</desc>
8181
</option>
82-
<option name="heightStyle" type="String" default='"auto"'>
82+
<option name="heightStyle" type="String" default='"auto"' example-value='"fill"'>
8383
<desc>
8484
<p>Controls the height of the accordion and each panel. Possible values:</p>
8585
<ul>
@@ -89,7 +89,7 @@
8989
</ul>
9090
</desc>
9191
</option>
92-
<option name="icons" type="Object" default='{ "header": "ui-icon-triangle-1-e", "activeHeader": "ui-icon-triangle-1-s" }'>
92+
<option name="icons" type="Object" default='{ "header": "ui-icon-triangle-1-e", "activeHeader": "ui-icon-triangle-1-s" }' example-value='{ "header": "ui-icon-plus", "headerSelected": "ui-icon-minus" }'>
9393
<desc>
9494
<p>Icons to use for headers, matching an icon defined by the jQuery UI CSS Framework. Set to <code>false</code> to have no icons displayed.</p>
9595
<ul>

entries/autocomplete.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,23 @@
2929
<note id="functional-css"/>
3030
<added>1.8</added>
3131
<options>
32-
<option name="appendTo" type="Selector" default='"body"'>
32+
<option name="appendTo" type="Selector" default='"body"' example-value='"#someElem"'>
3333
<desc>Which element the menu should be appended to. Override this when the autocomplete is inside a <code>position: fixed</code> element. Otherwise the popup menu would still scroll with the page.</desc>
3434
</option>
35-
<option name="autoFocus" type="Boolean" default="false">
35+
<option name="autoFocus" type="Boolean" default="false" example-value="true">
3636
<desc>If set to <code>true</code> the first item will automatically be focused when the menu is shown.</desc>
3737
</option>
38-
<option name="delay" type="Integer" default="300">
38+
<option name="delay" type="Integer" default="300" example-value="500">
3939
<desc>The delay in milliseconds between when a keystroke occurs and when a search is performed. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.</desc>
4040
</option>
4141
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
42-
<option name="minLength" type="Integer" default="1">
42+
<option name="minLength" type="Integer" default="1" example-value="0">
4343
<desc>The minimum number of characters a user must type before a search is performed. Zero is useful for local data with just a few items, but a higher value should be used when a single character search could match a few thousand items.</desc>
4444
</option>
45-
<option name="position" type="Object" default='{ my: "left top", at: "left bottom", collision: "none" }'>
45+
<option name="position" type="Object" default='{ my: "left top", at: "left bottom", collision: "none" }' example-value='{ my : "right top", at: "right bottom" }'>
4646
<desc>Identifies the position of the suggestions menu in relation to the associated input element. The <code>of</code> option defaults to the input element, 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>
4747
</option>
48-
<option name="source" default="none; must be specified">
48+
<option name="source" default="none; must be specified" example-value='[ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ]'>
4949
<desc>
5050
Defines the data to use, must be specified.
5151
<p>Independent of the variant you use, the label is always treated as text. If you want the label to be treated as html you can use <a href="https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js">Scott González' html extension</a>. The demos all focus on different variations of the <code>source</code> option - look for one that matches your use case, and check out the code.</p>

entries/button.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@
1515
<added>1.8</added>
1616
<options>
1717
<xi:include href="../includes/widget-option-disabled.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
18-
<option name="icons" default="{ primary: null, secondary: null }">
18+
<option name="icons" default="{ primary: null, secondary: null }" example-value='{ primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }'>
1919
<desc>Icons to display, with or without text (see <a href="#option-text"><code>text</code></a> option). By default, the primary icon is displayed on the left of the label text and the secondary is displayed on the right. The positioning can be controlled via CSS. The value for the <code>primary</code> and <code>secondary</code> properties must be a class name, e.g., <code>"ui-icon-gear"</code>. For using only one icon: <code>icons: { primary: "ui-icon-locked" }</code>. For using two icons: <code>icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }</code>.</desc>
2020
<type name="Object" />
2121
</option>
22-
<option name="label" default="null">
22+
<option name="label" default="null" example-value='"custom label"'>
2323
<desc>Text to show in the button. When not specified (<code>null</code>), the element's HTML content is used, or its <code>value</code> attribute if the element is an input element of type submit or reset, or the HTML content of the associated label element if the element is an input of type radio or checkbox.</desc>
2424
<type name="String" />
2525
</option>
26-
<option name="text" default="true">
26+
<option name="text" default="true" example-value="false">
2727
<desc>Whether to show the label. When set to <code>false</code> no text will be displayed, but the <a href="#options-icons"><code>icons</code></a> option must be enabled, otherwise the <code>text</code> option will be ignored.</desc>
2828
<type name="Boolean" />
2929
</option>

0 commit comments

Comments
 (0)