Skip to content

Commit

Permalink
Add Links to the new Demos in the Docs + make sure each class has a "…
Browse files Browse the repository at this point in the history
…ClassName Method: constructor" header

* Fix example in Group (Replaced Ajax with Request)
* Better formatting of events in Slider and Accordion
* Added Turkish to the list of available Locales
  • Loading branch information
Arian committed Jan 15, 2011
1 parent c023a4e commit 8f969cc
Show file tree
Hide file tree
Showing 45 changed files with 276 additions and 149 deletions.
2 changes: 1 addition & 1 deletion Docs/Class/Events.Pseudos.md
Expand Up @@ -3,7 +3,7 @@ Events.Pseudos


Defines the `:once` pseudo event for classes that have implemented the [Events][] class as well as the `definePseudos` method for adding your own. Defines the `:once` pseudo event for classes that have implemented the [Events][] class as well as the `definePseudos` method for adding your own.


Event Pseudos {#Pseudos} Pseudo Events {#Pseudos}
======================== ========================


Like [Element.Event.Pseudos][] for Elements, you can use pseudos for Class Events. Like [Element.Event.Pseudos][] for Elements, you can use pseudos for Class Events.
Expand Down
18 changes: 9 additions & 9 deletions Docs/Drag/Drag.Move.md
Expand Up @@ -4,13 +4,20 @@ Class: Drag.Move {#Drag-Move}
An extension to the base Drag class with additional functionality for dragging an Element. Supports snapping and droppables. An extension to the base Drag class with additional functionality for dragging an Element. Supports snapping and droppables.
Inherits methods, properties, options and events from [Drag][]. Inherits methods, properties, options and events from [Drag][].


### Demos

* [Drag.Cart](http://mootools.net/demos/?demo=Drag.Cart)
* [Drag.Drop](http://mootools.net/demos/?demo=Drag.Drop)
* [Drag.Move](http://mootools.net/demos/?demo=Drag.Move)


### Note ### Note


Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/). Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).




Drag.Move Method: constructor {#Drag-Move:constructor} Drag.Move Method: constructor
------------------------------------------------- -----------------------------


### Syntax ### Syntax


Expand Down Expand Up @@ -63,18 +70,11 @@ All the base Drag options, plus:
- Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/). - Drag.Move requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).
- Drag.Move supports either position absolute or relative. If no position is found, absolute will be set. - Drag.Move supports either position absolute or relative. If no position is found, absolute will be set.


### Demos

* Drag.Cart - <http://mootools.net/demos/?demo=Drag.Cart>
* Drag.Drop - <http://mootools.net/demos/?demo=Drag.Drop>
* Drag.Move - <http://mootools.net/demos/?demo=Drag.Move>

### See Also ### See Also


- [Drag][] - [Drag][]





Drag.Move Method: stop {#Drag-Move:stop} Drag.Move Method: stop {#Drag-Move:stop}
------------------------------------------------- -------------------------------------------------


Expand Down
4 changes: 2 additions & 2 deletions Docs/Drag/Drag.md
Expand Up @@ -8,8 +8,8 @@ Enables the modification of two CSS properties of an Element based on the positi
[Events][], [Chain][], [Options][] [Events][], [Chain][], [Options][]




Drag Method: constructor {#Drag:constructor} Drag Method: constructor
-------------------------------------------- ------------------------


### Syntax ### Syntax


Expand Down
61 changes: 32 additions & 29 deletions Docs/Drag/Slider.md
Expand Up @@ -3,10 +3,17 @@ Class: Slider {#Slider}


Creates a slider with two elements: a knob and a container. Creates a slider with two elements: a knob and a container.


### Demo

- [Slider](http://mootools.net/demos/?demo=Slider)

### Note ### Note


- Slider requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/). - Slider requires the page to be in [Standards Mode](http://hsivonen.iki.fi/doctype/).


Slider Method: constructor
--------------------------

### Syntax ### Syntax


var mySlider = new Slider(element, knob[, options]); var mySlider = new Slider(element, knob[, options]);
Expand All @@ -17,7 +24,7 @@ Creates a slider with two elements: a knob and a container.
2. knob - (*element*) The handle element for the slider. 2. knob - (*element*) The handle element for the slider.
3. options - (*object*) An optional object for customizing the Slider. 3. options - (*object*) An optional object for customizing the Slider.


#### Options ### Options


1. snap - (*boolean*: defaults to false) True if you want the knob to snap to the nearest value. 1. snap - (*boolean*: defaults to false) True if you want the knob to snap to the nearest value.
2. offset - (*number*: defaults to 0) Relative offset for knob position at start. 2. offset - (*number*: defaults to 0) Relative offset for knob position at start.
Expand All @@ -27,64 +34,51 @@ Creates a slider with two elements: a knob and a container.
6. mode - (*string*: defaults to horizontal) The type of Slider can be either 'horizontal' or 'vertical' in movement. 6. mode - (*string*: defaults to horizontal) The type of Slider can be either 'horizontal' or 'vertical' in movement.
6. initialStep - (*number*: defaults to 0) The step the slider will start at. 6. initialStep - (*number*: defaults to 0) The step the slider will start at.


### Notes ### Events


- Range option allows an array of numbers. Numbers can be negative and positive. #### change
- If snap is enabled, the width of the bar in which the slider resides must fit an equation for the steps to line up just right at it's end value. The equation is:


(Math.ceil(barWidth/numSteps - knobWidth/numSteps) * numSteps) + knobWidth Fires when the Slider's value changes.


For instance, if you had a bar that is 300px wide and a knob that is 15px wide, and have snap enabled and 10 steps specified, then the bar's width divided by the number of steps (300 / 10 = 30) minus room for the knob (15 / 10 = 1.5) gives you the value of each step (28.5). Slider must round this value, and it rounds up (29). Take this and multiply times the number of steps and you get 290, but there must also be room for the knob, which adds 15, yielding 305. The result is that our knob can't be dragged to the 10th position because there isn't room for it; so it stops at the 9th. This takes a little tweaking in your css. Just add a few pixels until you can drag it all the way (or change the knob width). ##### Signature



Slider Event: change {#Slider:change}
-------------------------------------

* (*function*) Fires when the Slider's value changes.

### Signature


onChange(step) onChange(step)


### Arguments ##### Arguments


1. step - (*number*) The current step that the Slider is on. 1. step - (*number*) The current step that the Slider is on.




#### onComplete


Slider Event: onComplete {#Slider:complete} Fire when you're done dragging.
-------------------------------------------

* (*function*) Fire when you're done dragging.


### Signature ##### Signature


onComplete(step) onComplete(step)


### Arguments ##### Arguments


1. step - (*string*) The current step that the Slider is on as a string. 1. step - (*string*) The current step that the Slider is on as a string.




#### tick


Slider Event: tick {#Slider:tick} Fires when the user scrolls or when the container element is clicked. This Event can be overridden to alter the default tick behavior.
---------------------------------

* (*function*) Fires when the user scrolls or when the container element is clicked. This Event can be overridden to alter the default tick behavior.


### Signature ##### Signature


onTick(pos) onTick(pos)


### Arguments ##### Arguments


1. pos - (*number*) The current position that slider moved to. 1. pos - (*number*) The current position that slider moved to.


### Notes ##### Notes


- By default Slider uses the 'tick' event to set the style of the knob to a new position. - By default Slider uses the 'tick' event to set the style of the knob to a new position.



### Returns ### Returns


* (*object*) A new Slider instance. * (*object*) A new Slider instance.
Expand All @@ -105,6 +99,15 @@ Slider Event: tick {#Slider:tick}
}); });




### Notes

- Range option allows an array of numbers. Numbers can be negative and positive.
- If snap is enabled, the width of the bar in which the slider resides must fit an equation for the steps to line up just right at it's end value. The equation is:

(Math.ceil(barWidth/numSteps - knobWidth/numSteps) * numSteps) + knobWidth

For instance, if you had a bar that is 300px wide and a knob that is 15px wide, and have snap enabled and 10 steps specified, then the bar's width divided by the number of steps (300 / 10 = 30) minus room for the knob (15 / 10 = 1.5) gives you the value of each step (28.5). Slider must round this value, and it rounds up (29). Take this and multiply times the number of steps and you get 290, but there must also be room for the knob, which adds 15, yielding 305. The result is that our knob can't be dragged to the 10th position because there isn't room for it; so it stops at the 9th. This takes a little tweaking in your css. Just add a few pixels until you can drag it all the way (or change the knob width).



Slider Method: set {#Slider:set} Slider Method: set {#Slider:set}
-------------------------------- --------------------------------
Expand Down
13 changes: 8 additions & 5 deletions Docs/Drag/Sortables.Delegation.md
Expand Up @@ -5,7 +5,10 @@ An event delegated interface for drag and drop sorting, Sortables.Delegation is


### Extends: ### Extends:


[Sortables][] * [Sortables][]

Sortables.Delegation Method: constructor
----------------------------------------


### Syntax: ### Syntax:


Expand All @@ -32,8 +35,8 @@ All events defined by [Sortables][]


Adding a sortable item is as simple as injecting an element into a list element. Adding a sortable item is as simple as injecting an element into a list element.


Sortables Method: addLists {#Sortables-Delegation:addLists} Sortables.Delegation Method: addLists {#Sortables-Delegation:addLists}
----------------------------------------------------------- ----------------------------------------------------------------------


Allows one or more entire lists to be added to an existing Sortables instance, allowing sorting between the new and old lists. The relay specified in the instance options will be applied in delegating these lists. Allows one or more entire lists to be added to an existing Sortables instance, allowing sorting between the new and old lists. The relay specified in the instance options will be applied in delegating these lists.


Expand All @@ -58,8 +61,8 @@ Allows one or more entire lists to be added to an existing Sortables instance, a


- [Sortables.Delegation:removeLists](#Sortables-Delegation:removeLists) - [Sortables.Delegation:removeLists](#Sortables-Delegation:removeLists)


Sortables Method: removeLists {#Sortables-Delegation:removeLists} Sortables.Delegation Method: removeLists {#Sortables-Delegation:removeLists}
----------------------------------------------------------------- ----------------------------------------------------------------------------


Allows one or more entire lists to be removed from an existing Sortables instance, preventing sorting between the lists. Allows one or more entire lists to be removed from an existing Sortables instance, preventing sorting between the lists.


Expand Down
13 changes: 11 additions & 2 deletions Docs/Drag/Sortables.md
Expand Up @@ -3,6 +3,15 @@ Class: Sortables {#Sortables}


Creates an interface for drag and drop sorting of a list or lists. Creates an interface for drag and drop sorting of a list or lists.


### Demo

* [Sortables](http://mootools.net/demos/?demo=Sortables)


Sortables Method: constructor
-----------------------------


### Syntax: ### Syntax:


new Sortables(list[, options]); new Sortables(list[, options]);
Expand All @@ -20,7 +29,7 @@ Creates an interface for drag and drop sorting of a list or lists.
* handle - (*string*: defaults to *false*) A selector to select an element inside each sortable item to be used as the handle for sorting that item. If no match is found, the element is used as its own handle. * handle - (*string*: defaults to *false*) A selector to select an element inside each sortable item to be used as the handle for sorting that item. If no match is found, the element is used as its own handle.
* opacity - (*number*: defaults to *1*) Opacity of the place holding element * opacity - (*number*: defaults to *1*) Opacity of the place holding element
* revert - (*mixed*: defaults to *false*) Whether or not to use an effect to slide the element into its final location after sorting. If you pass an object it will be used as additional options for the revert effect. * revert - (*mixed*: defaults to *false*) Whether or not to use an effect to slide the element into its final location after sorting. If you pass an object it will be used as additional options for the revert effect.
* dragOptions - (*object*; defaults to *{}*) The options to apply internally to sortable's Drag.Move instances. * dragOptions - (*object*; defaults to *{}*) The options to apply internally to sortable's [Drag.Move][] instances.


### Events: ### Events:


Expand Down Expand Up @@ -273,6 +282,6 @@ If more than one list is being used, all lists will be serialized and returned i
//'3-0=0&3-1=1&3-2=2' //'3-0=0&3-1=1&3-2=2'





[Drag.Move]: /more/Drag/Drag.Move
[Element]: /core/Elements/Element [Element]: /core/Elements/Element
[Elements]: /core/Element/Element#Elements [Elements]: /core/Element/Element#Elements
4 changes: 4 additions & 0 deletions Docs/Element/Element.Delegation.md
Expand Up @@ -3,6 +3,10 @@ Type: Element {#Element}


Extends the [Element][] type to include delegations in the addEvent and addEvents methods. It adds the `:relay` pseudo using [Element.Event.Pseudos][]. Extends the [Element][] type to include delegations in the addEvent and addEvents methods. It adds the `:relay` pseudo using [Element.Event.Pseudos][].


### Demo

* [Element.Delegation](http://mootools.net/demos/?demo=Element.Delegation)

### Notes ### Notes


* By delegating events to parent objects you can dramatically increase the efficiency of your pages. Consider the example above. You could attach events to every link on a page - which may be hundreds of DOM elements - or you can delegate the event to the document body, evaluating your code only when the user actually clicks a link (instead of on page load/domready). * By delegating events to parent objects you can dramatically increase the efficiency of your pages. Consider the example above. You could attach events to every link on a page - which may be hundreds of DOM elements - or you can delegate the event to the document body, evaluating your code only when the user actually clicks a link (instead of on page load/domready).
Expand Down
3 changes: 3 additions & 0 deletions Docs/Element/Element.Event.Pseudos.md
Expand Up @@ -3,6 +3,9 @@ Element.Event.Pseudos {#Pseudos}


Defines a useful pseudo event: `:once` as well as the `definePseudo` method to create your own. See also the `:relay` pseudo in [Element.Delegation][]. Defines a useful pseudo event: `:once` as well as the `definePseudo` method to create your own. See also the `:relay` pseudo in [Element.Delegation][].


### Demo

* [Element.Event.Pseudos](http://mootools.net/demos/?demo=Element.Event.Pseudos)


Pseudo: once {#Pseudos:once} Pseudo: once {#Pseudos:once}
---------------------------- ----------------------------
Expand Down
4 changes: 2 additions & 2 deletions Docs/Element/Element.Forms.md
Expand Up @@ -5,8 +5,8 @@ Extends the [Element][] Type to include methods useful in managing inputs.


### Tutorial/Demo ### Tutorial/Demo


* [Online Tutorial/Demo][] * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/04-element/00-element.forms)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/04-element/00-element.forms


Element Method: tidy {#Element:tidy} Element Method: tidy {#Element:tidy}
------------------------------------ ------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions Docs/Element/Element.Measure.md
Expand Up @@ -4,8 +4,7 @@ The following functions are treated as [Element][] methods.


### Tutorial/Demo ### Tutorial/Demo


* [Online Tutorial/Demo][] * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/04-element/01-element.measure)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/04-element/01-element.measure




Element Method: measure {#Element:measure} Element Method: measure {#Element:measure}
Expand Down
3 changes: 1 addition & 2 deletions Docs/Element/Element.Pin.md
Expand Up @@ -4,8 +4,7 @@ Extends the [Element][] Type to include the *pin* method useful for fixed positi


### Tutorial/Demo ### Tutorial/Demo


* [Online Tutorial/Demo][] * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/04-element/03-element.pin)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/04-element/03-element.pin




Element Method: pin {#Element:pin} Element Method: pin {#Element:pin}
Expand Down
4 changes: 2 additions & 2 deletions Docs/Element/Element.Position.md
Expand Up @@ -4,8 +4,8 @@ Extends the [Element][] Type with the method *position* which sets the location


### Tutorial/Demo ### Tutorial/Demo


* [Online Tutorial/Demo][] * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/04-element/04-element.position)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/04-element/04-element.position


Element Method: position {#Element:position} Element Method: position {#Element:position}
-------------------------------------------------- --------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions Docs/Element/Element.Shortcuts.md
Expand Up @@ -5,8 +5,7 @@ Extends the [Element][] Type with some basic shortcuts (like .hide and .show).


### Tutorial/Demo ### Tutorial/Demo


* [Online Tutorial/Demo][] * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/04-element/05-element.shortcuts)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/04-element/05-element.shortcuts


Element Method: isDisplayed {#Element:isDisplayed} Element Method: isDisplayed {#Element:isDisplayed}
---------------------------------------------- ----------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion Docs/Forms/Form.Request.md
@@ -1,7 +1,13 @@
Class: Form.Request {#Form-Request} Class: Form.Request {#Form-Request}
========================= ===================================

Updates a DOM element with the response from the submission of a form (via Ajax). Updates a DOM element with the response from the submission of a form (via Ajax).


### Demo

* [Enhanced Form](http://mootools.net/demos/?demo=Enhanced-Form)


### Implements ### Implements


- [Options][], [Events][], [Class.Occlude][] - [Options][], [Events][], [Class.Occlude][]
Expand Down
4 changes: 4 additions & 0 deletions Docs/Forms/Form.Validator.Inline.md
Expand Up @@ -11,6 +11,10 @@ Evaluates an entire form against all the validators that are set up *displaying


* [Options][], [Events][] * [Options][], [Events][]



Form.Validator.Inline Method: Constructor
------------------------------------------

### Syntax ### Syntax


new Form.Validator.Inline(form[, options]); new Form.Validator.Inline(form[, options]);
Expand Down
7 changes: 7 additions & 0 deletions Docs/Forms/Form.Validator.md
Expand Up @@ -3,10 +3,17 @@ Class: Form.Validator {#Form-Validator}


Evaluates an entire form against all the validators that are set up, firing events when inputs fail validation. Evaluates an entire form against all the validators that are set up, firing events when inputs fail validation.


### Demo

* [Enhanced Form](http://mootools.net/demos/?demo=Enhanced-Form)

### Implements ### Implements


* [Options][], [Events][] * [Options][], [Events][]


Form.Validator Method: Constructor
----------------------------------

### Syntax ### Syntax


new Form.Validator(form[, options]); new Form.Validator(form[, options]);
Expand Down
11 changes: 8 additions & 3 deletions Docs/Forms/OverText.md
Expand Up @@ -3,15 +3,20 @@ Class: OverText {#OverText}


Shows text over an input that disappears when the user clicks into it. The text remains hidden if the user adds a value. Shows text over an input that disappears when the user clicks into it. The text remains hidden if the user adds a value.


### Tutorial/Demo ### Tutorial/Demos


* [Online Tutorial/Demo][] * [Enhanced Form](http://mootools.net/demos/?demo=Enhanced-Form)
[Online Tutorial/Demo]:http://www.clientcide.com/wiki/cnet-libraries/09-forms/05-overtext * [Online Tutorial/Demo](http://www.clientcide.com/wiki/cnet-libraries/09-forms/05-overtext)


### Implements ### Implements


* [Options][], [Events][], [Class.Binds][] * [Options][], [Events][], [Class.Binds][]



OverText Method: constructor
-----------------------------


### Syntax ### Syntax


new OverText(input[, options]); new OverText(input[, options]);
Expand Down

0 comments on commit 8f969cc

Please sign in to comment.