continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r726819 [3/4] - in /continuum/trunk/continuum-webapp/src/main: resources/template/default/ webapp/WEB-INF/jsp/admin/ webapp/WEB-INF/jsp/decorators/ webapp/struts/ webapp/struts/dojo/ webapp/struts/dojo/debug/ webapp/struts/dojo/event/ webap...
Date Mon, 15 Dec 2008 21:51:01 GMT
Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dojo.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dojo.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dojo.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,522 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.dom");
+
+dojo.dom.ELEMENT_NODE                  = 1;
+dojo.dom.ATTRIBUTE_NODE                = 2;
+dojo.dom.TEXT_NODE                     = 3;
+dojo.dom.CDATA_SECTION_NODE            = 4;
+dojo.dom.ENTITY_REFERENCE_NODE         = 5;
+dojo.dom.ENTITY_NODE                   = 6;
+dojo.dom.PROCESSING_INSTRUCTION_NODE   = 7;
+dojo.dom.COMMENT_NODE                  = 8;
+dojo.dom.DOCUMENT_NODE                 = 9;
+dojo.dom.DOCUMENT_TYPE_NODE            = 10;
+dojo.dom.DOCUMENT_FRAGMENT_NODE        = 11;
+dojo.dom.NOTATION_NODE                 = 12;
+	
+dojo.dom.dojoml = "http://www.dojotoolkit.org/2004/dojoml";
+
+/**
+ *	comprehensive list of XML namespaces
+**/
+dojo.dom.xmlns = {
+	//	summary
+	//	aliases for various common XML namespaces
+	svg : "http://www.w3.org/2000/svg",
+	smil : "http://www.w3.org/2001/SMIL20/",
+	mml : "http://www.w3.org/1998/Math/MathML",
+	cml : "http://www.xml-cml.org",
+	xlink : "http://www.w3.org/1999/xlink",
+	xhtml : "http://www.w3.org/1999/xhtml",
+	xul : "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
+	xbl : "http://www.mozilla.org/xbl",
+	fo : "http://www.w3.org/1999/XSL/Format",
+	xsl : "http://www.w3.org/1999/XSL/Transform",
+	xslt : "http://www.w3.org/1999/XSL/Transform",
+	xi : "http://www.w3.org/2001/XInclude",
+	xforms : "http://www.w3.org/2002/01/xforms",
+	saxon : "http://icl.com/saxon",
+	xalan : "http://xml.apache.org/xslt",
+	xsd : "http://www.w3.org/2001/XMLSchema",
+	dt: "http://www.w3.org/2001/XMLSchema-datatypes",
+	xsi : "http://www.w3.org/2001/XMLSchema-instance",
+	rdf : "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
+	rdfs : "http://www.w3.org/2000/01/rdf-schema#",
+	dc : "http://purl.org/dc/elements/1.1/",
+	dcq: "http://purl.org/dc/qualifiers/1.0",
+	"soap-env" : "http://schemas.xmlsoap.org/soap/envelope/",
+	wsdl : "http://schemas.xmlsoap.org/wsdl/",
+	AdobeExtensions : "http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+};
+
+dojo.dom.isNode = function(/* object */wh){
+	//	summary
+	//	checks to see if wh is actually a node.
+	if(typeof Element == "function") {
+		try {
+			return wh instanceof Element;	//	boolean
+		} catch(E) {}
+	} else {
+		// best-guess
+		return wh && !isNaN(wh.nodeType);	//	boolean
+	}
+}
+
+dojo.dom.getUniqueId = function(){
+	//	summary
+	//	returns a unique string for use with any DOM element
+	var _document = dojo.doc();
+	do {
+		var id = "dj_unique_" + (++arguments.callee._idIncrement);
+	}while(_document.getElementById(id));
+	return id;	//	string
+}
+dojo.dom.getUniqueId._idIncrement = 0;
+
+dojo.dom.firstElement = dojo.dom.getFirstChildElement = function(/* Element */parentNode, /* string? */tagName){
+	//	summary
+	//	returns the first child element matching tagName
+	var node = parentNode.firstChild;
+	while(node && node.nodeType != dojo.dom.ELEMENT_NODE){
+		node = node.nextSibling;
+	}
+	if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) {
+		node = dojo.dom.nextElement(node, tagName);
+	}
+	return node;	//	Element
+}
+
+dojo.dom.lastElement = dojo.dom.getLastChildElement = function(/* Element */parentNode, /* string? */tagName){
+	//	summary
+	//	returns the last child element matching tagName
+	var node = parentNode.lastChild;
+	while(node && node.nodeType != dojo.dom.ELEMENT_NODE) {
+		node = node.previousSibling;
+	}
+	if(tagName && node && node.tagName && node.tagName.toLowerCase() != tagName.toLowerCase()) {
+		node = dojo.dom.prevElement(node, tagName);
+	}
+	return node;	//	Element
+}
+
+dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function(/* Node */node, /* string? */tagName){
+	//	summary
+	//	returns the next sibling element matching tagName
+	if(!node) { return null; }
+	do {
+		node = node.nextSibling;
+	} while(node && node.nodeType != dojo.dom.ELEMENT_NODE);
+
+	if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) {
+		return dojo.dom.nextElement(node, tagName);
+	}
+	return node;	//	Element
+}
+
+dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function(/* Node */node, /* string? */tagName){
+	//	summary
+	//	returns the previous sibling element matching tagName
+	if(!node) { return null; }
+	if(tagName) { tagName = tagName.toLowerCase(); }
+	do {
+		node = node.previousSibling;
+	} while(node && node.nodeType != dojo.dom.ELEMENT_NODE);
+
+	if(node && tagName && tagName.toLowerCase() != node.tagName.toLowerCase()) {
+		return dojo.dom.prevElement(node, tagName);
+	}
+	return node;	//	Element
+}
+
+// TODO: hmph
+/*this.forEachChildTag = function(node, unaryFunc) {
+	var child = this.getFirstChildTag(node);
+	while(child) {
+		if(unaryFunc(child) == "break") { break; }
+		child = this.getNextSiblingTag(child);
+	}
+}*/
+
+dojo.dom.moveChildren = function(/* Element */srcNode, /* Element */destNode, /* boolean? */trim){
+	//	summary
+	//	Moves children from srcNode to destNode and returns the count of children moved; 
+	//		will trim off text nodes if trim == true
+	var count = 0;
+	if(trim) {
+		while(srcNode.hasChildNodes() &&
+			srcNode.firstChild.nodeType == dojo.dom.TEXT_NODE) {
+			srcNode.removeChild(srcNode.firstChild);
+		}
+		while(srcNode.hasChildNodes() &&
+			srcNode.lastChild.nodeType == dojo.dom.TEXT_NODE) {
+			srcNode.removeChild(srcNode.lastChild);
+		}
+	}
+	while(srcNode.hasChildNodes()){
+		destNode.appendChild(srcNode.firstChild);
+		count++;
+	}
+	return count;	//	number
+}
+
+dojo.dom.copyChildren = function(/* Element */srcNode, /* Element */destNode, /* boolean? */trim){
+	//	summary
+	//	Copies children from srcNde to destNode and returns the count of children copied;
+	//		will trim off text nodes if trim == true
+	var clonedNode = srcNode.cloneNode(true);
+	return this.moveChildren(clonedNode, destNode, trim);	//	number
+}
+
+dojo.dom.removeChildren = function(/* Element */node){
+	//	summary
+	//	removes all children from node and returns the count of children removed.
+	var count = node.childNodes.length;
+	while(node.hasChildNodes()){ node.removeChild(node.firstChild); }
+	return count;	//	number
+}
+
+dojo.dom.replaceChildren = function(/* Element */node, /* Node */newChild){
+	//	summary
+	//	Removes all children of node and appends newChild
+	// FIXME: what if newChild is an array-like object?
+	dojo.dom.removeChildren(node);
+	node.appendChild(newChild);
+}
+
+dojo.dom.removeNode = function(/* Node */node){
+	//	summary
+	//	if node has a parent, removes node from parent and returns a reference to the removed child.
+	if(node && node.parentNode){
+		// return a ref to the removed child
+		return node.parentNode.removeChild(node);	//	Node
+	}
+}
+
+dojo.dom.getAncestors = function(/* Node */node, /* function? */filterFunction, /* boolean? */returnFirstHit) {
+	//	summary
+	//	returns all ancestors matching optional filterFunction; will return only the first if returnFirstHit
+	var ancestors = [];
+	var isFunction = (filterFunction && (filterFunction instanceof Function || typeof filterFunction == "function"));
+	while(node) {
+		if (!isFunction || filterFunction(node)) {
+			ancestors.push(node);
+		}
+		if (returnFirstHit && ancestors.length > 0) { 
+			return ancestors[0]; 	//	Node
+		}
+		
+		node = node.parentNode;
+	}
+	if (returnFirstHit) { return null; }
+	return ancestors;	//	array
+}
+
+dojo.dom.getAncestorsByTag = function(/* Node */node, /* string */tag, /* boolean? */returnFirstHit) {
+	//	summary
+	//	returns all ancestors matching tag (as tagName), will only return first one if returnFirstHit
+	tag = tag.toLowerCase();
+	return dojo.dom.getAncestors(node, function(el){
+		return ((el.tagName)&&(el.tagName.toLowerCase() == tag));
+	}, returnFirstHit);	//	Node || array
+}
+
+dojo.dom.getFirstAncestorByTag = function(/* Node */node, /* string */tag) {
+	//	summary
+	//	Returns first ancestor of node with tag tagName
+	return dojo.dom.getAncestorsByTag(node, tag, true);	//	Node
+}
+
+dojo.dom.isDescendantOf = function(/* Node */node, /* Node */ancestor, /* boolean? */guaranteeDescendant){
+	//	summary
+	//	Returns boolean if node is a descendant of ancestor
+	// guaranteeDescendant allows us to be a "true" isDescendantOf function
+	if(guaranteeDescendant && node) { node = node.parentNode; }
+	while(node) {
+		if(node == ancestor){ 
+			return true; 	//	boolean
+		}
+		node = node.parentNode;
+	}
+	return false;	//	boolean
+}
+
+dojo.dom.innerXML = function(/* Node */node){
+	//	summary
+	//	Implementation of MS's innerXML function.
+	if(node.innerXML){
+		return node.innerXML;	//	string
+	}else if (node.xml){
+		return node.xml;		//	string
+	}else if(typeof XMLSerializer != "undefined"){
+		return (new XMLSerializer()).serializeToString(node);	//	string
+	}
+}
+
+dojo.dom.createDocument = function(){
+	//	summary
+	//	cross-browser implementation of creating an XML document object.
+	var doc = null;
+	var _document = dojo.doc();
+
+	if(!dj_undef("ActiveXObject")){
+		var prefixes = [ "MSXML2", "Microsoft", "MSXML", "MSXML3" ];
+		for(var i = 0; i<prefixes.length; i++){
+			try{
+				doc = new ActiveXObject(prefixes[i]+".XMLDOM");
+			}catch(e){ /* squelch */ };
+
+			if(doc){ break; }
+		}
+	}else if((_document.implementation)&&
+		(_document.implementation.createDocument)){
+		doc = _document.implementation.createDocument("", "", null);
+	}
+	
+	return doc;	//	DOMDocument
+}
+
+dojo.dom.createDocumentFromText = function(/* string */str, /* string? */mimetype){
+	//	summary
+	//	attempts to create a Document object based on optional mime-type, using str as the contents of the document
+	if(!mimetype){ mimetype = "text/xml"; }
+	if(!dj_undef("DOMParser")){
+		var parser = new DOMParser();
+		return parser.parseFromString(str, mimetype);	//	DOMDocument
+	}else if(!dj_undef("ActiveXObject")){
+		var domDoc = dojo.dom.createDocument();
+		if(domDoc){
+			domDoc.async = false;
+			domDoc.loadXML(str);
+			return domDoc;	//	DOMDocument
+		}else{
+			dojo.debug("toXml didn't work?");
+		}
+	/*
+	}else if((dojo.render.html.capable)&&(dojo.render.html.safari)){
+		// FIXME: this doesn't appear to work!
+		// from: http://web-graphics.com/mtarchive/001606.php
+		// var xml = '<?xml version="1.0"?>'+str;
+		var mtype = "text/xml";
+		var xml = '<?xml version="1.0"?>'+str;
+		var url = "data:"+mtype+";charset=utf-8,"+encodeURIComponent(xml);
+		var req = new XMLHttpRequest();
+		req.open("GET", url, false);
+		req.overrideMimeType(mtype);
+		req.send(null);
+		return req.responseXML;
+	*/
+	}else{
+		var _document = dojo.doc();
+		if(_document.createElement){
+			// FIXME: this may change all tags to uppercase!
+			var tmp = _document.createElement("xml");
+			tmp.innerHTML = str;
+			if(_document.implementation && _document.implementation.createDocument) {
+				var xmlDoc = _document.implementation.createDocument("foo", "", null);
+				for(var i = 0; i < tmp.childNodes.length; i++) {
+					xmlDoc.importNode(tmp.childNodes.item(i), true);
+				}
+				return xmlDoc;	//	DOMDocument
+			}
+			// FIXME: probably not a good idea to have to return an HTML fragment
+			// FIXME: the tmp.doc.firstChild is as tested from IE, so it may not
+			// work that way across the board
+			return ((tmp.document)&&
+				(tmp.document.firstChild ?  tmp.document.firstChild : tmp));	//	DOMDocument
+		}
+	}
+	return null;
+}
+
+dojo.dom.prependChild = function(/* Element */node, /* Element */parent) {
+	// summary
+	//	prepends node to parent's children nodes
+	if(parent.firstChild) {
+		parent.insertBefore(node, parent.firstChild);
+	} else {
+		parent.appendChild(node);
+	}
+	return true;	//	boolean
+}
+
+dojo.dom.insertBefore = function(/* Node */node, /* Node */ref, /* boolean? */force){
+	//	summary
+	//	Try to insert node before ref
+	if (force != true &&
+		(node === ref || node.nextSibling === ref)){ return false; }
+	var parent = ref.parentNode;
+	parent.insertBefore(node, ref);
+	return true;	//	boolean
+}
+
+dojo.dom.insertAfter = function(/* Node */node, /* Node */ref, /* boolean? */force){
+	//	summary
+	//	Try to insert node after ref
+	var pn = ref.parentNode;
+	if(ref == pn.lastChild){
+		if((force != true)&&(node === ref)){
+			return false;	//	boolean
+		}
+		pn.appendChild(node);
+	}else{
+		return this.insertBefore(node, ref.nextSibling, force);	//	boolean
+	}
+	return true;	//	boolean
+}
+
+dojo.dom.insertAtPosition = function(/* Node */node, /* Node */ref, /* string */position){
+	//	summary
+	//	attempt to insert node in relation to ref based on position
+	if((!node)||(!ref)||(!position)){ 
+		return false;	//	boolean 
+	}
+	switch(position.toLowerCase()){
+		case "before":
+			return dojo.dom.insertBefore(node, ref);	//	boolean
+		case "after":
+			return dojo.dom.insertAfter(node, ref);		//	boolean
+		case "first":
+			if(ref.firstChild){
+				return dojo.dom.insertBefore(node, ref.firstChild);	//	boolean
+			}else{
+				ref.appendChild(node);
+				return true;	//	boolean
+			}
+			break;
+		default: // aka: last
+			ref.appendChild(node);
+			return true;	//	boolean
+	}
+}
+
+dojo.dom.insertAtIndex = function(/* Node */node, /* Element */containingNode, /* number */insertionIndex){
+	//	summary
+	//	insert node into child nodes nodelist of containingNode at insertionIndex.
+	var siblingNodes = containingNode.childNodes;
+
+	// if there aren't any kids yet, just add it to the beginning
+
+	if (!siblingNodes.length){
+		containingNode.appendChild(node);
+		return true;	//	boolean
+	}
+
+	// otherwise we need to walk the childNodes
+	// and find our spot
+
+	var after = null;
+
+	for(var i=0; i<siblingNodes.length; i++){
+
+		var sibling_index = siblingNodes.item(i)["getAttribute"] ? parseInt(siblingNodes.item(i).getAttribute("dojoinsertionindex")) : -1;
+
+		if (sibling_index < insertionIndex){
+			after = siblingNodes.item(i);
+		}
+	}
+
+	if (after){
+		// add it after the node in {after}
+
+		return dojo.dom.insertAfter(node, after);	//	boolean
+	}else{
+		// add it to the start
+
+		return dojo.dom.insertBefore(node, siblingNodes.item(0));	//	boolean
+	}
+}
+	
+dojo.dom.textContent = function(/* Node */node, /* string */text){
+	//	summary
+	//	implementation of the DOM Level 3 attribute; scan node for text
+	if (arguments.length>1) {
+		var _document = dojo.doc();
+		dojo.dom.replaceChildren(node, _document.createTextNode(text));
+		return text;	//	string
+	} else {
+		if(node.textContent != undefined){ //FF 1.5
+			return node.textContent;	//	string
+		}
+		var _result = "";
+		if (node == null) { return _result; }
+		for (var i = 0; i < node.childNodes.length; i++) {
+			switch (node.childNodes[i].nodeType) {
+				case 1: // ELEMENT_NODE
+				case 5: // ENTITY_REFERENCE_NODE
+					_result += dojo.dom.textContent(node.childNodes[i]);
+					break;
+				case 3: // TEXT_NODE
+				case 2: // ATTRIBUTE_NODE
+				case 4: // CDATA_SECTION_NODE
+					_result += node.childNodes[i].nodeValue;
+					break;
+				default:
+					break;
+			}
+		}
+		return _result;	//	string
+	}
+}
+
+dojo.dom.hasParent = function (/* Node */node) {
+	//	summary
+	//	returns whether or not node is a child of another node.
+	return node && node.parentNode && dojo.dom.isNode(node.parentNode);	//	boolean
+}
+
+/**
+ * Examples:
+ *
+ * myFooNode = <foo />
+ * isTag(myFooNode, "foo"); // returns "foo"
+ * isTag(myFooNode, "bar"); // returns ""
+ * isTag(myFooNode, "FOO"); // returns ""
+ * isTag(myFooNode, "hey", "foo", "bar"); // returns "foo"
+**/
+dojo.dom.isTag = function(/* Node */node /* ... */) {
+	//	summary
+	//	determines if node has any of the provided tag names and returns the tag name that matches, empty string otherwise.
+	if(node && node.tagName) {
+		for(var i=1; i<arguments.length; i++){
+			if(node.tagName==String(arguments[i])){
+				return String(arguments[i]);	//	string
+			}
+		}
+	}
+	return "";	//	string
+}
+
+dojo.dom.setAttributeNS = function(/* Element */elem, /* string */namespaceURI, /* string */attrName, /* string */attrValue){
+	//	summary
+	//	implementation of DOM2 setAttributeNS that works cross browser.
+	if(elem == null || ((elem == undefined)&&(typeof elem == "undefined"))){
+		dojo.raise("No element given to dojo.dom.setAttributeNS");
+	}
+	
+	if(!((elem.setAttributeNS == undefined)&&(typeof elem.setAttributeNS == "undefined"))){ // w3c
+		elem.setAttributeNS(namespaceURI, attrName, attrValue);
+	}else{ // IE
+		// get a root XML document
+		var ownerDoc = elem.ownerDocument;
+		var attribute = ownerDoc.createNode(
+			2, // node type
+			attrName,
+			namespaceURI
+		);
+		
+		// set value
+		attribute.nodeValue = attrValue;
+		
+		// attach to element
+		elem.setAttributeNode(attribute);
+	}
+}

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/dom.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,16 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.kwCompoundRequire({
+	common: ["dojo.event.common", "dojo.event.topic"],
+	browser: ["dojo.event.browser"],
+	dashboard: ["dojo.event.browser"]
+});
+dojo.provide("dojo.event.*");

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,514 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.event.browser");
+dojo.require("dojo.event.common");
+
+// FIXME: any particular reason this is in the global scope?
+dojo._ie_clobber = new function(){
+	this.clobberNodes = [];
+
+	function nukeProp(node, prop){
+		// try{ node.removeAttribute(prop); 	}catch(e){ /* squelch */ }
+		try{ node[prop] = null; 			}catch(e){ /* squelch */ }
+		try{ delete node[prop]; 			}catch(e){ /* squelch */ }
+		// FIXME: JotLive needs this, but I'm not sure if it's too slow or not
+		try{ node.removeAttribute(prop);	}catch(e){ /* squelch */ }
+	}
+
+	this.clobber = function(nodeRef){
+		var na;
+		var tna;
+		if(nodeRef){
+			tna = nodeRef.all || nodeRef.getElementsByTagName("*");
+			na = [nodeRef];
+			for(var x=0; x<tna.length; x++){
+				// if we're gonna be clobbering the thing, at least make sure
+				// we aren't trying to do it twice
+				if(tna[x]["__doClobber__"]){
+					na.push(tna[x]);
+				}
+			}
+		}else{
+			try{ window.onload = null; }catch(e){}
+			na = (this.clobberNodes.length) ? this.clobberNodes : document.all;
+		}
+		tna = null;
+		var basis = {};
+		for(var i = na.length-1; i>=0; i=i-1){
+			var el = na[i];
+			try{
+				if(el && el["__clobberAttrs__"]){
+					for(var j=0; j<el.__clobberAttrs__.length; j++){
+						nukeProp(el, el.__clobberAttrs__[j]);
+					}
+					nukeProp(el, "__clobberAttrs__");
+					nukeProp(el, "__doClobber__");
+				}
+			}catch(e){ /* squelch! */};
+		}
+		na = null;
+	}
+}
+
+if(dojo.render.html.ie){
+	dojo.addOnUnload(function(){
+		dojo._ie_clobber.clobber();
+		try{
+			if((dojo["widget"])&&(dojo.widget["manager"])){
+				dojo.widget.manager.destroyAll();
+			}
+		}catch(e){}
+		try{ window.onload = null; }catch(e){}
+		try{ window.onunload = null; }catch(e){}
+		dojo._ie_clobber.clobberNodes = [];
+		// CollectGarbage();
+	});
+}
+
+dojo.event.browser = new function(){
+
+	var clobberIdx = 0;
+
+	this.normalizedEventName = function(/*String*/eventName){
+		switch(eventName){
+			case "CheckboxStateChange":
+			case "DOMAttrModified":
+			case "DOMMenuItemActive":
+			case "DOMMenuItemInactive":
+			case "DOMMouseScroll":
+			case "DOMNodeInserted":
+			case "DOMNodeRemoved":
+			case "RadioStateChange":
+				return eventName;
+				break;
+			default:
+				return eventName.toLowerCase();
+				break;
+		}
+	}
+	
+	this.clean = function(/*DOMNode*/node){
+		// summary:
+		//		removes native event handlers so that destruction of the node
+		//		will not leak memory. On most browsers this is a no-op, but
+		//		it's critical for manual node removal on IE.
+		// node:
+		//		A DOM node. All of it's children will also be cleaned.
+		if(dojo.render.html.ie){ 
+			dojo._ie_clobber.clobber(node);
+		}
+	}
+
+	this.addClobberNode = function(/*DOMNode*/node){
+		// summary:
+		//		register the passed node to support event stripping
+		// node:
+		//		A DOM node
+		if(!dojo.render.html.ie){ return; }
+		if(!node["__doClobber__"]){
+			node.__doClobber__ = true;
+			dojo._ie_clobber.clobberNodes.push(node);
+			// this might not be the most efficient thing to do, but it's
+			// much less error prone than other approaches which were
+			// previously tried and failed
+			node.__clobberAttrs__ = [];
+		}
+	}
+
+	this.addClobberNodeAttrs = function(/*DOMNode*/node, /*Array*/props){
+		// summary:
+		//		register the passed node to support event stripping
+		// node:
+		//		A DOM node to stip properties from later
+		// props:
+		//		A list of propeties to strip from the node
+		if(!dojo.render.html.ie){ return; }
+		this.addClobberNode(node);
+		for(var x=0; x<props.length; x++){
+			node.__clobberAttrs__.push(props[x]);
+		}
+	}
+
+	this.removeListener = function(	/*DOMNode*/ node, 
+									/*String*/	evtName, 
+									/*Function*/fp, 
+									/*Boolean*/	capture){
+		// summary:
+		//		clobbers the listener from the node
+		// evtName:
+		//		the name of the handler to remove the function from
+		// node:
+		//		DOM node to attach the event to
+		// fp:
+		//		the function to register
+		// capture:
+		//		Optional. should this listener prevent propigation?
+		if(!capture){ var capture = false; }
+		evtName = dojo.event.browser.normalizedEventName(evtName);
+		if( (evtName == "onkey") || (evtName == "key") ){
+			if(dojo.render.html.ie){
+				this.removeListener(node, "onkeydown", fp, capture);
+			}
+			evtName = "onkeypress";
+		}
+		if(evtName.substr(0,2)=="on"){ evtName = evtName.substr(2); }
+		// FIXME: this is mostly a punt, we aren't actually doing anything on IE
+		if(node.removeEventListener){
+			node.removeEventListener(evtName, fp, capture);
+		}
+	}
+
+	this.addListener = function(/*DOMNode*/node, /*String*/evtName, /*Function*/fp, /*Boolean*/capture, /*Boolean*/dontFix){
+		// summary:
+		//		adds a listener to the node
+		// evtName:
+		//		the name of the handler to add the listener to can be either of
+		//		the form "onclick" or "click"
+		// node:
+		//		DOM node to attach the event to
+		// fp:
+		//		the function to register
+		// capture:
+		//		Optional. Should this listener prevent propigation?
+		// dontFix:
+		//		Optional. Should we avoid registering a new closure around the
+		//		listener to enable fixEvent for dispatch of the registered
+		//		function?
+		if(!node){ return; } // FIXME: log and/or bail?
+		if(!capture){ var capture = false; }
+		evtName = dojo.event.browser.normalizedEventName(evtName);
+		if( (evtName == "onkey") || (evtName == "key") ){
+			if(dojo.render.html.ie){
+				this.addListener(node, "onkeydown", fp, capture, dontFix);
+			}
+			evtName = "onkeypress";
+		}
+		if(evtName.substr(0,2)!="on"){ evtName = "on"+evtName; }
+
+		if(!dontFix){
+			// build yet another closure around fp in order to inject fixEvent
+			// around the resulting event
+			var newfp = function(evt){
+				if(!evt){ evt = window.event; }
+				var ret = fp(dojo.event.browser.fixEvent(evt, this));
+				if(capture){
+					dojo.event.browser.stopEvent(evt);
+				}
+				return ret;
+			}
+		}else{
+			newfp = fp;
+		}
+
+		if(node.addEventListener){ 
+			node.addEventListener(evtName.substr(2), newfp, capture);
+			return newfp;
+		}else{
+			if(typeof node[evtName] == "function" ){
+				var oldEvt = node[evtName];
+				node[evtName] = function(e){
+					oldEvt(e);
+					return newfp(e);
+				}
+			}else{
+				node[evtName]=newfp;
+			}
+			if(dojo.render.html.ie){
+				this.addClobberNodeAttrs(node, [evtName]);
+			}
+			return newfp;
+		}
+	}
+
+	this.isEvent = function(/*Object*/obj){
+		// summary: 
+		//		Tries to determine whether or not the object is a DOM event.
+
+		// FIXME: event detection hack ... could test for additional attributes
+		// if necessary
+		return (typeof obj != "undefined")&&(typeof Event != "undefined")&&(obj.eventPhase); // Boolean
+		// Event does not support instanceof in Opera, otherwise:
+		//return (typeof Event != "undefined")&&(obj instanceof Event);
+	}
+
+	this.currentEvent = null;
+	
+	this.callListener = function(/*Function*/listener, /*DOMNode*/curTarget){
+		// summary:
+		//		calls the specified listener in the context of the passed node
+		//		with the current DOM event object as the only parameter
+		// listener:
+		//		the function to call
+		// curTarget:
+		//		the Node to call the function in the scope of
+		if(typeof listener != 'function'){
+			dojo.raise("listener not a function: " + listener);
+		}
+		dojo.event.browser.currentEvent.currentTarget = curTarget;
+		return listener.call(curTarget, dojo.event.browser.currentEvent);
+	}
+
+	this._stopPropagation = function(){
+		dojo.event.browser.currentEvent.cancelBubble = true; 
+	}
+
+	this._preventDefault = function(){
+		dojo.event.browser.currentEvent.returnValue = false;
+	}
+
+	this.keys = {
+		KEY_BACKSPACE: 8,
+		KEY_TAB: 9,
+		KEY_CLEAR: 12,
+		KEY_ENTER: 13,
+		KEY_SHIFT: 16,
+		KEY_CTRL: 17,
+		KEY_ALT: 18,
+		KEY_PAUSE: 19,
+		KEY_CAPS_LOCK: 20,
+		KEY_ESCAPE: 27,
+		KEY_SPACE: 32,
+		KEY_PAGE_UP: 33,
+		KEY_PAGE_DOWN: 34,
+		KEY_END: 35,
+		KEY_HOME: 36,
+		KEY_LEFT_ARROW: 37,
+		KEY_UP_ARROW: 38,
+		KEY_RIGHT_ARROW: 39,
+		KEY_DOWN_ARROW: 40,
+		KEY_INSERT: 45,
+		KEY_DELETE: 46,
+		KEY_HELP: 47,
+		KEY_LEFT_WINDOW: 91,
+		KEY_RIGHT_WINDOW: 92,
+		KEY_SELECT: 93,
+		KEY_NUMPAD_0: 96,
+		KEY_NUMPAD_1: 97,
+		KEY_NUMPAD_2: 98,
+		KEY_NUMPAD_3: 99,
+		KEY_NUMPAD_4: 100,
+		KEY_NUMPAD_5: 101,
+		KEY_NUMPAD_6: 102,
+		KEY_NUMPAD_7: 103,
+		KEY_NUMPAD_8: 104,
+		KEY_NUMPAD_9: 105,
+		KEY_NUMPAD_MULTIPLY: 106,
+		KEY_NUMPAD_PLUS: 107,
+		KEY_NUMPAD_ENTER: 108,
+		KEY_NUMPAD_MINUS: 109,
+		KEY_NUMPAD_PERIOD: 110,
+		KEY_NUMPAD_DIVIDE: 111,
+		KEY_F1: 112,
+		KEY_F2: 113,
+		KEY_F3: 114,
+		KEY_F4: 115,
+		KEY_F5: 116,
+		KEY_F6: 117,
+		KEY_F7: 118,
+		KEY_F8: 119,
+		KEY_F9: 120,
+		KEY_F10: 121,
+		KEY_F11: 122,
+		KEY_F12: 123,
+		KEY_F13: 124,
+		KEY_F14: 125,
+		KEY_F15: 126,
+		KEY_NUM_LOCK: 144,
+		KEY_SCROLL_LOCK: 145
+	};
+
+	// reverse lookup
+	this.revKeys = [];
+	for(var key in this.keys){
+		this.revKeys[this.keys[key]] = key;
+	}
+
+	this.fixEvent = function(/*Event*/evt, /*DOMNode*/sender){
+		// summary:
+		//		normalizes properties on the event object including event
+		//		bubbling methods, keystroke normalization, and x/y positions
+		// evt: the native event object
+		// sender: the node to treat as "currentTarget"
+		if(!evt){
+			if(window["event"]){
+				evt = window.event;
+			}
+		}
+		
+		if((evt["type"])&&(evt["type"].indexOf("key") == 0)){ // key events
+			evt.keys = this.revKeys;
+			// FIXME: how can we eliminate this iteration?
+			for(var key in this.keys){
+				evt[key] = this.keys[key];
+			}
+			if(evt["type"] == "keydown" && dojo.render.html.ie){
+				switch(evt.keyCode){
+					case evt.KEY_SHIFT:
+					case evt.KEY_CTRL:
+					case evt.KEY_ALT:
+					case evt.KEY_CAPS_LOCK:
+					case evt.KEY_LEFT_WINDOW:
+					case evt.KEY_RIGHT_WINDOW:
+					case evt.KEY_SELECT:
+					case evt.KEY_NUM_LOCK:
+					case evt.KEY_SCROLL_LOCK:
+					// I'll get these in keypress after the OS munges them based on numlock
+					case evt.KEY_NUMPAD_0:
+					case evt.KEY_NUMPAD_1:
+					case evt.KEY_NUMPAD_2:
+					case evt.KEY_NUMPAD_3:
+					case evt.KEY_NUMPAD_4:
+					case evt.KEY_NUMPAD_5:
+					case evt.KEY_NUMPAD_6:
+					case evt.KEY_NUMPAD_7:
+					case evt.KEY_NUMPAD_8:
+					case evt.KEY_NUMPAD_9:
+					case evt.KEY_NUMPAD_PERIOD:
+						break; // just ignore the keys that can morph
+					case evt.KEY_NUMPAD_MULTIPLY:
+					case evt.KEY_NUMPAD_PLUS:
+					case evt.KEY_NUMPAD_ENTER:
+					case evt.KEY_NUMPAD_MINUS:
+					case evt.KEY_NUMPAD_DIVIDE:
+						break; // I could handle these but just pick them up in keypress
+					case evt.KEY_PAUSE:
+					case evt.KEY_TAB:
+					case evt.KEY_BACKSPACE:
+					case evt.KEY_ENTER:
+					case evt.KEY_ESCAPE:
+					case evt.KEY_PAGE_UP:
+					case evt.KEY_PAGE_DOWN:
+					case evt.KEY_END:
+					case evt.KEY_HOME:
+					case evt.KEY_LEFT_ARROW:
+					case evt.KEY_UP_ARROW:
+					case evt.KEY_RIGHT_ARROW:
+					case evt.KEY_DOWN_ARROW:
+					case evt.KEY_INSERT:
+					case evt.KEY_DELETE:
+					case evt.KEY_F1:
+					case evt.KEY_F2:
+					case evt.KEY_F3:
+					case evt.KEY_F4:
+					case evt.KEY_F5:
+					case evt.KEY_F6:
+					case evt.KEY_F7:
+					case evt.KEY_F8:
+					case evt.KEY_F9:
+					case evt.KEY_F10:
+					case evt.KEY_F11:
+					case evt.KEY_F12:
+					case evt.KEY_F12:
+					case evt.KEY_F13:
+					case evt.KEY_F14:
+					case evt.KEY_F15:
+					case evt.KEY_CLEAR:
+					case evt.KEY_HELP:
+						evt.key = evt.keyCode;
+						break;
+					default:
+						if(evt.ctrlKey || evt.altKey){
+							var unifiedCharCode = evt.keyCode;
+							// if lower case but keycode is uppercase, convert it
+							if(unifiedCharCode >= 65 && unifiedCharCode <= 90 && evt.shiftKey == false){
+								unifiedCharCode += 32;
+							}
+							if(unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey){
+								unifiedCharCode += 96; // 001-032 = ctrl+[a-z]
+							}
+							evt.key = String.fromCharCode(unifiedCharCode);
+						}
+				}
+			} else if(evt["type"] == "keypress"){
+				if(dojo.render.html.opera){
+					if(evt.which == 0){
+						evt.key = evt.keyCode;
+					}else if(evt.which > 0){
+						switch(evt.which){
+							case evt.KEY_SHIFT:
+							case evt.KEY_CTRL:
+							case evt.KEY_ALT:
+							case evt.KEY_CAPS_LOCK:
+							case evt.KEY_NUM_LOCK:
+							case evt.KEY_SCROLL_LOCK:
+								break;
+							case evt.KEY_PAUSE:
+							case evt.KEY_TAB:
+							case evt.KEY_BACKSPACE:
+							case evt.KEY_ENTER:
+							case evt.KEY_ESCAPE:
+								evt.key = evt.which;
+								break;
+							default:
+								var unifiedCharCode = evt.which;
+								if((evt.ctrlKey || evt.altKey || evt.metaKey) && (evt.which >= 65 && evt.which <= 90 && evt.shiftKey == false)){
+									unifiedCharCode += 32;
+								}
+								evt.key = String.fromCharCode(unifiedCharCode);
+						}
+					}
+				}else if(dojo.render.html.ie){ // catch some IE keys that are hard to get in keyDown
+					// key combinations were handled in onKeyDown
+					if(!evt.ctrlKey && !evt.altKey && evt.keyCode >= evt.KEY_SPACE){
+						evt.key = String.fromCharCode(evt.keyCode);
+					}
+				}else if(dojo.render.html.safari){
+					switch(evt.keyCode){
+						case 63232: evt.key = evt.KEY_UP_ARROW; break;
+						case 63233: evt.key = evt.KEY_DOWN_ARROW; break;
+						case 63234: evt.key = evt.KEY_LEFT_ARROW; break;
+						case 63235: evt.key = evt.KEY_RIGHT_ARROW; break;
+						default: 
+							evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode;
+					}
+				}else{
+					evt.key = evt.charCode > 0 ? String.fromCharCode(evt.charCode) : evt.keyCode;
+				}
+			}
+		}
+		if(dojo.render.html.ie){
+			if(!evt.target){ evt.target = evt.srcElement; }
+			if(!evt.currentTarget){ evt.currentTarget = (sender ? sender : evt.srcElement); }
+			if(!evt.layerX){ evt.layerX = evt.offsetX; }
+			if(!evt.layerY){ evt.layerY = evt.offsetY; }
+			// FIXME: scroll position query is duped from dojo.html to avoid dependency on that entire module
+			// DONOT replace the following to use dojo.body(), in IE, document.documentElement should be used
+			// here rather than document.body
+			var doc = (evt.srcElement && evt.srcElement.ownerDocument) ? evt.srcElement.ownerDocument : document;
+			var docBody = ((dojo.render.html.ie55)||(doc["compatMode"] == "BackCompat")) ? doc.body : doc.documentElement;
+			if(!evt.pageX){ evt.pageX = evt.clientX + (docBody.scrollLeft || 0) }
+			if(!evt.pageY){ evt.pageY = evt.clientY + (docBody.scrollTop || 0) }
+			// mouseover
+			if(evt.type == "mouseover"){ evt.relatedTarget = evt.fromElement; }
+			// mouseout
+			if(evt.type == "mouseout"){ evt.relatedTarget = evt.toElement; }
+			this.currentEvent = evt;
+			evt.callListener = this.callListener;
+			evt.stopPropagation = this._stopPropagation;
+			evt.preventDefault = this._preventDefault;
+		}
+		return evt; // Event
+	}
+
+	this.stopEvent = function(/*Event*/evt){
+		// summary:
+		//		prevents propigation and clobbers the default action of the
+		//		passed event
+		// evt: Optional for IE. The native event object.
+		if(window.event){
+			evt.returnValue = false;
+			evt.cancelBubble = true;
+		}else{
+			evt.preventDefault();
+			evt.stopPropagation();
+		}
+	}
+}

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/browser.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,878 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.event.common");
+
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.lang.func");
+
+// TODO: connection filter functions
+//			these are functions that accept a method invocation (like around
+//			advice) and return a boolean based on it. That value determines
+//			whether or not the connection proceeds. It could "feel" like around
+//			advice for those who know what it is (calling proceed() or not),
+//			but I think presenting it as a "filter" and/or calling it with the
+//			function args and not the MethodInvocation might make it more
+//			palletable to "normal" users than around-advice currently is
+// TODO: execution scope mangling
+//			YUI's event facility by default executes listeners in the context
+//			of the source object. This is very odd, but should probably be
+//			supported as an option (both for the source and for the dest). It
+//			can be thought of as a connection-specific hitch().
+// TODO: more resiliency for 4+ arguments to connect()
+
+dojo.event = new function(){
+	this._canTimeout = dojo.lang.isFunction(dj_global["setTimeout"])||dojo.lang.isAlien(dj_global["setTimeout"]);
+
+	// FIXME: where should we put this method (not here!)?
+	function interpolateArgs(args, searchForNames){
+		var dl = dojo.lang;
+		var ao = {
+			srcObj: dj_global,
+			srcFunc: null,
+			adviceObj: dj_global,
+			adviceFunc: null,
+			aroundObj: null,
+			aroundFunc: null,
+			adviceType: (args.length>2) ? args[0] : "after",
+			precedence: "last",
+			once: false,
+			delay: null,
+			rate: 0,
+			adviceMsg: false
+		};
+
+		switch(args.length){
+			case 0: return;
+			case 1: return;
+			case 2:
+				ao.srcFunc = args[0];
+				ao.adviceFunc = args[1];
+				break;
+			case 3:
+				if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isString(args[2]))){
+					ao.adviceType = "after";
+					ao.srcObj = args[0];
+					ao.srcFunc = args[1];
+					ao.adviceFunc = args[2];
+				}else if((dl.isString(args[1]))&&(dl.isString(args[2]))){
+					ao.srcFunc = args[1];
+					ao.adviceFunc = args[2];
+				}else if((dl.isObject(args[0]))&&(dl.isString(args[1]))&&(dl.isFunction(args[2]))){
+					ao.adviceType = "after";
+					ao.srcObj = args[0];
+					ao.srcFunc = args[1];
+					var tmpName  = dl.nameAnonFunc(args[2], ao.adviceObj, searchForNames);
+					ao.adviceFunc = tmpName;
+				}else if((dl.isFunction(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))){
+					ao.adviceType = "after";
+					ao.srcObj = dj_global;
+					var tmpName  = dl.nameAnonFunc(args[0], ao.srcObj, searchForNames);
+					ao.srcFunc = tmpName;
+					ao.adviceObj = args[1];
+					ao.adviceFunc = args[2];
+				}
+				break;
+			case 4:
+				if((dl.isObject(args[0]))&&(dl.isObject(args[2]))){
+					// we can assume that we've got an old-style "connect" from
+					// the sigslot school of event attachment. We therefore
+					// assume after-advice.
+					ao.adviceType = "after";
+					ao.srcObj = args[0];
+					ao.srcFunc = args[1];
+					ao.adviceObj = args[2];
+					ao.adviceFunc = args[3];
+				}else if((dl.isString(args[0]))&&(dl.isString(args[1]))&&(dl.isObject(args[2]))){
+					ao.adviceType = args[0];
+					ao.srcObj = dj_global;
+					ao.srcFunc = args[1];
+					ao.adviceObj = args[2];
+					ao.adviceFunc = args[3];
+				}else if((dl.isString(args[0]))&&(dl.isFunction(args[1]))&&(dl.isObject(args[2]))){
+					ao.adviceType = args[0];
+					ao.srcObj = dj_global;
+					var tmpName  = dl.nameAnonFunc(args[1], dj_global, searchForNames);
+					ao.srcFunc = tmpName;
+					ao.adviceObj = args[2];
+					ao.adviceFunc = args[3];
+				}else if((dl.isString(args[0]))&&(dl.isObject(args[1]))&&(dl.isString(args[2]))&&(dl.isFunction(args[3]))){
+					ao.srcObj = args[1];
+					ao.srcFunc = args[2];
+					var tmpName  = dl.nameAnonFunc(args[3], dj_global, searchForNames);
+					ao.adviceObj = dj_global;
+					ao.adviceFunc = tmpName;
+				}else if(dl.isObject(args[1])){
+					ao.srcObj = args[1];
+					ao.srcFunc = args[2];
+					ao.adviceObj = dj_global;
+					ao.adviceFunc = args[3];
+				}else if(dl.isObject(args[2])){
+					ao.srcObj = dj_global;
+					ao.srcFunc = args[1];
+					ao.adviceObj = args[2];
+					ao.adviceFunc = args[3];
+				}else{
+					ao.srcObj = ao.adviceObj = ao.aroundObj = dj_global;
+					ao.srcFunc = args[1];
+					ao.adviceFunc = args[2];
+					ao.aroundFunc = args[3];
+				}
+				break;
+			case 6:
+				ao.srcObj = args[1];
+				ao.srcFunc = args[2];
+				ao.adviceObj = args[3]
+				ao.adviceFunc = args[4];
+				ao.aroundFunc = args[5];
+				ao.aroundObj = dj_global;
+				break;
+			default:
+				ao.srcObj = args[1];
+				ao.srcFunc = args[2];
+				ao.adviceObj = args[3]
+				ao.adviceFunc = args[4];
+				ao.aroundObj = args[5];
+				ao.aroundFunc = args[6];
+				ao.once = args[7];
+				ao.delay = args[8];
+				ao.rate = args[9];
+				ao.adviceMsg = args[10];
+				break;
+		}
+
+		if(dl.isFunction(ao.aroundFunc)){
+			var tmpName  = dl.nameAnonFunc(ao.aroundFunc, ao.aroundObj, searchForNames);
+			ao.aroundFunc = tmpName;
+		}
+
+		if(dl.isFunction(ao.srcFunc)){
+			ao.srcFunc = dl.getNameInObj(ao.srcObj, ao.srcFunc);
+		}
+
+		if(dl.isFunction(ao.adviceFunc)){
+			ao.adviceFunc = dl.getNameInObj(ao.adviceObj, ao.adviceFunc);
+		}
+
+		if((ao.aroundObj)&&(dl.isFunction(ao.aroundFunc))){
+			ao.aroundFunc = dl.getNameInObj(ao.aroundObj, ao.aroundFunc);
+		}
+
+		if(!ao.srcObj){
+			dojo.raise("bad srcObj for srcFunc: "+ao.srcFunc);
+		}
+		if(!ao.adviceObj){
+			dojo.raise("bad adviceObj for adviceFunc: "+ao.adviceFunc);
+		}
+		
+		if(!ao.adviceFunc){
+			dojo.debug("bad adviceFunc for srcFunc: "+ao.srcFunc);
+			dojo.debugShallow(ao);
+		} 
+		
+		return ao;
+	}
+
+	this.connect = function(/*...*/){
+		// summary:
+		//		dojo.event.connect is the glue that holds most Dojo-based
+		//		applications together. Most combinations of arguments are
+		//		supported, with the connect() method attempting to disambiguate
+		//		the implied types of positional parameters. The following will
+		//		all work:
+		//			dojo.event.connect("globalFunctionName1", "globalFunctionName2");
+		//			dojo.event.connect(functionReference1, functionReference2);
+		//			dojo.event.connect("globalFunctionName1", functionReference2);
+		//			dojo.event.connect(functionReference1, "globalFunctionName2");
+		//			dojo.event.connect(scope1, "functionName1", "globalFunctionName2");
+		//			dojo.event.connect("globalFunctionName1", scope2, "functionName2");
+		//			dojo.event.connect(scope1, "functionName1", scope2, "functionName2");
+		//			dojo.event.connect("after", scope1, "functionName1", scope2, "functionName2");
+		//			dojo.event.connect("before", scope1, "functionName1", scope2, "functionName2");
+		//			dojo.event.connect("around", 	scope1, "functionName1", 
+		//											scope2, "functionName2",
+		//											aroundFunctionReference);
+		//			dojo.event.connect("around", 	scope1, "functionName1", 
+		//											scope2, "functionName2",
+		//											scope3, "aroundFunctionName");
+		//			dojo.event.connect("before-around", 	scope1, "functionName1", 
+		//													scope2, "functionName2",
+		//													aroundFunctionReference);
+		//			dojo.event.connect("after-around", 		scope1, "functionName1", 
+		//													scope2, "functionName2",
+		//													aroundFunctionReference);
+		//			dojo.event.connect("after-around", 		scope1, "functionName1", 
+		//													scope2, "functionName2",
+		//													scope3, "aroundFunctionName");
+		//			dojo.event.connect("around", 	scope1, "functionName1", 
+		//											scope2, "functionName2",
+		//											scope3, "aroundFunctionName", true, 30);
+		//			dojo.event.connect("around", 	scope1, "functionName1", 
+		//											scope2, "functionName2",
+		//											scope3, "aroundFunctionName", null, null, 10);
+		// adviceType: 
+		//		Optional. String. One of "before", "after", "around",
+		//		"before-around", or "after-around". FIXME
+		// srcObj:
+		//		the scope in which to locate/execute the named srcFunc. Along
+		//		with srcFunc, this creates a way to dereference the function to
+		//		call. So if the function in question is "foo.bar", the
+		//		srcObj/srcFunc pair would be foo and "bar", where "bar" is a
+		//		string and foo is an object reference.
+		// srcFunc:
+		//		the name of the function to connect to. When it is executed,
+		//		the listener being registered with this call will be called.
+		//		The adviceType defines the call order between the source and
+		//		the target functions.
+		// adviceObj:
+		//		the scope in which to locate/execute the named adviceFunc.
+		// adviceFunc:
+		//		the name of the function being conected to srcObj.srcFunc
+		// aroundObj:
+		//		the scope in which to locate/execute the named aroundFunc.
+		// aroundFunc:
+		//		the name of, or a reference to, the function that will be used
+		//		to mediate the advice call. Around advice requires a special
+		//		unary function that will be passed a "MethodInvocation" object.
+		//		These objects have several important properties, namely:
+		//			- args
+		//				a mutable array of arguments to be passed into the
+		//				wrapped function
+		//			- proceed
+		//				a function that "continues" the invocation. The result
+		//				of this function is the return of the wrapped function.
+		//				You can then manipulate this return before passing it
+		//				back out (or take further action based on it).
+		// once:
+		//		boolean that determines whether or not this connect() will
+		//		create a new connection if an identical connect() has already
+		//		been made. Defaults to "false".
+		// delay:
+		//		an optional delay (in ms), as an integer, for dispatch of a
+		//		listener after the source has been fired.
+		// rate:
+		//		an optional rate throttling parameter (integer, in ms). When
+		//		specified, this particular connection will not fire more than
+		//		once in the interval specified by the rate
+		// adviceMsg:
+		//		boolean. Should the listener have all the parameters passed in
+		//		as a single argument?
+
+		/*
+				ao.adviceType = args[0];
+				ao.srcObj = args[1];
+				ao.srcFunc = args[2];
+				ao.adviceObj = args[3]
+				ao.adviceFunc = args[4];
+				ao.aroundObj = args[5];
+				ao.aroundFunc = args[6];
+				ao.once = args[7];
+				ao.delay = args[8];
+				ao.rate = args[9];
+				ao.adviceMsg = args[10];
+		*/
+		if(arguments.length == 1){
+			var ao = arguments[0];
+		}else{
+			var ao = interpolateArgs(arguments, true);
+		}
+		if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){
+			if(dojo.render.html.ie){
+				ao.srcFunc = "onkeydown";
+				this.connect(ao);
+			}
+			ao.srcFunc = "onkeypress";
+		}
+
+
+		if(dojo.lang.isArray(ao.srcObj) && ao.srcObj!=""){
+			var tmpAO = {};
+			for(var x in ao){
+				tmpAO[x] = ao[x];
+			}
+			var mjps = [];
+			dojo.lang.forEach(ao.srcObj, function(src){
+				if((dojo.render.html.capable)&&(dojo.lang.isString(src))){
+					src = dojo.byId(src);
+					// dojo.debug(src);
+				}
+				tmpAO.srcObj = src;
+				// dojo.debug(tmpAO.srcObj, tmpAO.srcFunc);
+				// dojo.debug(tmpAO.adviceObj, tmpAO.adviceFunc);
+				mjps.push(dojo.event.connect.call(dojo.event, tmpAO));
+			});
+			return mjps;
+		}
+
+		// FIXME: just doing a "getForMethod()" seems to be enough to put this into infinite recursion!!
+		var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc);
+		if(ao.adviceFunc){
+			var mjp2 = dojo.event.MethodJoinPoint.getForMethod(ao.adviceObj, ao.adviceFunc);
+		}
+
+		mjp.kwAddAdvice(ao);
+
+		// advanced users might want to fsck w/ the join point manually
+		return mjp; // a MethodJoinPoint object
+	}
+
+	this.log = function(/*object or funcName*/ a1, /*funcName*/ a2){
+		// summary:
+		//		a function that will wrap and log all calls to the specified
+		//		a1.a2() function. If only a1 is passed, it'll be used as a
+		//		function or function name on the global context. Logging will
+		//		be sent to dojo.debug
+		// a1:
+		//		if a2 is passed, this should be an object. If not, it can be a
+		//		function or function name.
+		// a2:
+		//		a function name
+		var kwArgs;
+		if((arguments.length == 1)&&(typeof a1 == "object")){
+			kwArgs = a1;
+		}else{
+			kwArgs = {
+				srcObj: a1,
+				srcFunc: a2
+			};
+		}
+		kwArgs.adviceFunc = function(){
+			var argsStr = [];
+			for(var x=0; x<arguments.length; x++){
+				argsStr.push(arguments[x]);
+			}
+			dojo.debug("("+kwArgs.srcObj+")."+kwArgs.srcFunc, ":", argsStr.join(", "));
+		}
+		this.kwConnect(kwArgs);
+	}
+
+	this.connectBefore = function(){
+		// summary:
+		//	 	takes the same parameters as dojo.event.connect(), except that
+		//	 	the advice type will always be "before"
+		var args = ["before"];
+		for(var i = 0; i < arguments.length; i++){ args.push(arguments[i]); }
+		return this.connect.apply(this, args); // a MethodJoinPoint object
+	}
+
+	this.connectAround = function(){
+		// summary:
+		//	 	takes the same parameters as dojo.event.connect(), except that
+		//	 	the advice type will always be "around"
+		var args = ["around"];
+		for(var i = 0; i < arguments.length; i++){ args.push(arguments[i]); }
+		return this.connect.apply(this, args); // a MethodJoinPoint object
+	}
+
+	this.connectOnce = function(){
+		// summary:
+		//	 	takes the same parameters as dojo.event.connect(), except that
+		//	 	the "once" flag will always be set to "true"
+		var ao = interpolateArgs(arguments, true);
+		ao.once = true;
+		return this.connect(ao); // a MethodJoinPoint object
+	}
+
+	this._kwConnectImpl = function(kwArgs, disconnect){
+		var fn = (disconnect) ? "disconnect" : "connect";
+		if(typeof kwArgs["srcFunc"] == "function"){
+			kwArgs.srcObj = kwArgs["srcObj"]||dj_global;
+			var tmpName  = dojo.lang.nameAnonFunc(kwArgs.srcFunc, kwArgs.srcObj, true);
+			kwArgs.srcFunc = tmpName;
+		}
+		if(typeof kwArgs["adviceFunc"] == "function"){
+			kwArgs.adviceObj = kwArgs["adviceObj"]||dj_global;
+			var tmpName  = dojo.lang.nameAnonFunc(kwArgs.adviceFunc, kwArgs.adviceObj, true);
+			kwArgs.adviceFunc = tmpName;
+		}
+		kwArgs.srcObj = kwArgs["srcObj"]||dj_global;
+		kwArgs.adviceObj = kwArgs["adviceObj"]||kwArgs["targetObj"]||dj_global;
+		kwArgs.adviceFunc = kwArgs["adviceFunc"]||kwArgs["targetFunc"];
+		// pass kwargs to avoid unrolling/repacking
+		return dojo.event[fn](kwArgs);
+	}
+
+	this.kwConnect = function(/*Object*/ kwArgs){
+		// summary:
+		//		A version of dojo.event.connect() that takes a map of named
+		//		parameters instead of the positional parameters that
+		//		dojo.event.connect() uses. For many advanced connection types,
+		//		this can be a much more readable (and potentially faster)
+		//		alternative.
+		// kwArgs:
+		// 		An object that can have the following properties:
+		//			- adviceType
+		//			- srcObj
+		//			- srcFunc
+		//			- adviceObj
+		//			- adviceFunc 
+		//			- aroundObj
+		//			- aroundFunc
+		//			- once
+		//			- delay
+		//			- rate
+		//			- adviceMsg
+		//		As with connect, only srcFunc and adviceFunc are generally
+		//		required
+
+		return this._kwConnectImpl(kwArgs, false); // a MethodJoinPoint object
+
+	}
+
+	this.disconnect = function(){
+		// summary:
+		//		Takes the same parameters as dojo.event.connect() but destroys
+		//		an existing connection instead of building a new one. For
+		//		multiple identical connections, multiple disconnect() calls
+		//		will unroll one each time it's called.
+		if(arguments.length == 1){
+			var ao = arguments[0];
+		}else{
+			var ao = interpolateArgs(arguments, true);
+		}
+		if(!ao.adviceFunc){ return; } // nothing to disconnect
+		if(dojo.lang.isString(ao.srcFunc) && (ao.srcFunc.toLowerCase() == "onkey") ){
+			if(dojo.render.html.ie){
+				ao.srcFunc = "onkeydown";
+				this.disconnect(ao);
+			}
+			ao.srcFunc = "onkeypress";
+		}
+		var mjp = dojo.event.MethodJoinPoint.getForMethod(ao.srcObj, ao.srcFunc);
+		return mjp.removeAdvice(ao.adviceObj, ao.adviceFunc, ao.adviceType, ao.once); // a MethodJoinPoint object
+	}
+
+	this.kwDisconnect = function(kwArgs){
+		// summary:
+		//		Takes the same parameters as dojo.event.kwConnect() but
+		//		destroys an existing connection instead of building a new one.
+		return this._kwConnectImpl(kwArgs, true);
+	}
+}
+
+// exactly one of these is created whenever a method with a joint point is run,
+// if there is at least one 'around' advice.
+dojo.event.MethodInvocation = function(/*dojo.event.MethodJoinPoint*/join_point, /*Object*/obj, /*Array*/args){
+	// summary:
+	//		a class the models the call into a function. This is used under the
+	//		covers for all method invocations on both ends of a
+	//		connect()-wrapped function dispatch. This allows us to "pickle"
+	//		calls, such as in the case of around advice.
+	// join_point:
+	//		a dojo.event.MethodJoinPoint object that represents a connection
+	// obj:
+	//		the scope the call will execute in
+	// args:
+	//		an array of parameters that will get passed to the callee
+	this.jp_ = join_point;
+	this.object = obj;
+	this.args = [];
+	// make sure we don't lock into a mutable object which can change under us.
+	// It's ok if the individual items change, though.
+	for(var x=0; x<args.length; x++){
+		this.args[x] = args[x];
+	}
+	// the index of the 'around' that is currently being executed.
+	this.around_index = -1;
+}
+
+dojo.event.MethodInvocation.prototype.proceed = function(){
+	// summary:
+	//		proceed with the method call that's represented by this invocation
+	//		object
+	this.around_index++;
+	if(this.around_index >= this.jp_.around.length){
+		return this.jp_.object[this.jp_.methodname].apply(this.jp_.object, this.args);
+		// return this.jp_.run_before_after(this.object, this.args);
+	}else{
+		var ti = this.jp_.around[this.around_index];
+		var mobj = ti[0]||dj_global;
+		var meth = ti[1];
+		return mobj[meth].call(mobj, this);
+	}
+} 
+
+
+dojo.event.MethodJoinPoint = function(/*Object*/obj, /*String*/funcName){
+	this.object = obj||dj_global;
+	this.methodname = funcName;
+	this.methodfunc = this.object[funcName];
+	this.squelch = false;
+	// this.before = [];
+	// this.after = [];
+	// this.around = [];
+}
+
+dojo.event.MethodJoinPoint.getForMethod = function(/*Object*/obj, /*String*/funcName){
+	// summary:
+	//		"static" class function for returning a MethodJoinPoint from a
+	//		scoped function. If one doesn't exist, one is created.
+	// obj:
+	//		the scope to search for the function in
+	// funcName:
+	//		the name of the function to return a MethodJoinPoint for
+	if(!obj){ obj = dj_global; }
+	if(!obj[funcName]){
+		// supply a do-nothing method implementation
+		obj[funcName] = function(){};
+		if(!obj[funcName]){
+			// e.g. cannot add to inbuilt objects in IE6
+			dojo.raise("Cannot set do-nothing method on that object "+funcName);
+		}
+	}else if((!dojo.lang.isFunction(obj[funcName]))&&(!dojo.lang.isAlien(obj[funcName]))){
+		// FIXME: should we throw an exception here instead?
+		return null; 
+	}
+	// we hide our joinpoint instance in obj[funcName + '$joinpoint']
+	var jpname = funcName + "$joinpoint";
+	var jpfuncname = funcName + "$joinpoint$method";
+	var joinpoint = obj[jpname];
+	if(!joinpoint){
+		var isNode = false;
+		if(dojo.event["browser"]){
+			if( (obj["attachEvent"])||
+				(obj["nodeType"])||
+				(obj["addEventListener"]) ){
+				isNode = true;
+				dojo.event.browser.addClobberNodeAttrs(obj, [jpname, jpfuncname, funcName]);
+			}
+		}
+		var origArity = obj[funcName].length;
+		obj[jpfuncname] = obj[funcName];
+		// joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, funcName);
+		joinpoint = obj[jpname] = new dojo.event.MethodJoinPoint(obj, jpfuncname);
+		obj[funcName] = function(){ 
+			var args = [];
+
+			if((isNode)&&(!arguments.length)){
+				var evt = null;
+				try{
+					if(obj.ownerDocument){
+						evt = obj.ownerDocument.parentWindow.event;
+					}else if(obj.documentElement){
+						evt = obj.documentElement.ownerDocument.parentWindow.event;
+					}else if(obj.event){ //obj is a window
+						evt = obj.event;
+					}else{
+						evt = window.event;
+					}
+				}catch(e){
+					evt = window.event;
+				}
+
+				if(evt){
+					args.push(dojo.event.browser.fixEvent(evt, this));
+				}
+			}else{
+				for(var x=0; x<arguments.length; x++){
+					if((x==0)&&(isNode)&&(dojo.event.browser.isEvent(arguments[x]))){
+						args.push(dojo.event.browser.fixEvent(arguments[x], this));
+					}else{
+						args.push(arguments[x]);
+					}
+				}
+			}
+			// return joinpoint.run.apply(joinpoint, arguments); 
+			return joinpoint.run.apply(joinpoint, args); 
+		}
+		obj[funcName].__preJoinArity = origArity;
+	}
+	return joinpoint; // dojo.event.MethodJoinPoint
+}
+
+dojo.lang.extend(dojo.event.MethodJoinPoint, {
+	unintercept: function(){
+		// summary: 
+		//		destroy the connection to all listeners that may have been
+		//		registered on this joinpoint
+		this.object[this.methodname] = this.methodfunc;
+		this.before = [];
+		this.after = [];
+		this.around = [];
+	},
+
+	disconnect: dojo.lang.forward("unintercept"),
+
+	run: function(){
+		// summary:
+		//		execute the connection represented by this join point. The
+		//		arguments passed to run() will be passed to the function and
+		//		its listeners.
+		var obj = this.object||dj_global;
+		var args = arguments;
+
+		// optimization. We only compute once the array version of the arguments
+		// pseudo-arr in order to prevent building it each time advice is unrolled.
+		var aargs = [];
+		for(var x=0; x<args.length; x++){
+			aargs[x] = args[x];
+		}
+
+		var unrollAdvice  = function(marr){ 
+			if(!marr){
+				dojo.debug("Null argument to unrollAdvice()");
+				return;
+			}
+		  
+			var callObj = marr[0]||dj_global;
+			var callFunc = marr[1];
+			
+			if(!callObj[callFunc]){
+				dojo.raise("function \"" + callFunc + "\" does not exist on \"" + callObj + "\"");
+			}
+			
+			var aroundObj = marr[2]||dj_global;
+			var aroundFunc = marr[3];
+			var msg = marr[6];
+			var undef;
+
+			var to = {
+				args: [],
+				jp_: this,
+				object: obj,
+				proceed: function(){
+					return callObj[callFunc].apply(callObj, to.args);
+				}
+			};
+			to.args = aargs;
+
+			var delay = parseInt(marr[4]);
+			var hasDelay = ((!isNaN(delay))&&(marr[4]!==null)&&(typeof marr[4] != "undefined"));
+			if(marr[5]){
+				var rate = parseInt(marr[5]);
+				var cur = new Date();
+				var timerSet = false;
+				if((marr["last"])&&((cur-marr.last)<=rate)){
+					if(dojo.event._canTimeout){
+						if(marr["delayTimer"]){
+							clearTimeout(marr.delayTimer);
+						}
+						var tod = parseInt(rate*2); // is rate*2 naive?
+						var mcpy = dojo.lang.shallowCopy(marr);
+						marr.delayTimer = setTimeout(function(){
+							// FIXME: on IE at least, event objects from the
+							// browser can go out of scope. How (or should?) we
+							// deal with it?
+							mcpy[5] = 0;
+							unrollAdvice(mcpy);
+						}, tod);
+					}
+					return;
+				}else{
+					marr.last = cur;
+				}
+			}
+
+			// FIXME: need to enforce rates for a connection here!
+
+			if(aroundFunc){
+				// NOTE: around advice can't delay since we might otherwise depend
+				// on execution order!
+				aroundObj[aroundFunc].call(aroundObj, to);
+			}else{
+				// var tmjp = dojo.event.MethodJoinPoint.getForMethod(obj, methname);
+				if((hasDelay)&&((dojo.render.html)||(dojo.render.svg))){  // FIXME: the render checks are grotty!
+					dj_global["setTimeout"](function(){
+						if(msg){
+							callObj[callFunc].call(callObj, to); 
+						}else{
+							callObj[callFunc].apply(callObj, args); 
+						}
+					}, delay);
+				}else{ // many environments can't support delay!
+					if(msg){
+						callObj[callFunc].call(callObj, to); 
+					}else{
+						callObj[callFunc].apply(callObj, args); 
+					}
+				}
+			}
+		}
+
+		var unRollSquelch = function(){
+			if(this.squelch){
+				try{
+					return unrollAdvice.apply(this, arguments);
+				}catch(e){ 
+					dojo.debug(e);
+				}
+			}else{
+				return unrollAdvice.apply(this, arguments);
+			}
+		}
+
+		if((this["before"])&&(this.before.length>0)){
+			// pass a cloned array, if this event disconnects this event forEach on this.before wont work
+			dojo.lang.forEach(this.before.concat(new Array()), unRollSquelch);
+		}
+
+		var result;
+		try{
+			if((this["around"])&&(this.around.length>0)){
+				var mi = new dojo.event.MethodInvocation(this, obj, args);
+				result = mi.proceed();
+			}else if(this.methodfunc){
+				result = this.object[this.methodname].apply(this.object, args);
+			}
+		}catch(e){ if(!this.squelch){ dojo.raise(e); } }
+
+		if((this["after"])&&(this.after.length>0)){
+			// see comment on this.before above
+			dojo.lang.forEach(this.after.concat(new Array()), unRollSquelch);
+		}
+
+		return (this.methodfunc) ? result : null;
+	},
+
+	getArr: function(/*String*/kind){
+		// summary: return a list of listeners of the past "kind"
+		// kind:
+		//		can be one of: "before", "after", "around", "before-around", or
+		//		"after-around"
+		var type = "after";
+		// FIXME: we should be able to do this through props or Array.in()
+		if((typeof kind == "string")&&(kind.indexOf("before")!=-1)){
+			type = "before";
+		}else if(kind=="around"){
+			type = "around";
+		}
+		if(!this[type]){ this[type] = []; }
+		return this[type]; // Array
+	},
+
+	kwAddAdvice: function(/*Object*/args){
+		// summary:
+		//		adds advice to the joinpoint with arguments in a map
+		// args:
+		// 		An object that can have the following properties:
+		//			- adviceType
+		//			- adviceObj
+		//			- adviceFunc 
+		//			- aroundObj
+		//			- aroundFunc
+		//			- once
+		//			- delay
+		//			- rate
+		//			- adviceMsg
+		this.addAdvice(	args["adviceObj"], args["adviceFunc"], 
+						args["aroundObj"], args["aroundFunc"], 
+						args["adviceType"], args["precedence"], 
+						args["once"], args["delay"], args["rate"], 
+						args["adviceMsg"]);
+	},
+
+	addAdvice: function(	thisAdviceObj, thisAdvice, 
+							thisAroundObj, thisAround, 
+							adviceType, precedence, 
+							once, delay, rate, asMessage){
+		// summary:
+		//		add advice to this joinpoint using positional parameters
+		// thisAdviceObj:
+		//		the scope in which to locate/execute the named adviceFunc.
+		// thisAdviceFunc:
+		//		the name of the function being conected
+		// thisAroundObj:
+		//		the scope in which to locate/execute the named aroundFunc.
+		// thisAroundFunc:
+		//		the name of the function that will be used to mediate the
+		//		advice call.
+		// adviceType: 
+		//		Optional. String. One of "before", "after", "around",
+		//		"before-around", or "after-around". FIXME
+		// once:
+		//		boolean that determines whether or not this advice will create
+		//		a new connection if an identical advice set has already been
+		//		provided. Defaults to "false".
+		// delay:
+		//		an optional delay (in ms), as an integer, for dispatch of a
+		//		listener after the source has been fired.
+		// rate:
+		//		an optional rate throttling parameter (integer, in ms). When
+		//		specified, this particular connection will not fire more than
+		//		once in the interval specified by the rate
+		// adviceMsg:
+		//		boolean. Should the listener have all the parameters passed in
+		//		as a single argument?
+		var arr = this.getArr(adviceType);
+		if(!arr){
+			dojo.raise("bad this: " + this);
+		}
+
+		var ao = [thisAdviceObj, thisAdvice, thisAroundObj, thisAround, delay, rate, asMessage];
+		
+		if(once){
+			if(this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr) >= 0){
+				return;
+			}
+		}
+
+		if(precedence == "first"){
+			arr.unshift(ao);
+		}else{
+			arr.push(ao);
+		}
+	},
+
+	hasAdvice: function(thisAdviceObj, thisAdvice, adviceType, arr){
+		// summary:
+		//		returns the array index of the first existing connection
+		//		betweened the passed advice and this joinpoint. Will be -1 if
+		//		none exists.
+		// thisAdviceObj:
+		//		the scope in which to locate/execute the named adviceFunc.
+		// thisAdviceFunc:
+		//		the name of the function being conected
+		// adviceType: 
+		//		Optional. String. One of "before", "after", "around",
+		//		"before-around", or "after-around". FIXME
+		// arr:
+		//		Optional. The list of advices to search. Will be found via
+		//		adviceType if not passed
+		if(!arr){ arr = this.getArr(adviceType); }
+		var ind = -1;
+		for(var x=0; x<arr.length; x++){
+			var aao = (typeof thisAdvice == "object") ? (new String(thisAdvice)).toString() : thisAdvice;
+			var a1o = (typeof arr[x][1] == "object") ? (new String(arr[x][1])).toString() : arr[x][1];
+			if((arr[x][0] == thisAdviceObj)&&(a1o == aao)){
+				ind = x;
+			}
+		}
+		return ind; // Integer
+	},
+
+	removeAdvice: function(thisAdviceObj, thisAdvice, adviceType, once){
+		// summary:
+		//		returns the array index of the first existing connection
+		//		betweened the passed advice and this joinpoint. Will be -1 if
+		//		none exists.
+		// thisAdviceObj:
+		//		the scope in which to locate/execute the named adviceFunc.
+		// thisAdviceFunc:
+		//		the name of the function being conected
+		// adviceType: 
+		//		Optional. String. One of "before", "after", "around",
+		//		"before-around", or "after-around". FIXME
+		// once:
+		//		Optional. Should this only remove the first occurance of the
+		//		connection?
+		var arr = this.getArr(adviceType);
+		var ind = this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr);
+		if(ind == -1){
+			return false;
+		}
+		while(ind != -1){
+			arr.splice(ind, 1);
+			if(once){ break; }
+			ind = this.hasAdvice(thisAdviceObj, thisAdvice, adviceType, arr);
+		}
+		return true;
+	}
+});

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/common.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,201 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.require("dojo.event.common");
+dojo.provide("dojo.event.topic");
+
+dojo.event.topic = new function(){
+	this.topics = {};
+
+	this.getTopic = function(/*String*/topic){
+		// summary:
+		//		returns a topic implementation object of type
+		//		dojo.event.topic.TopicImpl
+		// topic:
+		//		a unique, opaque string that names the topic
+		if(!this.topics[topic]){
+			this.topics[topic] = new this.TopicImpl(topic);
+		}
+		return this.topics[topic]; // a dojo.event.topic.TopicImpl object
+	}
+
+	this.registerPublisher = function(/*String*/topic, /*Object*/obj, /*String*/funcName){
+		// summary:
+		//		registers a function as a publisher on a topic. Subsequent
+		//		calls to the function will cause a publish event on the topic
+		//		with the arguments passed to the function passed to registered
+		//		listeners.
+		// topic: 
+		//		a unique, opaque string that names the topic
+		// obj:
+		//		the scope to locate the function in
+		// funcName:
+		//		the name of the function to register
+		var topic = this.getTopic(topic);
+		topic.registerPublisher(obj, funcName);
+	}
+
+	this.subscribe = function(/*String*/topic, /*Object*/obj, /*String*/funcName){
+		// summary:
+		//		susbscribes the function to the topic. Subsequent events
+		//		dispached to the topic will create a function call for the
+		//		obj.funcName() function.
+		// topic: 
+		//		a unique, opaque string that names the topic
+		// obj:
+		//		the scope to locate the function in
+		// funcName:
+		//		the name of the function to being registered as a listener
+		var topic = this.getTopic(topic);
+		topic.subscribe(obj, funcName);
+	}
+
+	this.unsubscribe = function(/*String*/topic, /*Object*/obj, /*String*/funcName){
+		// summary:
+		//		unsubscribes the obj.funcName() from the topic
+		// topic: 
+		//		a unique, opaque string that names the topic
+		// obj:
+		//		the scope to locate the function in
+		// funcName:
+		//		the name of the function to being unregistered as a listener
+		var topic = this.getTopic(topic);
+		topic.unsubscribe(obj, funcName);
+	}
+
+	this.destroy = function(/*String*/topic){
+		// summary: 
+		//		destroys the topic and unregisters all listeners
+		// topic:
+		//		a unique, opaque string that names the topic
+		this.getTopic(topic).destroy();
+		delete this.topics[topic];
+	}
+
+	this.publishApply = function(/*String*/topic, /*Array*/args){
+		// summary: 
+		//		dispatches an event to the topic using the args array as the
+		//		source for the call arguments to each listener. This is similar
+		//		to JavaScript's built-in Function.apply()
+		// topic:
+		//		a unique, opaque string that names the topic
+		// args:
+		//		the arguments to be passed into listeners of the topic
+		var topic = this.getTopic(topic);
+		topic.sendMessage.apply(topic, args);
+	}
+
+	this.publish = function(/*String*/topic, /*Object*/message){
+		// summary: 
+		//		manually "publish" to the passed topic
+		// topic:
+		//		a unique, opaque string that names the topic
+		// message:
+		//		can be an array of parameters (similar to publishApply), or
+		//		will be treated as one of many arguments to be passed along in
+		//		a "flat" unrolling
+		var topic = this.getTopic(topic);
+		// if message is an array, we treat it as a set of arguments,
+		// otherwise, we just pass on the arguments passed in as-is
+		var args = [];
+		// could we use concat instead here?
+		for(var x=1; x<arguments.length; x++){
+			args.push(arguments[x]);
+		}
+		topic.sendMessage.apply(topic, args);
+	}
+}
+
+dojo.event.topic.TopicImpl = function(topicName){
+	// summary: a class to represent topics
+
+	this.topicName = topicName;
+
+	this.subscribe = function(/*Object*/listenerObject, /*Function or String*/listenerMethod){
+		// summary:
+		//		use dojo.event.connect() to attach the passed listener to the
+		//		topic represented by this object
+		// listenerObject:
+		//		if a string and listenerMethod is ommitted, this is treated as
+		//		the name of a function in the global namespace. If
+		//		listenerMethod is provided, this is the scope to find/execute
+		//		the function in.
+		// listenerMethod:
+		//		Optional. The function to register.
+		var tf = listenerMethod||listenerObject;
+		var to = (!listenerMethod) ? dj_global : listenerObject;
+		return dojo.event.kwConnect({ // dojo.event.MethodJoinPoint
+			srcObj:		this, 
+			srcFunc:	"sendMessage", 
+			adviceObj:	to,
+			adviceFunc: tf
+		});
+	}
+
+	this.unsubscribe = function(/*Object*/listenerObject, /*Function or String*/listenerMethod){
+		// summary:
+		//		use dojo.event.disconnect() to attach the passed listener to the
+		//		topic represented by this object
+		// listenerObject:
+		//		if a string and listenerMethod is ommitted, this is treated as
+		//		the name of a function in the global namespace. If
+		//		listenerMethod is provided, this is the scope to find the
+		//		function in.
+		// listenerMethod:
+		//		Optional. The function to unregister.
+		var tf = (!listenerMethod) ? listenerObject : listenerMethod;
+		var to = (!listenerMethod) ? null : listenerObject;
+		return dojo.event.kwDisconnect({ // dojo.event.MethodJoinPoint
+			srcObj:		this, 
+			srcFunc:	"sendMessage", 
+			adviceObj:	to,
+			adviceFunc: tf
+		});
+	}
+
+	this._getJoinPoint = function(){
+		return dojo.event.MethodJoinPoint.getForMethod(this, "sendMessage");
+	}
+
+	this.setSquelch = function(/*Boolean*/shouldSquelch){
+		// summary: 
+		//		determine whether or not exceptions in the calling of a
+		//		listener in the chain should stop execution of the chain.
+		this._getJoinPoint().squelch = shouldSquelch;
+	}
+
+	this.destroy = function(){
+		// summary: disconnects all listeners from this topic
+		this._getJoinPoint().disconnect();
+	}
+
+	this.registerPublisher = function(	/*Object*/publisherObject, 
+										/*Function or String*/publisherMethod){
+		// summary:
+		//		registers the passed function as a publisher on this topic.
+		//		Each time the function is called, an event will be published on
+		//		this topic.
+		// publisherObject:
+		//		if a string and listenerMethod is ommitted, this is treated as
+		//		the name of a function in the global namespace. If
+		//		listenerMethod is provided, this is the scope to find the
+		//		function in.
+		// publisherMethod:
+		//		Optional. The function to register.
+		dojo.event.connect(publisherObject, publisherMethod, this, "sendMessage");
+	}
+
+	this.sendMessage = function(message){
+		// summary: a stub to be called when a message is sent to the topic.
+
+		// The message has been propagated
+	}
+}
+

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/event/topic.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,128 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.string.Builder");
+dojo.require("dojo.string");
+dojo.require("dojo.lang.common");
+
+// NOTE: testing shows that direct "+=" concatenation is *much* faster on
+// Spidermoneky and Rhino, while arr.push()/arr.join() style concatenation is
+// significantly quicker on IE (Jscript/wsh/etc.).
+
+dojo.string.Builder = function(/* string? */str){
+	//	summary
+	this.arrConcat = (dojo.render.html.capable && dojo.render.html["ie"]);
+
+	var a = [];
+	var b = "";
+	var length = this.length = b.length;
+
+	if(this.arrConcat){
+		if(b.length > 0){
+			a.push(b);
+		}
+		b = "";
+	}
+
+	this.toString = this.valueOf = function(){ 
+		//	summary
+		//	Concatenate internal buffer and return as a string
+		return (this.arrConcat) ? a.join("") : b;	//	string
+	};
+
+	this.append = function(){
+		//	summary
+		//	Append all arguments to the end of the internal buffer
+		for(var x=0; x<arguments.length; x++){
+			var s = arguments[x];
+			if(dojo.lang.isArrayLike(s)){
+				this.append.apply(this, s);
+			} else {
+				if(this.arrConcat){
+					a.push(s);
+				}else{
+					b+=s;
+				}
+				length += s.length;
+				this.length = length;
+			}
+		}
+		return this;	//	dojo.string.Builder
+	};
+
+	this.clear = function(){
+		//	summary
+		//	Clear the internal buffer.
+		a = [];
+		b = "";
+		length = this.length = 0;
+		return this;	//	dojo.string.Builder
+	};
+
+	this.remove = function(/* integer */f, /* integer */l){
+		//	summary
+		//	Remove a section of string from the internal buffer.
+		var s = ""; 
+		if(this.arrConcat){
+			b = a.join(""); 
+		}
+		a=[];
+		if(f>0){
+			s = b.substring(0, (f-1));
+		}
+		b = s + b.substring(f + l); 
+		length = this.length = b.length; 
+		if(this.arrConcat){
+			a.push(b);
+			b="";
+		}
+		return this;	//	dojo.string.Builder
+	};
+
+	this.replace = function(/* string */o, /* string */n){
+		//	summary
+		//	replace phrase *o* with phrase *n*.
+		if(this.arrConcat){
+			b = a.join(""); 
+		}
+		a = []; 
+		b = b.replace(o,n); 
+		length = this.length = b.length; 
+		if(this.arrConcat){
+			a.push(b);
+			b="";
+		}
+		return this;	//	dojo.string.Builder
+	};
+
+	this.insert = function(/* integer */idx, /* string */s){
+		//	summary
+		//	Insert string s at index idx.
+		if(this.arrConcat){
+			b = a.join(""); 
+		}
+		a=[];
+		if(idx == 0){
+			b = s + b;
+		}else{
+			var t = b.split("");
+			t.splice(idx,0,s);
+			b = t.join("")
+		}
+		length = this.length = b.length; 
+		if(this.arrConcat){
+			a.push(b); 
+			b="";
+		}
+		return this;	//	dojo.string.Builder
+	};
+
+	this.append.apply(this, arguments);
+};

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/Builder.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,19 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.kwCompoundRequire({
+	common: [
+		"dojo.string",
+		"dojo.string.common",
+		"dojo.string.extras",
+		"dojo.string.Builder"
+	]
+});
+dojo.provide("dojo.string.*");

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js?rev=726819&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js (added)
+++ continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js Mon Dec 15 13:50:59 2008
@@ -0,0 +1,78 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+dojo.provide("dojo.string.common");
+
+dojo.string.trim = function(/* string */str, /* integer? */wh){
+	//	summary
+	//	Trim whitespace from str.  If wh > 0, trim from start, if wh < 0, trim from end, else both
+	if(!str.replace){ return str; }
+	if(!str.length){ return str; }
+	var re = (wh > 0) ? (/^\s+/) : (wh < 0) ? (/\s+$/) : (/^\s+|\s+$/g);
+	return str.replace(re, "");	//	string
+}
+
+dojo.string.trimStart = function(/* string */str) {
+	//	summary
+	//	Trim whitespace at the beginning of 'str'
+	return dojo.string.trim(str, 1);	//	string
+}
+
+dojo.string.trimEnd = function(/* string */str) {
+	//	summary
+	//	Trim whitespace at the end of 'str'
+	return dojo.string.trim(str, -1);
+}
+
+dojo.string.repeat = function(/* string */str, /* integer */count, /* string? */separator) {
+	//	summary
+	//	Return 'str' repeated 'count' times, optionally placing 'separator' between each rep
+	var out = "";
+	for(var i = 0; i < count; i++) {
+		out += str;
+		if(separator && i < count - 1) {
+			out += separator;
+		}
+	}
+	return out;	//	string
+}
+
+dojo.string.pad = function(/* string */str, /* integer */len/*=2*/, /* string */ c/*='0'*/, /* integer */dir/*=1*/) {
+	//	summary
+	//	Pad 'str' to guarantee that it is at least 'len' length with the character 'c' at either the 
+	//	start (dir=1) or end (dir=-1) of the string
+	var out = String(str);
+	if(!c) {
+		c = '0';
+	}
+	if(!dir) {
+		dir = 1;
+	}
+	while(out.length < len) {
+		if(dir > 0) {
+			out = c + out;
+		} else {
+			out += c;
+		}
+	}
+	return out;	//	string
+}
+
+dojo.string.padLeft = function(/* string */str, /* integer */len, /* string */c) {
+	//	summary
+	//	same as dojo.string.pad(str, len, c, 1)
+	return dojo.string.pad(str, len, c, 1);	//	string
+}
+
+dojo.string.padRight = function(/* string */str, /* integer */len, /* string */c) {
+	//	summary
+	//	same as dojo.string.pad(str, len, c, -1)
+	return dojo.string.pad(str, len, c, -1);	//	string
+}

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js
------------------------------------------------------------------------------
    svn:executable = *

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/struts/dojo/string/common.js
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision



Mime
View raw message