Custom Form Elements for mootools

check 

:: Custom Form Elements for mootools > check > cfe.modules.checkbox 0.9.4
Filters

Class cfe.modules.checkbox extends cfe.generic

Known Subclasses:
cfe.modules.radio
replaces checkboxes bug: opera - original update triggers twince when clicking the ori ie 7 - original update triggers twince when clicking the ori

Properties

selector - string

CSS Selector to fetch "original" HTMLElements for replacement with this module

type - string

Describes the type of this element

Properties inherited from cfe.generic:

Methods

build

protected void build ( )
creates the decorator checkbox as simple img[src=spacer] element after creation, update is called to properly set the state
Returns: void

check

void check ( )
public method to check a checkbox programatically
Returns: void

createOriginal

protected HTMLElement createOriginal ( )
Method to programmatically create an "original" HTMLElement
Returns: HTMLElement
an input field of type "checkbox"

setStateTo

void setStateTo ( )
public method to set the state of a checkbox programmatically TODO: check if this is obsolete, because the original should have an onupdate listener
Returns: void

toElements

HTMLElement[label, alias] toElements ( )
retreive the label and the alias in inverted direction, since with checkboxes, the decorator is more often placed in front of the label
Returns: HTMLElement[label, alias]

uncheck

void uncheck ( )
public method to uncheck a checkbox programatically
Returns: void

update

protected void update ( )
wrapper method for event onUpdate
additionally adds the correct checked state to the decorator
Returns: void

Events (Option Attributes)

onCheck

onCheck ( )
Fired when the original element gets checked

onUnCheck

onUnCheck ( )
Fired when the original element's checked state is set to false

Configuration attributes inherited from cfe.generic:

back to top | © 2007-2009 | custom form elements mediavrog project. | documentation build with YUI Doc from Yahoo!