|
Zapatec Utils | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--Zapatec.Wizard
Defined in wizard.js
Field Summary | |
boolean |
onBeforeTabChange
Called when the tab is about to be changed, just _before_. |
Object |
onInit
Called when the wizard is created. |
Object |
onTabChange
Called _after_ the tab was changed. |
Constructor Summary | |
Zapatec.Wizard(<object> args)
Zapatec.Wizard constructor. |
Method Summary | |
Object
|
addCustomValidator(name, func)
Create a custom validator. |
void
|
addValidator(name, regexp, error)
Add a simple validator. |
Object
|
changeTab(<string> newTab)
Display a new tab. |
void
|
firstTab()
Move to the first tab. |
string
|
getCurrentTab()
|
void
|
init()
Initializes the wizard. |
boolean
|
isFirstTab()
|
boolean
|
isLastTab()
|
void
|
lastTab()
Move to the last tab. |
Object
|
nextTab()
Move to the next tab. |
Object
|
prevTab()
Move to the previous tab. |
object
|
setupNav(<object> parent)
Creates a default navigation bar for the wizard and appends it into the given parent. |
void
|
toggleAdvanced()
Toggles "advanced mode" for the currently displayed tab. |
boolean
|
validate(<string> value, <string> validator, args)
Call this function given the value and the validator to match it against. |
<static> Object
|
_doNothing()
A "do nothing" handler used for default event hooks. |
Field Detail |
boolean onBeforeTabChange
Object onInit
Object onTabChange
Constructor Detail |
Zapatec.Wizard(<object> args)
A Wizard object provides common functionality that seems to be required by any wizard: - tabbed display - keyboard navigation through tabs - tab navigation bar (
args
- Contains the arguments to be used, as described above
Method Detail |
Object addCustomValidator(name, func)
function validate(value, args, validator); The 3 arguments are: - value -- the value that we should check validation against; usually the \em value attribute of the input field. - args -- any arguments that might be passed to the validator in the class name. Note that this might be null. - validator -- the ID of the validator, useful if you wish to use the same handler function for multiple validators.
void addValidator(name, regexp, error)
Object changeTab(<string> newTab)
newTab
- ID of the new tab
void firstTab()
string getCurrentTab()
void init()
boolean isFirstTab()
boolean isLastTab()
void lastTab()
Object nextTab()
Object prevTab()
object setupNav(<object> parent)
- "advanced mode" (only visible if the current tab has advanced elements) - "Begin" (moves to first tab) - "Prev." (moves to previous tab) - "Next" (moves to next tab) - "End" (moves to last tab) Any of these buttons is assigned a certain class name, which helps customizing the look through external CSS. The classes are (in the same order as above): "btn-advanced", "btn-begin", "btn-prev", "btn-next", "btn-finish".
parent
- the parent of the tab navigation bar
void toggleAdvanced()
boolean validate(<string> value, <string> validator, args)
value
- the string to test
validator
- the validator name
<static> Object _doNothing()
|
Zapatec Utils | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |