C# Class Castle.MonoRail.Framework.Helpers.ScriptaculousHelper

Exposes the effect script from Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
Before using it, you must install the scripts. See ScriptaculousHelper.InstallScripts
Inheritance: AbstractHelper
Show file Open project: nats/castle-1.0.3-mono Class Usage Examples

Public Methods

Method Description
InstallScripts ( ) : String

Renders a Javascript library inside a single script tag.

VisualEffect ( string name, string elementId ) : string

Generates a JS snippet invoking the specified effect.

Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid')

VisualEffect ( string name, string elementId, IDictionary options ) : string

Generates a JS snippet invoking the specified effect.

Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid')

Common options includes duration, transition, fps, sync, from, to, delay, queue, startcolor, endcolor.

Callbacks: beforeStart, beforeUpdate, afterUpdate, afterFinish

If you want to use the DropOut effect, please refer to VisualEffectDropOut

VisualEffectDropOut ( string elementId, IDictionary queue ) : string

Generates a JS snippet invoking the DropOut effect

Examples: VisualEffectDropOut('elementid', {position:'end', scope='test', limit=2})

Private Methods

Method Description
GetJavascriptFunctions ( ) : String

Method Details

InstallScripts() public method

Renders a Javascript library inside a single script tag.
public InstallScripts ( ) : String
return String

VisualEffect() public method

Generates a JS snippet invoking the specified effect.

Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid')

public VisualEffect ( string name, string elementId ) : string
name string The effect name.
elementId string The element id to act upon.
return string

VisualEffect() public method

Generates a JS snippet invoking the specified effect.

Examples: VisualEffect('ToggleSlide', 'elementid') VisualEffect('ToggleBlind', 'elementid') VisualEffect('ToggleAppear', 'elementid') VisualEffect('Highlight', 'elementid') VisualEffect('Fade', 'elementid') VisualEffect('Shake', 'elementid') VisualEffect('DropOut', 'elementid')

Common options includes duration, transition, fps, sync, from, to, delay, queue, startcolor, endcolor.

Callbacks: beforeStart, beforeUpdate, afterUpdate, afterFinish

If you want to use the DropOut effect, please refer to VisualEffectDropOut
public VisualEffect ( string name, string elementId, IDictionary options ) : string
name string The effect name.
elementId string The element id to act upon.
options IDictionary A dictionary used to specify options to the effect behavior
return string

VisualEffectDropOut() public method

Generates a JS snippet invoking the DropOut effect

Examples: VisualEffectDropOut('elementid', {position:'end', scope='test', limit=2})

public VisualEffectDropOut ( string elementId, IDictionary queue ) : string
elementId string The element id to act upon.
queue IDictionary A dictionary used to specify options to the DropOut behavior
return string