Function
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: ESC - close Down Arrow / Rt Arrow / N - Next Image Up Arrow / Lf Arrow / P - Previous Image
<a href="image1.jpg" dojoType="dojox.image.Lightbox">show lightbox</a>
<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>
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>
String
Grouping images in a page with similar tags will provide a 'slideshow' like grouping of images
String
A string of text to be shown in the Lightbox beneath the image (empty if using a store)
Integer
Generic time in MS to adjust the feel of widget. could possibly add various durations for the various actions (dialog fadein, sizeing, img fadein ...)
Boolean
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-click on the underlay)
Boolean
Privately set this to disable/enable natural link of anchor tags _attachedDialg: dojox.image._LightboxDialog The pointer to the global lightbox dialog for this widget
Function
Function
Add this instance to the master LightBoxDialog
Function
Handle the click on the link
Function
Show the Lightbox with this instance as the starting point
Function
Hide the Lightbox currently showing
Function
Disables event clobbering and dialog, and follows natural link
Function
Enables the dialog (prevents default link)
Function
Stub fired when the image in the lightbox is clicked.
Function
Function
The "dialog" shared between any Lightbox instances on the page, publically available for programatic manipulation.
A widget that intercepts anchor links (typically around images) and displays a modal Dialog. this is the actual Dialog, which you can create and populate manually, though should use simple Lightbox's unless you need the direct access. There should only be one of these on a page, so all dojox.image.Lightbox's will us it (the first instance of a Lightbox to be show()'n will create me If i do not exist)
// show a single image from a url var url = "http://dojotoolkit.org/logo.png"; var dialog = new dojox.image.LightboxDialog().startup(); dialog.show({ href: url, title:"My Remote Image"});
String
The current title, read from object passed to show()
Array
Array of objects. this is populated by from the JSON object _groups, and should not be populate manually. it is a placeholder for the currently showing group of images in this master dialog
String
The src="" attribute of our imageNode (can be null at statup)
String
The text to display when an unreachable image is linked
Boolean
If true, ensure the image always stays within the viewport more difficult than necessary to disable, but enabled by default seems sane in most use cases.
Boolean
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-click on the underlay)
Object
Url
Path to the image used when a 404 is encountered
Function
Add some extra event handlers, and startup our superclass.
dijit._Widget Perhaps the only `dijit._Widget` that returns itself to allow 'chaining' or var referencing with .startup()
Function
needs href and title attributes. the values for this image.
Show the Master Dialog. Starts the chain of events to show an image in the dialog, including showing the dialog if it is not already visible
Function
A function to trigger all 'real' showing of some src
Function
Load next image in group
Function
Load previous image in group
Function
Do the prep work before we can show another image
Function
A localized hook to accompany _loadImage
Function
Function
Resize our dialog container, and fire _showImage
Function
The 'size' object passed around for this image
resize an image to fit within the bounds of the viewport
Object
Function
Reset the image size to some actual size.
Function
Function
we want to know the viewport size any time it changes
Function
Fade in the image, and fire showNav
Function
Fade in the footer, and setup our connections.
Function
Hide the Master Lightbox
Function
The image information to add. href: String - link to image (required) title: String - title to display
attach to group of similar tag or null for individual image instance
Add an image to this Master Lightbox
Function
Object A reference to the Lightbox child that was added (or an object literal) only the .href member is compared for uniqueness. The object may contain a .group member as well.
Remove an image instance from this LightboxDialog.
Function
Remove all images in a passed group
Function
Handle keyboard navigation internally
Function
make and cleanup animation and animation connections
Function
a stub function, called with the currently displayed image as the only argument
Function
Object
Object