Core.js

MochaUIA Web Applications User Interface Framework.

Copyright

Copyright © 2007-2008 Greg Houston, http://greghoustondesign.com/.

License

MIT-style license.

Contributors

  • Scott F.  Frederick
  • Joel Lindau

Note

This documentation is taken directly from the javascript source files.  It is built using Natural Docs.

Summary
Core.js
Functions
updateContentReplace the content of a window.
closeWindowCloses a window.
closeAllClose all open windows.
toggleWindowVisibilityToggle window visibility with Ctrl-Alt-Q.
centerWindowCenter a window in it’s container.
dynamicResizeUse with a timer to resize a window as the window’s content size changes, such as with an accordian.
garbageCleanUpEmpties all windows of their children, and removes and garbages the windows.

Functions

updateContent

updateContent: function(windowEl,
content,
url,
element,
loadMethod)

Replace the content of a window.

Arguments

windowEl, content, url

closeWindow

closeWindow: function(windowEl)

Closes a window.

Syntax

MochaUI.closeWindow();

Arguments

windowElthe ID of the window to be closed

Returns

truethe window was closed
falsethe window was not closed

closeAll

closeAll: function()

Close all open windows.

toggleWindowVisibility

toggleWindowVisibility: function()

Toggle window visibility with Ctrl-Alt-Q.

centerWindow

centerWindow: function(windowEl)

Center a window in it’s container.  If windowEl is undefined it will center the window that has focus.

dynamicResize

dynamicResize: function(windowEl)

Use with a timer to resize a window as the window’s content size changes, such as with an accordian.

garbageCleanUp

garbageCleanUp: function()

Empties all windows of their children, and removes and garbages the windows.  It is does not trigger onClose() or onCloseComplete().  This is useful to clear memory before the pageUnload.

Syntax

MochaUI.garbageCleanUp();
updateContent: function(windowEl,
content,
url,
element,
loadMethod)
Replace the content of a window.
closeWindow: function(windowEl)
Closes a window.
closeAll: function()
Close all open windows.
toggleWindowVisibility: function()
Toggle window visibility with Ctrl-Alt-Q.
centerWindow: function(windowEl)
Center a window in it’s container.
dynamicResize: function(windowEl)
Use with a timer to resize a window as the window’s content size changes, such as with an accordian.
garbageCleanUp: function()
Empties all windows of their children, and removes and garbages the windows.
Close