Skip to content

Commit 4daead3

Browse files
committed
Spinner: Document extension points.
1 parent a2a1915 commit 4daead3

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

entries/spinner.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,40 @@
168168
</method>
169169
<xi:include href="../includes/widget-method-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
170170
</methods>
171+
<extension-points>
172+
<method name="_buttonHtml" return="String">
173+
<desc>
174+
Method that returns HTML to use for the spinner's increment and decrement buttons. Each button must be given a <code>ui-spinner-button</code> class name for the associated events to work.
175+
</desc>
176+
<example>
177+
<desc>Use <code>&lt;button&gt;</code> elements for the increment and decrement buttons.</desc>
178+
<code><![CDATA[
179+
_buttonHtml: function() {
180+
return "" +
181+
"<button class='ui-spinner-button ui-spinner-up'>" +
182+
"<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
183+
"</button>" +
184+
"<button class='ui-spinner-button ui-spinner-down'>" +
185+
"<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
186+
"</button>";
187+
}
188+
]]></code>
189+
</example>
190+
</method>
191+
<method name="_uiSpinnerHtml" return="String">
192+
<desc>
193+
Method that determines the HTML to use to wrap the spinner's <code>&lt;input&gt;</code> element.
194+
</desc>
195+
<example>
196+
<desc>Wrap the spinner with a <code>&lt;div&gt;</code> with no rounded corners.</desc>
197+
<code><![CDATA[
198+
_uiSpinnerHtml: function() {
199+
return "<div class='ui-spinner ui-widget ui-widget-content'></div>";
200+
}
201+
]]></code>
202+
</example>
203+
</method>
204+
</extension-points>
171205
<events>
172206
<xi:include href="../includes/widget-event-create.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
173207
<event name="start">

0 commit comments

Comments
 (0)