Permalink
Browse files

Added support for <signature> in widget methods. Merged all option me…

…thods.
  • Loading branch information...
1 parent 343cc8f commit 7e3cc045aa1c09a23af053c4d7752a5208e3e7a0 @scottgonzalez scottgonzalez committed Aug 21, 2012
View
@@ -147,10 +147,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="refresh">
<desc>Recompute the height of the accordion panels. Results depend on the content and the <a href="#option-heightStyle"><code>heightStyle</code></a> option.</desc>
</method>
View
@@ -154,10 +154,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="search">
<desc>Triggers a <a href="#event-search"><code>search</code></a> event and invokes the data source if the event is not canceled. Can be used by a selectbox-like button to open the suggestions when clicked. When invoked with no parameters, the current input's value is used. Can be called with an empty string and <code>minLength: 0</code> to display all items.</desc>
<argument name="value" type="String" optional="true">
View
@@ -40,10 +40,7 @@
<method name="refresh">
<desc>Refreshes the visual state of the button. Useful for updating button state after the native element's checked or disabled state is changed programmatically.</desc>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -265,10 +265,7 @@
<method name="open">
<desc>Opens the dialog.</desc>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -189,10 +189,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -150,10 +150,7 @@ ui.draggable represents the draggable.</desc>
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -129,10 +129,7 @@
<desc>What triggered the focus to move.</desc>
</argument>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="previous">
<desc>
Moves active state to previous menu item.
View
@@ -42,10 +42,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="value">
<desc>Gets or sets the current value of the progressbar.</desc>
<argument name="value" type="Number" optional="true">
View
@@ -194,10 +194,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -120,10 +120,7 @@
<method name="refresh">
<desc> Refresh the position and size of each selectee element. This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.</desc>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -115,10 +115,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="value">
<desc>Gets or sets the value of the slider. For single handle sliders.</desc>
<argument name="value" type="Number" optional="true">
View
@@ -467,10 +467,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="refresh">
<desc>Refresh the sortable items. Custom trigger the reloading of all sortable items, causing new items to be recognized.</desc>
</method>
View
@@ -92,10 +92,7 @@
<xi:include href="../inherits/widget-destroy.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-disable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-enable.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<method name="pageDown">
<desc>
Decrements the value by the specified number of pages, as defined by the <a href="#option-page"><code>page</code></a> option. Without the parameter, a single page is decremented.
View
@@ -166,10 +166,7 @@
<desc>The zero-baesd index of the tab the be loaded. Instead of an index, the <code>href</code> of the tab may be passed.</desc>
</argument>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<example>
View
@@ -83,10 +83,7 @@
<desc>What triggered the tooltip to open.</desc>
</argument>
</method>
- <xi:include href="../inherits/widget-get-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-get-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
- <xi:include href="../inherits/widget-set-options.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
+ <xi:include href="../inherits/widget-method-option.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
<xi:include href="../inherits/widget-widget.xml" xmlns:xi="http://www.w3.org/2003/XInclude"/>
</methods>
<events>
View
@@ -349,31 +349,32 @@
<header>
<h2 class="underline">Methods</h2>
</header>
- <ul>
- <xsl:for-each select="methods/method">
- <li id="method-{@name}">
+ <xsl:for-each select="methods/method">
+ <xsl:variable name="method-name" select="@name"/>
+ <div id="method-{$method-name}">
+ <xsl:for-each select="signature | self::node()[count(signature) = 0]">
<xsl:call-template name="widget-method-event">
<xsl:with-param name="entry-name" select="$entry-name"/>
+ <xsl:with-param name="method-name" select="$method-name"/>
</xsl:call-template>
- </li>
- </xsl:for-each>
- </ul>
+ </xsl:for-each>
+ </div>
+ </xsl:for-each>
</section>
</xsl:if>
<xsl:if test="events">
<section id="events">
<header>
<h2 class="underline">Events</h2>
</header>
- <ul>
- <xsl:for-each select="events/event">
- <li id="event-{@name}">
- <xsl:call-template name="widget-method-event">
- <xsl:with-param name="entry-name" select="$entry-name"/>
- </xsl:call-template>
- </li>
- </xsl:for-each>
- </ul>
+ <xsl:for-each select="events/event">
+ <div id="event-{@name}">
+ <xsl:call-template name="widget-method-event">
+ <xsl:with-param name="entry-name" select="$entry-name"/>
+ <xsl:with-param name="method-name" select="@name"/>
+ </xsl:call-template>
+ </div>
+ </xsl:for-each>
</section>
</xsl:if>
</xsl:template>
@@ -579,10 +580,11 @@
<xsl:template name="widget-method-event">
<xsl:param name="entry-name"/>
+ <xsl:param name="method-name"/>
<h3>
<xsl:call-template name="method-signature">
- <xsl:with-param name="method-name" select="@name"/>
+ <xsl:with-param name="method-name" select="$method-name"/>
</xsl:call-template>
</h3>
<div>
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<method name="option" return="Object">
- <desc>
- Gets the value currently associated with the specified <code>optionName</code>.
- </desc>
- <argument name="optionName" type="String"></argument>
-</method>
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<method name="option" return="Object">
- <desc>
- Gets an object containing key/value pairs representing the current <placeholder name="title"/> options hash.
- </desc>
-</method>
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<method name="option" return="jQuery">
+ <desc>
+ Sets one or more options for the <placeholder name="title"/>.
+ </desc>
+ <signature>
+ <desc>Gets the value currently associated with the specified <code>optionName</code>.</desc>
+ <argument name="optionName" type="String">
+ <desc>The name ofthe option to get.</desc>
+ </argument>
+ </signature>
+ <signature>
+ <desc>Gets an object containing key/value pairs representing the current <placeholder name="title"/> options hash.</desc>
+ </signature>
+ <signature>
+ <desc>Sets the value of the <placeholder name="title"/> option associated with the specified <code>optionName</code>.</desc>
+ <argument name="optionName" type="String">
+ <desc>The name of the option to set.</desc>
+ </argument>
+ <argument name="value" type="Object">
+ <desc>A value to set for the option.</desc>
+ </argument>
+ </signature>
+ <signature>
+ <desc>Sets one or more options for the <placeholder name="title"/>.</desc>
+ <argument name="options" type="Object">
+ <desc>A map of option-value pairs to set.</desc>
+ </argument>
+ </signature>
+</method>
@@ -1,8 +0,0 @@
-<?xml version="1.0"?>
-<method name="option" return="jQuery">
- <desc>
- Sets the value of the <placeholder name="title"/> option associated with the specified <code>optionName</code>.
- </desc>
- <argument name="optionName" type="String"></argument>
- <argument name="value" type="Object"></argument>
-</method>
@@ -1,7 +0,0 @@
-<?xml version="1.0"?>
-<method name="option" return="jQuery">
- <desc>
- Sets multiple <placeholder name="title"/> options at once by providing an options object.
- </desc>
- <argument name="options" type="Object"></argument>
-</method>

0 comments on commit 7e3cc04

Please sign in to comment.