UI.LightBox - Cool modal windows

Synopsis

<a href="javascript:w$('samplebox').show()">Show the dialog</a>
<div class="uilightbox" id="samplebox">
    <div>Hello World!</div>
    <a href="javascript:w$('samplebox').hide()">Hide this dialog</a>
</div>

Description

UI.LightBox is a adaptatation of Mochi Lightbox, wich in turn is a port of the Lightbox Gone Wild to MochiKit.

It basically provides a nice way to show modal dialogs, shadowing and disabling the entire page while displaying a centered div. It differs from Mochi Lightbox on not requiring lightbox contents being a separate HTML fragment document. That allows more flexibility, as widgets or other dynamic contents could be placed onto the lightbox.

Dependencies

Overview

[TODO]

API Reference

Class UI.LightBox

The lightbox widget.

Inherits from UI.Widget.

UI.LightBox(element)

Creates a Lightbox, corresponding to the element DOM div element.

Properties

None?

Signals

shown:

Fired when the lightbox is made visible.

hidden:

Fired when the lightbox is hidden.

Automatic widget construction details

Lightboxes can be constructed using HTML, declaring them as follows:

<div class="uilightbox">
 <!-- Box contents goes here -->
</div>

In other words, it's so simple that it hasn't special attributes or structure.

Authors

Copyright

Copyright 2005-2006 Leonardo Soto M. <leo.soto@gmail.com> and Imagemaker IT <http://www.imagemaker.cl>.

This program is licensed under the CDDL v1.0 license, see http://www.sun.com/cddl/cddl.html.