[pLog-svn] r6021 - plog/trunk/js/ui
mark at devel.lifetype.net
mark at devel.lifetype.net
Wed Oct 31 12:31:58 EDT 2007
Author: mark
Date: 2007-10-31 12:31:57 -0400 (Wed, 31 Oct 2007)
New Revision: 6021
Modified:
plog/trunk/js/ui/contentoverlay.js
Log:
Create a Lifetype.UI.OverlayManager for overlays management. We can use Lifetype.UI.OverlayManager.getActive() to get the current active(focus) overlay object.
Modified: plog/trunk/js/ui/contentoverlay.js
===================================================================
--- plog/trunk/js/ui/contentoverlay.js 2007-10-30 22:23:44 UTC (rev 6020)
+++ plog/trunk/js/ui/contentoverlay.js 2007-10-31 16:31:57 UTC (rev 6021)
@@ -103,6 +103,13 @@
}
/**
+ * Create a manager to management all overlays
+ *
+ * @static
+ */
+Lifetype.UI.OverlayManager = new YAHOO.widget.OverlayManager();
+
+/**
* Processes all the anchors whose "rel" attribute is set to
* "overlay". Can be called as static
*
@@ -111,11 +118,14 @@
Lifetype.UI.ContentOverlay.processAnchors = function()
{
elems = YAHOO.util.Dom.getElementsBy(function(e) {return(e.rel == "overlay")});
+ Lifetype.UI.OverlayManager.overlays = new Array();
objs = new Array();
for( i = 0; i < elems.length; i++ ) {
e = elems[i];
// create the object
objs[i] = new Lifetype.UI.ContentOverlay( YAHOO.util.Dom.generateId(), e.href );
+ // register the overlay to our global overlay manager
+ Lifetype.UI.OverlayManager.register( objs[i] );
// and bind it to the onclick event
e.onclick = Lifetype.bind( objs[i].show, objs[i] );
//e.onclick = Lifetype.UI.ContentOverlay.anchorOverlay;
More information about the pLog-svn
mailing list