dojox/image/Lightbox (version 1.10)

Summary

A dojo-based Lightbox implementation.

An Elegant, keyboard accessible, markup and store capable Lightbox widget to show images in a modal dialog-esque format. Can show individual images as Modal dialog, or can group images with multiple entry points, all using a single "master" Dialog for visualization

key controls:

See the dojox/image/Lightbox reference documentation for more information.

Examples

Example 1

<a href="image1.jpg" dojoType="dojox.image.Lightbox">show lightbox</a>

Example 2

<a href="image2.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>
<a href="image3.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>

Example 3

not implemented fully yet, though works with basic datastore access. need to manually call
widget._attachedDialog.addImage(item,"fromStore") for each item in a store result set.
<div dojoType="dojox.image.Lightbox" group="fromStore" store="storeName"></div>

Property Summary

  • _allowPassthruPrivately set this to disable/enable natural link of anchor tags
  • _attachedDialogThe pointer to the global lightbox dialog for this widget
  • durationGeneric time in MS to adjust the feel of widget. could possibly add various durations for the various actions (dialog fadein, sizeing, img fadein ...)
  • groupGrouping images in a page with similar tags will provide a &#39;slideshow&#39; like grouping of images
  • href
  • modalIf true, this Dialog instance will be truly modal and prevent closing until explicitly told to by calling hide() or clicking the (x) - Defaults to false to preserve previous behaviors. (aka: enable click-to-close on the underlay)
  • titleA string of text to be shown in the Lightbox beneath the image (empty if using a store)

Method Summary

  • _addSelf() Add this instance to the master LightBoxDialog
  • _handleClick(e) Handle the click on the link
  • destroy()
  • disable() Disables event clobbering and dialog, and follows natural link
  • enable() Enables the dialog (prevents default link)
  • hide() Hide the Lightbox currently showing
  • LightboxDialog()
  • show() Show the Lightbox with this instance as the starting point
  • startup()

Event Summary

  • onClick() Stub fired when the image in the lightbox is clicked.

Properties

_allowPassthru
Defined by: dojox/image/Lightbox

Privately set this to disable/enable natural link of anchor tags

_attachedDialog
Defined by: dojox/image/Lightbox

The pointer to the global lightbox dialog for this widget

duration
Defined by: dojox/image/Lightbox

Generic time in MS to adjust the feel of widget. could possibly add various durations for the various actions (dialog fadein, sizeing, img fadein ...)

group
Defined by: dojox/image/Lightbox

Grouping images in a page with similar tags will provide a 'slideshow' like grouping of images

href
Defined by: dojox/image/Lightbox
modal
Defined by: dojox/image/Lightbox

If true, this Dialog instance will be truly modal and prevent closing until explicitly told to by calling hide() or clicking the (x) - Defaults to false to preserve previous behaviors. (aka: enable click-to-close on the underlay)

title
Defined by: dojox/image/Lightbox

A string of text to be shown in the Lightbox beneath the image (empty if using a store)

Methods

_addSelf()

Add this instance to the master LightBoxDialog

_handleClick(e)

Handle the click on the link

Parameter Type Description
e Event
destroy()
disable()

Disables event clobbering and dialog, and follows natural link

enable()

Enables the dialog (prevents default link)

hide()

Hide the Lightbox currently showing

LightboxDialog()
show()

Show the Lightbox with this instance as the starting point

startup()

Events

onClick()
Defined by: dojox/image/Lightbox

Stub fired when the image in the lightbox is clicked.

Examples

Example 1

<a href="image1.jpg" dojoType="dojox.image.Lightbox">show lightbox</a>

Example 2

<a href="image2.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>
<a href="image3.jpg" dojoType="dojox.image.Lightbox" group="one">show group lightbox</a>

Example 3

not implemented fully yet, though works with basic datastore access. need to manually call
widget._attachedDialog.addImage(item,"fromStore") for each item in a store result set.
<div dojoType="dojox.image.Lightbox" group="fromStore" store="storeName"></div>
Error in the documentation? Can’t find what you are looking for? Let us know!