void
appendToBody
(
element
)
Appends the passed element to the body. If no body is present, one will be automatically created.
- Parameters:
-
element <HTMLElement>
The element to append to the body
- Returns:
void
void
appendToFooter
(
element
)
Appends the passed element to the footer. If no footer is present, one will be automatically created.
- Parameters:
-
element <HTMLElement>
The element to append to the footer
- Returns:
void
void
appendToHeader
(
element
)
Appends the passed element to the header. If no header is present, one will be automatically created.
- Parameters:
-
element <HTMLElement>
The element to append to the header
- Returns:
void
void
configMonitorResize
(
type
,
args
,
obj
)
Default event handler for the "monitorresize" configuration property
- Parameters:
-
type <String>
The CustomEvent type (usually the property name)
-
args <Object[]>
The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-
obj <Object>
The scope object. For configuration handlers, this will usually equal the owner.
- Returns:
void
void
configVisible
(
type
,
args
,
obj
)
Default event handler for changing the visibility property of a Module. By default, this is achieved by switching the "display" style between "block" and "none".
This method is responsible for firing showEvent and hideEvent.
- Parameters:
-
type <String>
The CustomEvent type (usually the property name)
-
args <Object[]>
The CustomEvent arguments. For configuration handlers, args[0] will equal the newly applied value for the property.
-
obj <Object>
The scope object. For configuration handlers, this will usually equal the owner.
- Returns:
void
void
destroy
(
)
Removes the Module element from the DOM and sets all child elements to null.
void
hide
(
)
Hides the Module element by setting the visible configuration property to false. Also fires two events: beforeHideEvent prior to the visibility change, and hideEvent after.
void
init
(
el
,
userConfig
)
The Module class's initialization method, which is executed for Module and all of its subclasses. This method is automatically called by the constructor, and sets up all DOM references for pre-existing markup, and creates required markup if it is not already present.
- Parameters:
-
el <String>
The element ID representing the Module OR
-
el <HTMLElement>
The element representing the Module
-
userConfig <Object>
The configuration Object literal containing the configuration that should be set for this module. See configuration documentation for more details.
- Returns:
void
void
initDefaultConfig
(
)
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
void
initEvents
(
)
Initializes the custom events for Module which are fired automatically at appropriate times by the Module class.
void
initResizeMonitor
(
)
Initialized an empty IFRAME that is placed out of the visible area that can be used to detect text resize.
void
onDomResize
(
e
,
obj
)
Event handler fired when the resize monitor element is resized.
- Parameters:
-
e <DOMEvent>
The DOM resize event
-
obj <Object>
The scope object passed to the handler
- Returns:
void
Boolean
render
(
appendToNode
,
moduleElement
)
Renders the Module by inserting the elements that are not already in the main Module into their correct places. Optionally appends the Module to the specified node prior to the render's execution. NOTE: For Modules without existing markup, the appendToNode argument is REQUIRED. If this argument is ommitted and the current element is not present in the document, the function will return false, indicating that the render was a failure.
- Parameters:
-
appendToNode <String>
The element id to which the Module should be appended to prior to rendering OR
-
appendToNode <HTMLElement>
The element to which the Module should be appended to prior to rendering
-
moduleElement <HTMLElement>
OPTIONAL. The element that represents the actual Standard Module container.
- Returns:
Boolean
- Success or failure of the render
void
setBody
(
bodyContent
)
Sets the Module's body content to the HTML specified, or appends the passed element to the body. If no body is present, one will be automatically created.
- Parameters:
-
bodyContent <String>
The HTML used to set the body OR
-
bodyContent <HTMLElement>
The HTMLElement to append to the body
- Returns:
void
void
setFooter
(
footerContent
)
Sets the Module's footer content to the HTML specified, or appends the passed element to the footer. If no footer is present, one will be automatically created.
- Parameters:
-
footerContent <String>
The HTML used to set the footer OR
-
footerContent <HTMLElement>
The HTMLElement to append to the footer
- Returns:
void
void
setHeader
(
headerContent
)
Sets the Module's header content to the HTML specified, or appends the passed element to the header. If no header is present, one will be automatically created.
- Parameters:
-
headerContent <String>
The HTML used to set the header OR
-
headerContent <HTMLElement>
The HTMLElement to append to the header
- Returns:
void
void
show
(
)
Shows the Module element by setting the visible configuration property to true. Also fires two events: beforeShowEvent prior to the visibility change, and showEvent after.
String
toString
(
)
Returns a String representation of the Object.
- Returns:
String
- The string representation of the Module