Permalink
Browse files

Merge branch 'master' of github.com:scottgonzalez/jquery-docs

  • Loading branch information...
2 parents 9951cb1 + 8413f25 commit 8c60d580293b960ed30bfed598b6b7debdc94e43 @rdworth rdworth committed Jul 22, 2011
View
@@ -3,6 +3,9 @@
<xsl:template match="/">
<html>
+<link href="http://static.jquery.com/api/style.css" rel="stylesheet" />
+<link href="http://static.jquery.com/api/prettify.css" rel="stylesheet" />
+<div id="jq-siteContain" class="api-jquery-com"><div id="jq-primaryContent">
<fieldset class="toc">
<legend>Contents</legend>
<ul class="toc-list">
@@ -16,15 +19,18 @@
<xsl:text>, </xsl:text>
</xsl:if>
<xsl:if test="@optional">[ </xsl:if>
- <xsl:value-of select="@name" />
+ <!-- TODO add @type?! -->
+ <xsl:value-of select="@name" />
<xsl:if test="@optional"> ]</xsl:if>
</xsl:for-each>
<xsl:text> </xsl:text></xsl:if>)</xsl:if>
<xsl:text> </xsl:text>
+ <!-- TODO why put the desc in the title?? -->
<span class="desc">
<xsl:value-of select="desc" />
</span>
</a>
+ <!-- Outdated? There's no type=method on entry elements anymore? -->
<xsl:if test="@type='method'">
<ul>
<xsl:for-each select="signature">
@@ -61,7 +67,7 @@
<xsl:variable name="entry-type" select="@type" />
<xsl:variable name="entry-index" select="position()" />
<xsl:variable name="number-examples" select="count(example)" />
-<div class="entry {@type}" id="{concat(@name,position())}">
+<div class="entry {@type} jq-box" id="{concat(@name,position())}">
<h2>
<span class="name"><xsl:value-of select="@name" /><xsl:if test="@type='method'">(<xsl:if test="signature/argument"><xsl:text> </xsl:text>
<xsl:for-each select="signature[1]/argument">
@@ -105,6 +111,76 @@
</xsl:for-each>
</dl>
</xsl:if>
+ <xsl:if test="methods">
+ <h3>Methods</h3>
+ <dl>
+ <xsl:for-each select="methods[1]/method">
+ <xsl:variable name="method-name" select="@name" />
+ <xsl:variable name="method-type" select="@type" />
+ <dt>
+ <xsl:attribute name="id">method-<xsl:value-of select="$method-name" /></xsl:attribute>
+ <xsl:if test="added">
+ <span class="versionAdded">version added: <xsl:value-of select="added" /></span>
+ </xsl:if>
+ <h4 class="name">
+ <xsl:value-of select="$method-name" />
+ </h4>
+ <span class="type"><xsl:value-of select="$method-type" /></span>
+ </dt>
+ <dd><xsl:copy-of select="desc/node()" /></dd>
+ <!-- TODO add arguments -->
+ </xsl:for-each>
+ </dl>
+ </xsl:if>
+ <xsl:if test="events">
+ <h3>Events</h3>
+ <dl>
+ <xsl:for-each select="events[1]/event">
+ <xsl:variable name="event-name" select="@name" />
+ <xsl:variable name="event-type" select="@type" />
+ <dt>
+ <xsl:attribute name="id">event-<xsl:value-of select="$event-name" /></xsl:attribute>
+ <xsl:if test="added">
+ <span class="versionAdded">version added: <xsl:value-of select="added" /></span>
+ </xsl:if>
+ <h4 class="name">
+ <xsl:value-of select="$event-name" />
+ </h4>
+ <span class="type"><xsl:value-of select="$event-type" /></span>
+ </dt>
+ <dd><xsl:copy-of select="desc/node()" /></dd>
+ <!-- TODO refactor to reuse elsewhere -->
+ <xsl:if test="argument">
+ <xsl:text> </xsl:text>
+ <ul>
+ <xsl:for-each select="argument">
+ <li>
+ <!-- TODO take null=true into account -->
+ <xsl:value-of select="@name" />
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="@type" />
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="desc" />
+ <ul>
+ <xsl:for-each select="property">
+ <li>
+ <xsl:value-of select="@name" />
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="@type" />
+ <xsl:if test="desc">
+ <xsl:text>, </xsl:text>
+ <xsl:value-of select="desc" />
+ </xsl:if>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </li>
+ </xsl:for-each>
+ </ul>
+ </xsl:if>
+ </xsl:for-each>
+ </dl>
+ </xsl:if>
<xsl:if test="signature">
<h3>Signatures:</h3>
<ul class="signatures">
@@ -194,7 +270,7 @@
</div>
</xsl:for-each>
-
+</div></div>
</html>
</xsl:template>
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
<entry name="accordion" namespace="fn" type="Widget" widgetnamespace="ui">
+ <!-- TODO needs desc/longdesc? -->
+ <desc>Short description</desc>
+ <longdesc>Long description</longdesc>
<created>1.0</created>
<options>
<option name="active" default="0">
@@ -39,6 +42,7 @@
</option>
</options>
<methods>
+ <!-- TODO add more methods, and actual signatures and types and everything -->
<method name="refresh">
<desc>
Recomputes panel dimensions.
@@ -59,6 +63,7 @@
<desc>
Extra event data for the ui accordion beforeActivate event
</desc>
+ <!-- TODO describe properties -->
<property name="newContent" type="jQuery" />
<property name="newHeader" type="jQuery" />
<property name="oldContent" type="jQuery" />
@@ -75,11 +80,14 @@
<desc>
Extra event data for the ui accordion activate event
</desc>
- <property name="newContent" type="jQuery" />
+ <property name="newContent" type="jQuery">
+ <desc>Refers to the activated content panel</desc>
+ </property>
<property name="newHeader" type="jQuery" />
<property name="oldContent" type="jQuery" />
<property name="oldHeader" type="jQuery" />
</argument>
</event>
</events>
+ <!-- TODO add examples -->
</entry>
View
@@ -0,0 +1,44 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="drop" namespace="effect" type="effect">
+ <desc>
+ The drop effect hides or shows an element fading in/out and sliding in a direction.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element by dropping in the direction</dd>
+ <dt>show</dt>
+ <dd>Shows the element by undropping from the direction. This seems inverted from the hide.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="direction" type="String" default='"left"'>
+ <desc>
+ <p>The direction the element will fall to "hide" the element, or the direction from which the element will be revealed.</p>
+ <p>Possible Values</p>
+ <dl>
+ <dt>up</dt>
+ <dt>down</dt>
+ <dt>left</dt>
+ <dt>right</dt>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ </options>
+</entry>
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="explode" namespace="effect" type="effect">
+ <desc>
+ The explode effect hides or shows an element by splitting it into pieces.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element.</dd>
+ <dt>show</dt>
+ <dd>Shows the element.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ <option name="pieces" type="Number" default="9">
+ <desc>The number of pieces to explode, should be a perfect square, any other values are rounded to the nearest square.</desc>
+ </option>
+ </options>
+</entry>
View
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="fade" namespace="effect" type="effect">
+ <desc>
+ The fade effect hides or shows an element by fading it.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element.</dd>
+ <dt>show</dt>
+ <dd>Shows the element.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ </options>
+</entry>
View
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="fold" namespace="effect" type="effect">
+ <desc>
+ The fold effect hides or shows an element by folding it.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element.</dd>
+ <dt>show</dt>
+ <dd>Shows the element.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ <option name="size" type="Number|String" default="15">
+ <desc>The size of the "folded" element, can be a number representing px, or a string containing a percentage I.E. "50%"</desc>
+ </option>
+ <option name="horizFirst" type="Boolean" default="false">
+ <desc>If the horizontal direction happens first when hiding. Remember, showing inverts hiding.</desc>
+ </option>
+ </options>
+</entry>
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="highlight" namespace="effect" type="effect">
+ <desc>
+ The highlight effect hides or shows an element by animating its background color first.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element.</dd>
+ <dt>show</dt>
+ <dd>Shows the element.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ <option name="color" type="String" default='"#ffff99"'>
+ <desc>The background color used during the animation</desc>
+ </option>
+ </options>
+</entry>
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="../../entries2html.xsl" ?>
+<entry name="pulsate" namespace="effect" type="effect">
+ <desc>
+ The pulsate effect hides or shows an element by pulsing it in or out.
+ </desc>
+ <options>
+ <option name="mode" type="String" default='"hide"'>
+ <desc>
+ <p>UI Effect Mode</p>
+ <p>Possible Values: </p>
+ <dl>
+ <dt>hide</dt>
+ <dd>Hides the element.</dd>
+ <dt>show</dt>
+ <dd>Shows the element.</dd>
+ <dt>toggle</dt>
+ <dd>Will use <code>hide</code> or <code>show</code> depending on the current visibility of the element</dd>
+ <dt>effect</dt>
+ <dd>Just pulsates.</dd>
+ </dl>
+ </desc>
+ </option>
+ <option name="duration" type="Number" default="400">
+ <desc>The number of ms the animation will run for</desc>
+ </option>
+ <option name="easing" type="String" default='"swing"'>
+ <desc>The easing function to use</desc>
+ </option>
+ <option name="complete" type="function">
+ <desc>A callback function, executed when the effect completes</desc>
+ </option>
+ <option name="times" type="Number" default="5">
+ <desc>The number of times the element should pulse. An extra half pulse is added for hide/show</desc>
+ </option>
+ </options>
+</entry>
Oops, something went wrong.

0 comments on commit 8c60d58

Please sign in to comment.