Browse Source

adds behavior/settings documentation to transition

pull/80/head
jlukic 11 years ago
parent
commit
eb3576abbe
10 changed files with 246 additions and 10 deletions
  1. 2
      build/less/modules/transition.js
  2. 2
      build/minified/modules/transition.js
  3. 2
      build/uncompressed/modules/transition.js
  4. 38
      node/src/documents/modules/form.html.eco
  5. 2
      node/src/documents/modules/sidebar.html.eco
  6. 202
      node/src/documents/modules/transition.html.eco
  7. 2
      node/src/files/build/less/modules/transition.js
  8. 2
      node/src/files/build/minified/modules/transition.js
  9. 2
      node/src/files/build/uncompressed/modules/transition.js
  10. 2
      src/modules/transition.js

2
build/less/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

2
build/minified/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

2
build/uncompressed/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

38
node/src/documents/modules/form.html.eco

@ -16,7 +16,8 @@ type : 'UI Behavior'
<div class="peek">
<div class="ui vertical pointing secondary menu">
<a class="item">Usage</a>
<a class="active item">Usage</a>
<a class="item">Behavior</a>
<a class="item">Settings</a>
</div>
</div>
@ -231,6 +232,41 @@ type : 'UI Behavior'
</div>
</div>
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').form('behavior name', argumentOne, argumentTwo)</code>
<table class="ui definition celled table segment">
<tr>
<td>submit</td>
<td>Submits selected form</td>
</tr>
<tr>
<td>validate form</td>
<td>Validates form and calls onSuccess or onFailure</td>
</tr>
<tr>
<td>get change event</td>
<td>gets browser property change event</td>
</tr>
<tr>
<td>get field(id)</td>
<td>Returns element with maching name, id, or data-validate metadata to ID</td>
</tr>
<tr>
<td>get validation(element)</td>
<td>Returns validation rules for a given field</td>
</tr>
<tr>
<td>has field(identifier)</td>
<td>Returns whether a field exists</td>
</tr>
<tr>
<td>add errors(errors)</td>
<td>Adds errors to form, given an array errors</td>
</tr>
</table>
<h2 class="ui dividing header">Settings</h2>
<h3 class="ui header">

2
node/src/documents/modules/sidebar.html.eco

@ -244,8 +244,6 @@ type : 'UI Module'
<td>add body css</td>
<td>Adds stylesheet to page head to trigger sidebar animations</td>
</tr>
</table>
</div>

202
node/src/documents/modules/transition.html.eco

@ -212,7 +212,209 @@ type : 'UI Module'
<h2 class="ui dividing header">Behavior</h2>
All the following behaviors can be called using the syntax <code>$('.foo').transition('behavior name', argumentOne, argumentTwo)</code>
<table class="ui definition celled table segment">
<tr>
<td>repaint</td>
<td>Triggers reflow on element</td>
</tr>
<tr>
<td>looping</td>
<td>Enables animation looping</td>
</tr>
<tr>
<td>remove looping</td>
<td>Removes looping state from element</td>
</tr>
<tr>
<td>stop</td>
<td>Stops current transition</td>
</tr>
<tr>
<td>start</td>
<td>Restarts a stopped transition</td>
</tr>
<tr>
<td>toggle</td>
<td>Toggles current transition on/off</td>
</tr>
<tr>
<td>duration(duration)</td>
<td>Modifies element animation duration</td>
</tr>
<tr>
<td>save conditions</td>
<td>Saves all class names and styles to cache to be retrieved after animation</td>
</tr>
<tr>
<td>restore conditions</td>
<td>Adds back cached names and styles to element</td>
</tr>
<tr>
<td>get animation name</td>
<td>Returns vendor prefixed animation property for animationname</td>
</tr>
<tr>
<td>get animation event</td>
<td>Returns vendor prefixed animation property for animationend</td>
</tr>
<tr>
<td>is animating</td>
<td>Returns whether transition is currently occurring</td>
</tr>
<tr>
<td>is looping</td>
<td>Returns whether animation looping is set</td>
</tr>
<tr>
<td>is visible</td>
<td>Returns whether element is visible</td>
</tr>
</table>
<h2 class="ui dividing header">Settings</h2>
<h3 class="ui header">
Transition Settings
<div class="sub header">Form settings modify the transition behavior</div>
</h3>
<table class="ui red celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>animation</td>
<td>fade</td>
<td>Named animation event to used. Must be defined in css.</td>
</tr>
<tr>
<td>duration</td>
<td>700ms</td>
<td>Duration of the css transition animation</td>
</tr>
<tr>
<td>queue</td>
<td>true</td>
<td>Whether to automatically queue animation if another is occurring</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
Callbacks
<div class="sub header">Callback settings specify a function to occur after a specific behavior.</div>
</h3>
<table class="ui celled green definition table segment">
<thead>
<th class="four wide">Setting</th>
<th>Context</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>complete</td>
<td>transitioned element</td>
<td>Callback on each transition complete</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
DOM Settings
<div class="sub header">DOM settings specify how this module should interface with the DOM</div>
</h3>
<table class="ui celled purple definition table segment">
<thead>
<th>Setting</th>
<th class="six wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>namespace</td>
<td>transition</td>
<td>Event namespace. Makes sure module teardown does not effect other events attached to an element.</td>
</tr>
<tr>
<td>className</td>
<td>
<div class="code">
className : {
animating : 'animating',
disabled : 'disabled',
hidden : 'hidden',
inward : 'in',
loading : 'loading',
looping : 'looping',
outward : 'out',
transition : 'ui transition',
visible : 'visible'
}
</div>
</td>
<td>Class names used to attach style to state</td>
</tr>
</tbody>
</table>
<div class="ui horizontal divider"><i class="icon setting"></i></div>
<h3 class="ui header">
Debug Settings
<div class="sub header">Debug settings controls debug output to the console</div>
</h3>
<table class="ui blue celled definition table segment">
<thead>
<th>Setting</th>
<th class="four wide">Default</th>
<th>Description</th>
</thead>
<tbody>
<tr>
<td>name</td>
<td>Transition</td>
<td>Name used in debug logs</td>
</tr>
<tr>
<td>debug</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>performance</td>
<td>True</td>
<td>Provides standard debug output to console</td>
</tr>
<tr>
<td>verbose</td>
<td>True</td>
<td>Provides ancillary debug output to console</td>
</tr>
<tr>
<td>errors</td>
<td colspan="2">
<div class="code">
errors : {
noAnimation : 'There is no css animation matching the one you specified.',
method : 'The method you called is not defined'
}
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="five wide right floated fixed column">
<img src="/images/demo/vector.png" class="ui dog image">

2
node/src/files/build/less/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

2
node/src/files/build/minified/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

2
node/src/files/build/uncompressed/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

2
src/modules/transition.js

@ -621,7 +621,7 @@ $.fn.transition.settings = {
// animation complete event
complete : function() {},
// animation duration (useful only with future js animations)
// animation duration
animation : 'fade',
duration : '700ms',

Loading…
Cancel
Save