Layout.js

Create web application layouts.  Enables window maximize.

Copyright

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

License

MIT-style license.

Requires

Core.js, Window.js

Summary
Layout.jsCreate web application layouts.
Functions
maximizeWindowMaximize a window.
restoreWindowRestore a maximized window.
Classes
ColumnCreate a column.
PanelCreate a panel.

Functions

maximizeWindow

maximizeWindow: function(windowEl)

Maximize a window.

Syntax

MochaUI.Desktop.maximizeWindow(windowEl);

restoreWindow

restoreWindow: function(windowEl)

Restore a maximized window.

Syntax

MochaUI.Desktop.restoreWindow(windowEl);

Classes

Column

Create a column.  Columns should be created from left to right.

Syntax

MochaUI.Panel();

Arguments

options

Options

idThe ID of the column.  This must be set when creating the column.
placementCan be ‘right’, ‘main’, or ‘left’.  There must be at least one column with the ‘main’ option.
width’main’ column is fluid and should not be given a width.
resizeLimitresizelimit of a ‘right’ or ‘left’ column.
onResize(function) Fired when the column is resized.
onCollapse(function) Fired when the column is collapsed.
onExpand(function) Fired when the column is expanded.

Panel

Create a panel.  Panels go one on top of another in columns.  Create your columns first and then add your panels.  Panels should be created from top to bottom, left to right.

Syntax

MochaUI.Panel();

Arguments

options

Options

idThe ID of the panel.  This must be set when creating the panel.
columnWhere to inject the panel.  This must be set when creating the panel.
loadMethod(‘html’, ‘xhr’, or ‘iframe’)
contentURLUsed if loadMethod is set to ‘xhr’ or ‘iframe’.
evalScripts(boolean) An xhr loadMethod option.  Defaults to true.
evalResponse(boolean) An xhr loadMethod option.  Defaults to false.
content(string or element) An html loadMethod option.
tabsURL(url)
footer(boolean)
footerURL(url)
height(number) Height of content area.
addClass(string) Add a class to the panel.
scrollbars(boolean)
padding(object)
panelBackgroundCSS background property for the panel.
onBeforeBuild(function) Fired before the panel is created.
onContentLoaded(function) Fired after the panel’s conten is loaded.
onResize(function) Fired when the panel is resized.
onCollapse(function) Fired when the panel is collapsed.
onExpand(function) Fired when the panel is expanded.
maximizeWindow: function(windowEl)
Maximize a window.
restoreWindow: function(windowEl)
Restore a maximized window.
Close