geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r794787 [7/34] - in /geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src: ./ animation/ cal/ charting/ charting/svg/ charting/vml/ collections/ crypto/ data/ data/core/ data/old/ data/old/format/ data/old/provider/ date/ debug/ ...
Date Thu, 16 Jul 2009 19:14:56 GMT
Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,54 @@
+/*
+	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.dnd.HtmlDragMove");
+dojo.require("dojo.dnd.*");
+dojo.declare("dojo.dnd.HtmlDragMoveSource", dojo.dnd.HtmlDragSource, {onDragStart:function () {
+	var dragObj = new dojo.dnd.HtmlDragMoveObject(this.dragObject, this.type);
+	if (this.constrainToContainer) {
+		dragObj.constrainTo(this.constrainingContainer);
+	}
+	return dragObj;
+}, onSelected:function () {
+	for (var i = 0; i < this.dragObjects.length; i++) {
+		dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragMoveSource(this.dragObjects[i]));
+	}
+}});
+dojo.declare("dojo.dnd.HtmlDragMoveObject", dojo.dnd.HtmlDragObject, {onDragStart:function (e) {
+	dojo.html.clearSelection();
+	this.dragClone = this.domNode;
+	if (dojo.html.getComputedStyle(this.domNode, "position") != "absolute") {
+		this.domNode.style.position = "relative";
+	}
+	var left = parseInt(dojo.html.getComputedStyle(this.domNode, "left"));
+	var top = parseInt(dojo.html.getComputedStyle(this.domNode, "top"));
+	this.dragStartPosition = {x:isNaN(left) ? 0 : left, y:isNaN(top) ? 0 : top};
+	this.scrollOffset = dojo.html.getScroll().offset;
+	this.dragOffset = {y:this.dragStartPosition.y - e.pageY, x:this.dragStartPosition.x - e.pageX};
+	this.containingBlockPosition = {x:0, y:0};
+	if (this.constrainToContainer) {
+		this.constraints = this.getConstraints();
+	}
+	dojo.event.connect(this.domNode, "onclick", this, "_squelchOnClick");
+}, onDragEnd:function (e) {
+}, setAbsolutePosition:function (x, y) {
+	if (!this.disableY) {
+		this.domNode.style.top = y + "px";
+	}
+	if (!this.disableX) {
+		this.domNode.style.left = x + "px";
+	}
+}, _squelchOnClick:function (e) {
+	dojo.event.browser.stopEvent(e);
+	dojo.event.disconnect(this.domNode, "onclick", this, "_squelchOnClick");
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,24 @@
+/*
+	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.dnd.Sortable");
+dojo.require("dojo.dnd.*");
+dojo.dnd.Sortable = function () {
+};
+dojo.lang.extend(dojo.dnd.Sortable, {ondragstart:function (e) {
+	var dragObject = e.target;
+	while (dragObject.parentNode && dragObject.parentNode != this) {
+		dragObject = dragObject.parentNode;
+	}
+	return dragObject;
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,253 @@
+/*
+	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.dnd.TreeDragAndDrop");
+dojo.require("dojo.dnd.HtmlDragAndDrop");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.html.layout");
+dojo.dnd.TreeDragSource = function (node, syncController, type, treeNode) {
+	this.controller = syncController;
+	this.treeNode = treeNode;
+	dojo.dnd.HtmlDragSource.call(this, node, type);
+};
+dojo.inherits(dojo.dnd.TreeDragSource, dojo.dnd.HtmlDragSource);
+dojo.lang.extend(dojo.dnd.TreeDragSource, {onDragStart:function () {
+	var dragObject = dojo.dnd.HtmlDragSource.prototype.onDragStart.call(this);
+	dragObject.treeNode = this.treeNode;
+	dragObject.onDragStart = dojo.lang.hitch(dragObject, function (e) {
+		this.savedSelectedNode = this.treeNode.tree.selector.selectedNode;
+		if (this.savedSelectedNode) {
+			this.savedSelectedNode.unMarkSelected();
+		}
+		var result = dojo.dnd.HtmlDragObject.prototype.onDragStart.apply(this, arguments);
+		var cloneGrid = this.dragClone.getElementsByTagName("img");
+		for (var i = 0; i < cloneGrid.length; i++) {
+			cloneGrid.item(i).style.backgroundImage = "url()";
+		}
+		return result;
+	});
+	dragObject.onDragEnd = function (e) {
+		if (this.savedSelectedNode) {
+			this.savedSelectedNode.markSelected();
+		}
+		return dojo.dnd.HtmlDragObject.prototype.onDragEnd.apply(this, arguments);
+	};
+	return dragObject;
+}, onDragEnd:function (e) {
+	var res = dojo.dnd.HtmlDragSource.prototype.onDragEnd.call(this, e);
+	return res;
+}});
+dojo.dnd.TreeDropTarget = function (domNode, controller, type, treeNode) {
+	this.treeNode = treeNode;
+	this.controller = controller;
+	dojo.dnd.HtmlDropTarget.apply(this, [domNode, type]);
+};
+dojo.inherits(dojo.dnd.TreeDropTarget, dojo.dnd.HtmlDropTarget);
+dojo.lang.extend(dojo.dnd.TreeDropTarget, {autoExpandDelay:1500, autoExpandTimer:null, position:null, indicatorStyle:"2px black solid", showIndicator:function (position) {
+	if (this.position == position) {
+		return;
+	}
+	this.hideIndicator();
+	this.position = position;
+	if (position == "before") {
+		this.treeNode.labelNode.style.borderTop = this.indicatorStyle;
+	} else {
+		if (position == "after") {
+			this.treeNode.labelNode.style.borderBottom = this.indicatorStyle;
+		} else {
+			if (position == "onto") {
+				this.treeNode.markSelected();
+			}
+		}
+	}
+}, hideIndicator:function () {
+	this.treeNode.labelNode.style.borderBottom = "";
+	this.treeNode.labelNode.style.borderTop = "";
+	this.treeNode.unMarkSelected();
+	this.position = null;
+}, onDragOver:function (e) {
+	var accepts = dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this, arguments);
+	if (accepts && this.treeNode.isFolder && !this.treeNode.isExpanded) {
+		this.setAutoExpandTimer();
+	}
+	return accepts;
+}, accepts:function (dragObjects) {
+	var accepts = dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this, arguments);
+	if (!accepts) {
+		return false;
+	}
+	var sourceTreeNode = dragObjects[0].treeNode;
+	if (dojo.lang.isUndefined(sourceTreeNode) || !sourceTreeNode || !sourceTreeNode.isTreeNode) {
+		dojo.raise("Source is not TreeNode or not found");
+	}
+	if (sourceTreeNode === this.treeNode) {
+		return false;
+	}
+	return true;
+}, setAutoExpandTimer:function () {
+	var _this = this;
+	var autoExpand = function () {
+		if (dojo.dnd.dragManager.currentDropTarget === _this) {
+			_this.controller.expand(_this.treeNode);
+		}
+	};
+	this.autoExpandTimer = dojo.lang.setTimeout(autoExpand, _this.autoExpandDelay);
+}, getDNDMode:function () {
+	return this.treeNode.tree.DNDMode;
+}, getAcceptPosition:function (e, sourceTreeNode) {
+	var DNDMode = this.getDNDMode();
+	if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO && !(!this.treeNode.actionIsDisabled(dojo.widget.TreeNode.prototype.actions.ADDCHILD) && sourceTreeNode.parent !== this.treeNode && this.controller.canMove(sourceTreeNode, this.treeNode))) {
+		DNDMode &= ~dojo.widget.Tree.prototype.DNDModes.ONTO;
+	}
+	var position = this.getPosition(e, DNDMode);
+	if (position == "onto" || (!this.isAdjacentNode(sourceTreeNode, position) && this.controller.canMove(sourceTreeNode, this.treeNode.parent))) {
+		return position;
+	} else {
+		return false;
+	}
+}, onDragOut:function (e) {
+	this.clearAutoExpandTimer();
+	this.hideIndicator();
+}, clearAutoExpandTimer:function () {
+	if (this.autoExpandTimer) {
+		clearTimeout(this.autoExpandTimer);
+		this.autoExpandTimer = null;
+	}
+}, onDragMove:function (e, dragObjects) {
+	var sourceTreeNode = dragObjects[0].treeNode;
+	var position = this.getAcceptPosition(e, sourceTreeNode);
+	if (position) {
+		this.showIndicator(position);
+	}
+}, isAdjacentNode:function (sourceNode, position) {
+	if (sourceNode === this.treeNode) {
+		return true;
+	}
+	if (sourceNode.getNextSibling() === this.treeNode && position == "before") {
+		return true;
+	}
+	if (sourceNode.getPreviousSibling() === this.treeNode && position == "after") {
+		return true;
+	}
+	return false;
+}, getPosition:function (e, DNDMode) {
+	var node = dojo.byId(this.treeNode.labelNode);
+	var mousey = e.pageY || e.clientY + dojo.body().scrollTop;
+	var nodey = dojo.html.getAbsolutePosition(node).y;
+	var height = dojo.html.getBorderBox(node).height;
+	var relY = mousey - nodey;
+	var p = relY / height;
+	var position = "";
+	if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO && DNDMode & dojo.widget.Tree.prototype.DNDModes.BETWEEN) {
+		if (p <= 0.3) {
+			position = "before";
+		} else {
+			if (p <= 0.7) {
+				position = "onto";
+			} else {
+				position = "after";
+			}
+		}
+	} else {
+		if (DNDMode & dojo.widget.Tree.prototype.DNDModes.BETWEEN) {
+			if (p <= 0.5) {
+				position = "before";
+			} else {
+				position = "after";
+			}
+		} else {
+			if (DNDMode & dojo.widget.Tree.prototype.DNDModes.ONTO) {
+				position = "onto";
+			}
+		}
+	}
+	return position;
+}, getTargetParentIndex:function (sourceTreeNode, position) {
+	var index = position == "before" ? this.treeNode.getParentIndex() : this.treeNode.getParentIndex() + 1;
+	if (this.treeNode.parent === sourceTreeNode.parent && this.treeNode.getParentIndex() > sourceTreeNode.getParentIndex()) {
+		index--;
+	}
+	return index;
+}, onDrop:function (e) {
+	var position = this.position;
+	this.onDragOut(e);
+	var sourceTreeNode = e.dragObject.treeNode;
+	if (!dojo.lang.isObject(sourceTreeNode)) {
+		dojo.raise("TreeNode not found in dragObject");
+	}
+	if (position == "onto") {
+		return this.controller.move(sourceTreeNode, this.treeNode, 0);
+	} else {
+		var index = this.getTargetParentIndex(sourceTreeNode, position);
+		return this.controller.move(sourceTreeNode, this.treeNode.parent, index);
+	}
+}});
+dojo.dnd.TreeDNDController = function (treeController) {
+	this.treeController = treeController;
+	this.dragSources = {};
+	this.dropTargets = {};
+};
+dojo.lang.extend(dojo.dnd.TreeDNDController, {listenTree:function (tree) {
+	dojo.event.topic.subscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode");
+	dojo.event.topic.subscribe(tree.eventNames.moveFrom, this, "onMoveFrom");
+	dojo.event.topic.subscribe(tree.eventNames.moveTo, this, "onMoveTo");
+	dojo.event.topic.subscribe(tree.eventNames.addChild, this, "onAddChild");
+	dojo.event.topic.subscribe(tree.eventNames.removeNode, this, "onRemoveNode");
+	dojo.event.topic.subscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy");
+}, unlistenTree:function (tree) {
+	dojo.event.topic.unsubscribe(tree.eventNames.createDOMNode, this, "onCreateDOMNode");
+	dojo.event.topic.unsubscribe(tree.eventNames.moveFrom, this, "onMoveFrom");
+	dojo.event.topic.unsubscribe(tree.eventNames.moveTo, this, "onMoveTo");
+	dojo.event.topic.unsubscribe(tree.eventNames.addChild, this, "onAddChild");
+	dojo.event.topic.unsubscribe(tree.eventNames.removeNode, this, "onRemoveNode");
+	dojo.event.topic.unsubscribe(tree.eventNames.treeDestroy, this, "onTreeDestroy");
+}, onTreeDestroy:function (message) {
+	this.unlistenTree(message.source);
+}, onCreateDOMNode:function (message) {
+	this.registerDNDNode(message.source);
+}, onAddChild:function (message) {
+	this.registerDNDNode(message.child);
+}, onMoveFrom:function (message) {
+	var _this = this;
+	dojo.lang.forEach(message.child.getDescendants(), function (node) {
+		_this.unregisterDNDNode(node);
+	});
+}, onMoveTo:function (message) {
+	var _this = this;
+	dojo.lang.forEach(message.child.getDescendants(), function (node) {
+		_this.registerDNDNode(node);
+	});
+}, registerDNDNode:function (node) {
+	if (!node.tree.DNDMode) {
+		return;
+	}
+	var source = null;
+	var target = null;
+	if (!node.actionIsDisabled(node.actions.MOVE)) {
+		var source = new dojo.dnd.TreeDragSource(node.labelNode, this, node.tree.widgetId, node);
+		this.dragSources[node.widgetId] = source;
+	}
+	var target = new dojo.dnd.TreeDropTarget(node.labelNode, this.treeController, node.tree.DNDAcceptTypes, node);
+	this.dropTargets[node.widgetId] = target;
+}, unregisterDNDNode:function (node) {
+	if (this.dragSources[node.widgetId]) {
+		dojo.dnd.dragManager.unregisterDragSource(this.dragSources[node.widgetId]);
+		delete this.dragSources[node.widgetId];
+	}
+	if (this.dropTargets[node.widgetId]) {
+		dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[node.widgetId]);
+		delete this.dropTargets[node.widgetId];
+	}
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,218 @@
+/*
+	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.dnd.TreeDragAndDropV3");
+dojo.require("dojo.dnd.HtmlDragAndDrop");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.Deferred");
+dojo.require("dojo.html.layout");
+dojo.dnd.TreeDragSourceV3 = function (node, syncController, type, treeNode) {
+	this.controller = syncController;
+	this.treeNode = treeNode;
+	dojo.dnd.HtmlDragSource.call(this, node, type);
+};
+dojo.inherits(dojo.dnd.TreeDragSourceV3, dojo.dnd.HtmlDragSource);
+dojo.dnd.TreeDropTargetV3 = function (domNode, controller, type, treeNode) {
+	this.treeNode = treeNode;
+	this.controller = controller;
+	dojo.dnd.HtmlDropTarget.call(this, domNode, type);
+};
+dojo.inherits(dojo.dnd.TreeDropTargetV3, dojo.dnd.HtmlDropTarget);
+dojo.lang.extend(dojo.dnd.TreeDropTargetV3, {autoExpandDelay:1500, autoExpandTimer:null, position:null, indicatorStyle:"2px black groove", showIndicator:function (position) {
+	if (this.position == position) {
+		return;
+	}
+	this.hideIndicator();
+	this.position = position;
+	var node = this.treeNode;
+	node.contentNode.style.width = dojo.html.getBorderBox(node.labelNode).width + "px";
+	if (position == "onto") {
+		node.contentNode.style.border = this.indicatorStyle;
+	} else {
+		if (position == "before") {
+			node.contentNode.style.borderTop = this.indicatorStyle;
+		} else {
+			if (position == "after") {
+				node.contentNode.style.borderBottom = this.indicatorStyle;
+			}
+		}
+	}
+}, hideIndicator:function () {
+	this.treeNode.contentNode.style.borderBottom = "";
+	this.treeNode.contentNode.style.borderTop = "";
+	this.treeNode.contentNode.style.border = "";
+	this.treeNode.contentNode.style.width = "";
+	this.position = null;
+}, onDragOver:function (e) {
+	var accepts = dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this, arguments);
+	if (accepts && this.treeNode.isFolder && !this.treeNode.isExpanded) {
+		this.setAutoExpandTimer();
+	}
+	if (accepts) {
+		this.cacheNodeCoords();
+	}
+	return accepts;
+}, accepts:function (dragObjects) {
+	var accepts = dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this, arguments);
+	if (!accepts) {
+		return false;
+	}
+	for (var i = 0; i < dragObjects.length; i++) {
+		var sourceTreeNode = dragObjects[i].treeNode;
+		if (sourceTreeNode === this.treeNode) {
+			return false;
+		}
+	}
+	return true;
+}, setAutoExpandTimer:function () {
+	var _this = this;
+	var autoExpand = function () {
+		if (dojo.dnd.dragManager.currentDropTarget === _this) {
+			_this.controller.expand(_this.treeNode);
+			dojo.dnd.dragManager.cacheTargetLocations();
+		}
+	};
+	this.autoExpandTimer = dojo.lang.setTimeout(autoExpand, _this.autoExpandDelay);
+}, getAcceptPosition:function (e, dragObjects) {
+	var DndMode = this.treeNode.tree.DndMode;
+	if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO && this.treeNode.actionIsDisabledNow(this.treeNode.actions.ADDCHILD)) {
+		DndMode &= ~dojo.widget.TreeV3.prototype.DndModes.ONTO;
+	}
+	var position = this.getPosition(e, DndMode);
+	if (position == "onto") {
+		return position;
+	}
+	for (var i = 0; i < dragObjects.length; i++) {
+		var source = dragObjects[i].dragSource;
+		if (source.treeNode && this.isAdjacentNode(source.treeNode, position)) {
+			continue;
+		}
+		if (!this.controller.canMove(source.treeNode ? source.treeNode : source, this.treeNode.parent)) {
+			return false;
+		}
+	}
+	return position;
+}, onDropEnd:function (e) {
+	this.clearAutoExpandTimer();
+	this.hideIndicator();
+}, onDragOut:function (e) {
+	this.clearAutoExpandTimer();
+	this.hideIndicator();
+}, clearAutoExpandTimer:function () {
+	if (this.autoExpandTimer) {
+		clearTimeout(this.autoExpandTimer);
+		this.autoExpandTimer = null;
+	}
+}, onDragMove:function (e, dragObjects) {
+	var position = this.getAcceptPosition(e, dragObjects);
+	if (position) {
+		this.showIndicator(position);
+	}
+}, isAdjacentNode:function (sourceNode, position) {
+	if (sourceNode === this.treeNode) {
+		return true;
+	}
+	if (sourceNode.getNextSibling() === this.treeNode && position == "before") {
+		return true;
+	}
+	if (sourceNode.getPreviousSibling() === this.treeNode && position == "after") {
+		return true;
+	}
+	return false;
+}, cacheNodeCoords:function () {
+	var node = this.treeNode.contentNode;
+	this.cachedNodeY = dojo.html.getAbsolutePosition(node).y;
+	this.cachedNodeHeight = dojo.html.getBorderBox(node).height;
+}, getPosition:function (e, DndMode) {
+	var mousey = e.pageY || e.clientY + dojo.body().scrollTop;
+	var relY = mousey - this.cachedNodeY;
+	var p = relY / this.cachedNodeHeight;
+	var position = "";
+	if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO && DndMode & dojo.widget.TreeV3.prototype.DndModes.BETWEEN) {
+		if (p <= 0.33) {
+			position = "before";
+		} else {
+			if (p <= 0.66 || this.treeNode.isExpanded && this.treeNode.children.length && !this.treeNode.isLastChild()) {
+				position = "onto";
+			} else {
+				position = "after";
+			}
+		}
+	} else {
+		if (DndMode & dojo.widget.TreeV3.prototype.DndModes.BETWEEN) {
+			if (p <= 0.5 || this.treeNode.isExpanded && this.treeNode.children.length && !this.treeNode.isLastChild()) {
+				position = "before";
+			} else {
+				position = "after";
+			}
+		} else {
+			if (DndMode & dojo.widget.TreeV3.prototype.DndModes.ONTO) {
+				position = "onto";
+			}
+		}
+	}
+	return position;
+}, getTargetParentIndex:function (source, position) {
+	var index = position == "before" ? this.treeNode.getParentIndex() : this.treeNode.getParentIndex() + 1;
+	if (source.treeNode && this.treeNode.parent === source.treeNode.parent && this.treeNode.getParentIndex() > source.treeNode.getParentIndex()) {
+		index--;
+	}
+	return index;
+}, onDrop:function (e) {
+	var position = this.position;
+	var source = e.dragObject.dragSource;
+	var targetParent, targetIndex;
+	if (position == "onto") {
+		targetParent = this.treeNode;
+		targetIndex = 0;
+	} else {
+		targetIndex = this.getTargetParentIndex(source, position);
+		targetParent = this.treeNode.parent;
+	}
+	var r = this.getDropHandler(e, source, targetParent, targetIndex)();
+	return r;
+}, getDropHandler:function (e, source, targetParent, targetIndex) {
+	var handler;
+	var _this = this;
+	handler = function () {
+		var result;
+		if (source.treeNode) {
+			result = _this.controller.move(source.treeNode, targetParent, targetIndex, true);
+		} else {
+			if (dojo.lang.isFunction(source.onDrop)) {
+				source.onDrop(targetParent, targetIndex);
+			}
+			var treeNode = source.getTreeNode();
+			if (treeNode) {
+				result = _this.controller.createChild(targetParent, targetIndex, treeNode, true);
+			} else {
+				result = true;
+			}
+		}
+		if (result instanceof dojo.Deferred) {
+			var isSuccess = result.fired == 0;
+			if (!isSuccess) {
+				_this.handleDropError(source, targetParent, targetIndex, result);
+			}
+			return isSuccess;
+		} else {
+			return result;
+		}
+	};
+	return handler;
+}, handleDropError:function (source, parent, index, result) {
+	dojo.debug("TreeDropTargetV3.handleDropError: DND error occured");
+	dojo.debugShallow(result);
+}});
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,15 @@
+/*
+	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.dnd.DragAndDrop"], browser:["dojo.dnd.HtmlDragAndDrop"], dashboard:["dojo.dnd.HtmlDragAndDrop"]});
+dojo.provide("dojo.dnd.*");
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,671 @@
+/*
+	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.docs");
+dojo.require("dojo.io.*");
+dojo.require("dojo.event.topic");
+dojo.require("dojo.rpc.JotService");
+dojo.require("dojo.dom");
+dojo.require("dojo.uri.Uri");
+dojo.require("dojo.Deferred");
+dojo.require("dojo.DeferredList");
+
+/*
+ * TODO:
+ *
+ * Package summary needs to compensate for "is"
+ * Handle host environments
+ * Deal with dojo.widget weirdness
+ * Parse parameters
+ * Limit function parameters to only the valid ones (Involves packing parameters onto meta during rewriting)
+ *
+ */
+
+dojo.docs = new function() {
+	this._url = dojo.uri.dojoUri("docscripts");
+	this._rpc = new dojo.rpc.JotService;
+	this._rpc.serviceUrl = dojo.uri.dojoUri("docscripts/jsonrpc.php");
+};
+dojo.lang.mixin(dojo.docs, {
+	_count: 0,
+	_callbacks: {function_names: []},
+	_cache: {}, // Saves the JSON objects in cache
+	require: function(/*String*/ require, /*bool*/ sync) {
+		dojo.debug("require(): " + require);
+		var parts = require.split("/");
+		
+		var size = parts.length;
+		var deferred = new dojo.Deferred;
+		var args = {
+			mimetype: "text/json",
+			load: function(type, data){
+				dojo.debug("require(): loaded for " + require);
+				
+				if(parts[0] != "function_names") {
+					for(var i = 0, part; part = parts[i]; i++){
+						data = data[part];
+					}
+				}
+				deferred.callback(data);
+			},
+			error: function(){
+				deferred.errback();
+			}
+		};
+
+		if(location.protocol == "file:"){
+			if(size){
+				if(parts[parts.length - 1] == "documentation"){
+					parts[parts.length - 1] = "meta";
+				}
+			
+				if(parts[0] == "function_names"){
+					args.url = [this._url, "local_json", "function_names"].join("/");
+				}else{
+					var dirs = parts[0].split(".");
+					args.url = [this._url, "local_json", dirs[0]].join("/");
+					if(dirs.length > 1){
+						args.url = [args.url, dirs[1]].join(".");
+					}
+				}
+			}
+		}
+		
+		dojo.io.bind(args);
+		return deferred;
+	},
+	getFunctionNames: function(){
+		return this.require("function_names"); // dojo.Deferred
+	},
+	unFormat: function(/*String*/ string){
+		var fString = string;
+		if(string.charAt(string.length - 1) == "_"){
+			fString = [string.substring(0, string.length - 1), "*"].join("");
+		}
+		return fString;
+	},
+	getMeta: function(/*String*/ pkg, /*String*/ name, /*Function*/ callback, /*String?*/ id){
+		// summary: Gets information about a function in regards to its meta data
+		if(typeof name == "function"){
+			// pId: a
+			// pkg: ignore
+			id = callback;
+			callback = name;
+			name = pkg;
+			pkg = null;
+			dojo.debug("getMeta(" + name + ")");
+		}else{
+			dojo.debug("getMeta(" + pkg + "/" + name + ")");
+		}
+		
+		if(!id){
+			id = "_";
+		}
+	},
+	_withPkg: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input, /*String*/ newType){
+		dojo.debug("_withPkg(" + evt.name + ") has package: " + data[0]);
+		evt.pkg = data[0];
+		if("load" == type && evt.pkg){
+			evt.type = newType;
+		}else{
+			if(evt.callbacks && evt.callbacks.length){
+				evt.callbacks.shift()("error", {}, evt, evt.input);
+			}
+		}
+	},
+	_gotMeta: function(/*String*/ type, /*Object*/ data, /*Object*/ evt){
+		dojo.debug("_gotMeta(" + evt.name + ")");
+
+		var cached = dojo.docs._getCache(evt.pkg, evt.name, "meta", "functions", evt.id);
+		if(cached.summary){
+			data.summary = cached.summary;
+		}
+		if(evt.callbacks && evt.callbacks.length){
+			evt.callbacks.shift()(type, data, evt, evt.input);
+		}
+	},
+	getSrc: function(/*String*/ name, /*Function*/ callback, /*String?*/ id){
+		// summary: Gets src file (created by the doc parser)
+		dojo.debug("getSrc(" + name + ")");
+		if(!id){
+			id = "_";
+		}
+	},
+	getDoc: function(/*String*/ name, /*Function*/ callback, /*String?*/ id){
+		// summary: Gets external documentation stored on Jot for a given function
+		dojo.debug("getDoc(" + name  + ")");
+
+		if(!id){
+			id = "_";
+		}
+
+		var input = {};
+
+		input.type = "doc";
+		input.name = name;
+		input.callbacks = [callback];
+	},
+	_gotDoc: function(/*String*/ type, /*Array*/ data, /*Object*/ evt, /*Object*/ input){
+		dojo.debug("_gotDoc(" + evt.type + ")");
+		
+		evt[evt.type] = data;
+		if(evt.expects && evt.expects.doc){
+			for(var i = 0, expect; expect = evt.expects.doc[i]; i++){
+				if(!(expect in evt)){
+					dojo.debug("_gotDoc() waiting for more data");
+					return;
+				}
+			}
+		}
+		
+		var cache = dojo.docs._getCache(evt.pkg, "meta", "functions", evt.name, evt.id, "meta");
+
+		var description = evt.fn.description;
+		cache.description = description;
+		data = {
+			returns: evt.fn.returns,
+			id: evt.id,
+			variables: []
+		}
+		if(!cache.parameters){
+			cache.parameters = {};
+		}
+		for(var i = 0, param; param = evt.param[i]; i++){
+			var fName = param["DocParamForm/name"];
+			if(!cache.parameters[fName]){
+				cache.parameters[fName] = {};
+			}
+			cache.parameters[fName].description = param["DocParamForm/desc"]
+		}
+
+		data.description = cache.description;
+		data.parameters = cache.parameters;
+		
+		evt.type = "doc";
+	
+		if(evt.callbacks && evt.callbacks.length){
+			evt.callbacks.shift()("load", data, evt, input);
+		}
+	},
+	getPkgDoc: function(/*String*/ name, /*Function*/ callback){
+		// summary: Gets external documentation stored on Jot for a given package
+		dojo.debug("getPkgDoc(" + name + ")");
+		var input = {};
+	},
+	getPkgInfo: function(/*String*/ name, /*Function*/ callback){
+		// summary: Gets a combination of the metadata and external documentation for a given package
+		dojo.debug("getPkgInfo(" + name + ")");
+
+		var input = {
+			expects: {
+				pkginfo: ["pkgmeta", "pkgdoc"]
+			},
+			callback: callback
+		};
+		dojo.docs.getPkgMeta(input, name, dojo.docs._getPkgInfo);
+		dojo.docs.getPkgDoc(input, name, dojo.docs._getPkgInfo);
+	},
+	_getPkgInfo: function(/*String*/ type, /*Object*/ data, /*Object*/ evt){
+		dojo.debug("_getPkgInfo() for " + evt.type);
+		var input = {};
+		var results = {};
+		if(typeof key == "object"){
+			input = key;
+			input[evt.type] = data;
+			if(input.expects && input.expects.pkginfo){
+				for(var i = 0, expect; expect = input.expects.pkginfo[i]; i++){
+					if(!(expect in input)){
+						dojo.debug("_getPkgInfo() waiting for more data");
+						return;
+					}
+				}
+			}
+			results = input.pkgmeta;
+			results.description = input.pkgdoc;
+		}
+
+		if(input.callback){
+			input.callback("load", results, evt);
+		}
+	},
+	getInfo: function(/*String*/ name, /*Function*/ callback){
+		dojo.debug("getInfo(" + name + ")");
+		var input = {
+			expects: {
+				"info": ["meta", "doc"]
+			},
+			callback: callback
+		}
+		dojo.docs.getMeta(input, name, dojo.docs._getInfo);
+		dojo.docs.getDoc(input, name, dojo.docs._getInfo);
+	},
+	_getInfo: function(/*String*/ type, /*String*/ data, /*Object*/ evt, /*Object*/ input){
+		dojo.debug("_getInfo(" + evt.type + ")");
+		if(input && input.expects && input.expects.info){
+			input[evt.type] = data;
+			for(var i = 0, expect; expect = input.expects.info[i]; i++){
+				if(!(expect in input)){
+					dojo.debug("_getInfo() waiting for more data");
+					return;
+				}
+			}
+		}
+
+		if(input.callback){
+			input.callback("load", dojo.docs._getCache(evt.pkg, "meta", "functions", evt.name, evt.id, "meta"), evt, input);
+		}
+	},
+	_getMainText: function(/*String*/ text){
+		// summary: Grabs the innerHTML from a Jot Rech Text node
+		dojo.debug("_getMainText()");
+		return text.replace(/^<html[^<]*>/, "").replace(/<\/html>$/, "").replace(/<\w+\s*\/>/g, "");
+	},
+	getPackageMeta: function(/*Object*/ input){
+		dojo.debug("getPackageMeta(): " + input.package);
+		return this.require(input.package + "/meta", input.sync);
+	},
+	getFunctionMeta: function(/*Object*/ input){
+		var package = input.package || "";
+		var name = input.name;
+		var id = input.id || "_";
+		dojo.debug("getFunctionMeta(): " + name);
+
+		if(!name) return;
+
+		if(package){
+			return this.require(package + "/meta/functions/" + name + "/" + id + "/meta");
+		}else{
+			this.getFunctionNames();
+		}
+	},
+	getFunctionDocumentation: function(/*Object*/ input){
+		var package = input.package || "";
+		var name = input.name;
+		var id = input.id || "_";
+		dojo.debug("getFunctionDocumentation(): " + name);
+		
+		if(!name) return;
+		
+		if(package){
+			return this.require(package + "/meta/functions/" + name + "/" + id + "/documentation");
+		}
+	},
+	_onDocSearch: function(/*Object*/ input){
+		var _this = this;
+		var name = input.name.toLowerCase();
+		if(!name) return;
+
+		this.getFunctionNames().addCallback(function(data){
+			dojo.debug("_onDocSearch(): function names loaded for " + name);
+
+			var output = [];
+			var list = [];
+			var closure = function(pkg, fn) {
+				return function(data){
+					dojo.debug("_onDocSearch(): package meta loaded for: " + pkg);
+					if(data.functions){
+						var functions = data.functions;
+						for(var key in functions){
+							if(fn == key){
+								var ids = functions[key];
+								for(var id in ids){
+									var fnMeta = ids[id];
+									output.push({
+										package: pkg,
+										name: fn,
+										id: id,
+										summary: fnMeta.summary
+									});
+								}
+							}
+						}
+					}
+					return output;
+				}
+			}
+
+			pkgLoop:
+			for(var pkg in data){
+				if(pkg.toLowerCase() == name){
+					name = pkg;
+					dojo.debug("_onDocSearch found a package");
+					//dojo.docs._onDocSelectPackage(input);
+					return;
+				}
+				for(var i = 0, fn; fn = data[pkg][i]; i++){
+					if(fn.toLowerCase().indexOf(name) != -1){
+						dojo.debug("_onDocSearch(): Search matched " + fn);
+						var meta = _this.getPackageMeta({package: pkg});
+						meta.addCallback(closure(pkg, fn));
+						list.push(meta);
+
+						// Build a list of all packages that need to be loaded and their loaded state.
+						continue pkgLoop;
+					}
+				}
+			}
+			
+			list = new dojo.DeferredList(list);
+			list.addCallback(function(results){
+				dojo.debug("_onDocSearch(): All packages loaded");
+				_this._printFunctionResults(results[0][1]);
+			});
+		});
+	},
+	_onDocSearchFn: function(/*String*/ type, /*Array*/ data, /*Object*/ evt){
+		dojo.debug("_onDocSearchFn(" + evt.name + ")");
+
+		var name = evt.name || evt.pkg;
+
+		dojo.debug("_onDocSearchFn found a function");
+
+		evt.pkgs = packages;
+		evt.pkg = name;
+		evt.loaded = 0;
+		for(var i = 0, pkg; pkg = packages[i]; i++){
+			dojo.docs.getPkgMeta(evt, pkg, dojo.docs._onDocResults);
+		}
+	},
+	_onPkgResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){
+		dojo.debug("_onPkgResults(" + evt.type + ")");
+		var description = "";
+		var path = "";
+		var methods = {};
+		var requires = {};
+		if(input){
+			input[evt.type] = data;
+			if(input.expects && input.expects.pkgresults){
+				for(var i = 0, expect; expect = input.expects.pkgresults[i]; i++){
+					if(!(expect in input)){
+						dojo.debug("_onPkgResults() waiting for more data");
+						return;
+					}
+				}
+			}
+			path = input.pkgdoc.path;
+			description = input.pkgdoc.description;
+			methods = input.pkgmeta.methods;
+			requires = input.pkgmeta.requires;
+		}
+		var pkg = evt.name.replace("_", "*");
+		var results = {
+			path: path,
+			description: description,
+			size: 0,
+			methods: [],
+			pkg: pkg,
+			requires: requires
+		}
+		var rePrivate = /_[^.]+$/;
+		for(var method in methods){
+			if(!rePrivate.test(method)){
+				for(var pId in methods[method]){
+					results.methods.push({
+						pkg: pkg,
+						name: method,
+						id: pId,
+						summary: methods[method][pId].summary
+					})
+				}
+			}
+		}
+		results.size = results.methods.length;
+		dojo.docs._printPkgResult(results);
+	},
+	_onDocResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){
+		dojo.debug("_onDocResults(" + evt.name + "/" + input.pkg + ") " + type);
+		++input.loaded;
+
+		if(input.loaded == input.pkgs.length){
+			var pkgs = input.pkgs;
+			var name = input.pkg;
+			var results = {methods: []};
+			var rePrivate = /_[^.]+$/;
+			data = dojo.docs._cache;
+
+			for(var i = 0, pkg; pkg = pkgs[i]; i++){
+				var methods = dojo.docs._getCache(pkg, "meta", "methods");
+				for(var fn in methods){
+					if(fn.toLowerCase().indexOf(name) == -1){
+						continue;
+					}
+					if(fn != "requires" && !rePrivate.test(fn)){
+						for(var pId in methods[fn]){
+							var result = {
+								pkg: pkg,
+								name: fn,
+								id: "_",
+								summary: ""
+							}
+							if(methods[fn][pId].summary){
+								result.summary = methods[fn][pId].summary;
+							}
+							results.methods.push(result);
+						}
+					}
+				}
+			}
+
+			dojo.debug("Publishing docResults");
+			dojo.docs._printFnResults(results);
+		}
+	},
+	_printFunctionResults: function(results){
+		dojo.debug("_printFnResults(): called");
+		// summary: Call this function to send the /docs/function/results topic
+	},
+	_printPkgResult: function(results){
+		dojo.debug("_printPkgResult(): called");
+	},
+	_onDocSelectFunction: function(/*Object*/ input){
+		// summary: Get doc, meta, and src
+		var name = input.name;
+		var package = input.package || "";
+		var id = input.id || "_";
+		dojo.debug("_onDocSelectFunction(" + name + ")");
+		if(!name || !package) return false;
+
+		var pkgMeta = this.getPackageMeta({package: package});
+		var meta = this.getFunctionMeta({package: package, name: name, id: id});
+		var doc = this.getFunctionDocumentation({package: package, name: name, id: id});
+		
+		var list = new dojo.DeferredList([pkgMeta, meta, doc]);
+		list.addCallback(function(results){
+			dojo.debug("_onDocSelectFunction() loaded");
+			for(var i = 0, result; result = results[i]; i++){
+				dojo.debugShallow(result[1]);
+			}
+		});
+		
+		return list;
+	},
+	_onDocSelectPackage: function(/*Object*/ input){
+		dojo.debug("_onDocSelectPackage(" + input.name + ")")
+		input.expects = {
+			"pkgresults": ["pkgmeta", "pkgdoc"]
+		};
+		dojo.docs.getPkgMeta(input, input.name, dojo.docs._onPkgResults);
+		dojo.docs.getPkgDoc(input, input.name, dojo.docs._onPkgResults);
+	},
+	_onDocSelectResults: function(/*String*/ type, /*Object*/ data, /*Object*/ evt, /*Object*/ input){
+		dojo.debug("_onDocSelectResults(" + evt.type + ", " + evt.name + ")");
+		if(evt.type == "meta"){
+			dojo.docs.getPkgMeta(input, evt.pkg, dojo.docs._onDocSelectResults);
+		}
+		if(input){
+			input[evt.type] = data;
+			if(input.expects && input.expects.docresults){
+				for(var i = 0, expect; expect = input.expects.docresults[i]; i++){
+					if(!(expect in input)){
+						dojo.debug("_onDocSelectResults() waiting for more data");
+						return;
+					}
+				}
+			}
+		}
+
+		dojo.docs._printFunctionDetail(input);
+	},
+	
+	_printFunctionDetail: function(results) {
+		// summary: Call this function to send the /docs/function/detail topic event
+	},
+
+	selectFunction: function(/*String*/ name, /*String?*/ id){
+		// summary: The combined information
+	},
+	savePackage: function(/*Object*/ callbackObject, /*String*/ callback, /*Object*/ parameters){
+		dojo.event.kwConnect({
+			srcObj: dojo.docs,
+			srcFunc: "_savedPkgRpc",
+			targetObj: callbackObject,
+			targetFunc: callback,
+			once: true
+		});
+		
+		var props = {};
+		var cache = dojo.docs._getCache(parameters.pkg, "meta");
+
+		var i = 1;
+
+		if(!cache.path){
+			var path = "id";
+			props[["pname", i].join("")] = "DocPkgForm/require";
+			props[["pvalue", i++].join("")] = parameters.pkg;
+		}else{
+			var path = cache.path;
+		}
+
+		props.form = "//DocPkgForm";
+		props.path = ["/WikiHome/DojoDotDoc/", path].join("");
+
+		if(parameters.description){
+			props[["pname", i].join("")] = "main/text";
+			props[["pvalue", i++].join("")] = parameters.description;
+		}
+		
+		dojo.docs._rpc.callRemote("saveForm",	props).addCallbacks(dojo.docs._pkgRpc, dojo.docs._pkgRpc);
+	},
+	_pkgRpc: function(data){
+		if(data.name){
+			dojo.docs._getCache(data["DocPkgForm/require"], "meta").path = data.name;
+			dojo.docs._savedPkgRpc("load");
+		}else{
+			dojo.docs._savedPkgRpc("error");
+		}
+	},
+	_savedPkgRpc: function(type){
+	},
+	functionPackages: function(/*String*/ name, /*Function*/ callback, /*Object*/ input){
+		// summary: Gets the package associated with a function and stores it in the .pkg value of input
+		dojo.debug("functionPackages() name: " + name);
+
+		if(!input){
+			input = {};
+		}
+		if(!input.callbacks){
+			input.callbacks = [];
+		}
+
+		input.type = "function_names";
+		input.name = name;
+		input.callbacks.unshift(callback);
+		input.callbacks.unshift(dojo.docs._functionPackages);
+	},
+	_functionPackages: function(/*String*/ type, /*Array*/ data, /*Object*/ evt){
+		dojo.debug("_functionPackages() name: " + evt.name);
+		evt.pkg = '';
+
+		var results = [];
+		var data = dojo.docs._cache['function_names'];
+		for(var key in data){
+			if(dojo.lang.inArray(data[key], evt.name)){
+				dojo.debug("_functionPackages() package: " + key);
+				results.push(key);
+			}
+		}
+
+		if(evt.callbacks && evt.callbacks.length){
+			evt.callbacks.shift()(type, results, evt, evt.input);
+		}
+	},
+	setUserName: function(/*String*/ name){
+		dojo.docs._userName = name;
+		if(name && dojo.docs._password){
+			dojo.docs._logIn();
+		}
+	},
+	setPassword: function(/*String*/ password){
+		dojo.docs._password = password;
+		if(password && dojo.docs._userName){
+			dojo.docs._logIn();
+		}
+	},
+	_logIn: function(){
+		dojo.io.bind({
+			url: dojo.docs._rpc.serviceUrl.toString(),
+			method: "post",
+			mimetype: "text/json",
+			content: {
+				username: dojo.docs._userName,
+				password: dojo.docs._password
+			},
+			load: function(type, data){
+				if(data.error){
+					dojo.docs.logInSuccess();
+				}else{
+					dojo.docs.logInFailure();
+				}
+			},
+			error: function(){
+				dojo.docs.logInFailure();
+			}
+		});
+	},
+	logInSuccess: function(){},
+	logInFailure: function(){},
+	_set: function(/*Object*/ base, /*String...*/ keys, /*String*/ value){
+		var args = [];
+		for(var i = 0, arg; arg = arguments[i]; i++){
+			args.push(arg);
+		}
+
+		if(args.length < 3) return;
+		base = args.shift();
+		value = args.pop();
+		var key = args.pop();
+		for(var i = 0, arg; arg = args[i]; i++){
+			if(typeof base[arg] != "object"){
+				base[arg] = {};
+			}
+			base = base[arg];
+		}
+		base[key] = value;
+	},
+	_getCache: function(/*String...*/ keys){
+		var obj = dojo.docs._cache;
+		for(var i = 0; i < arguments.length; i++){
+			var arg = arguments[i];
+			if(!obj[arg]){
+				obj[arg] = {};
+			}
+			obj = obj[arg];
+		}
+		return obj;
+	}
+});
+
+dojo.event.topic.subscribe("/docs/search", dojo.docs, "_onDocSearch");
+dojo.event.topic.subscribe("/docs/function/select", dojo.docs, "_onDocSelectFunction");
+dojo.event.topic.subscribe("/docs/package/select", dojo.docs, "_onDocSelectPackage");
+
+dojo.event.topic.registerPublisher("/docs/function/results", dojo.docs, "_printFunctionResults");
+dojo.event.topic.registerPublisher("/docs/function/detail", dojo.docs, "_printFunctionDetail");
+dojo.event.topic.registerPublisher("/docs/package/detail", dojo.docs, "_printPkgResult");

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/docs.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,381 @@
+/*
+	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";
+dojo.dom.xmlns = {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 (wh) {
+	if (typeof Element == "function") {
+		try {
+			return wh instanceof Element;
+		}
+		catch (e) {
+		}
+	} else {
+		return wh && !isNaN(wh.nodeType);
+	}
+};
+dojo.dom.getUniqueId = function () {
+	var _document = dojo.doc();
+	do {
+		var id = "dj_unique_" + (++arguments.callee._idIncrement);
+	} while (_document.getElementById(id));
+	return id;
+};
+dojo.dom.getUniqueId._idIncrement = 0;
+dojo.dom.firstElement = dojo.dom.getFirstChildElement = function (parentNode, 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;
+};
+dojo.dom.lastElement = dojo.dom.getLastChildElement = function (parentNode, 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;
+};
+dojo.dom.nextElement = dojo.dom.getNextSiblingElement = function (node, 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;
+};
+dojo.dom.prevElement = dojo.dom.getPreviousSiblingElement = function (node, 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;
+};
+dojo.dom.moveChildren = function (srcNode, destNode, trim) {
+	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;
+};
+dojo.dom.copyChildren = function (srcNode, destNode, trim) {
+	var clonedNode = srcNode.cloneNode(true);
+	return this.moveChildren(clonedNode, destNode, trim);
+};
+dojo.dom.replaceChildren = function (node, newChild) {
+	var nodes = [];
+	if (dojo.render.html.ie) {
+		for (var i = 0; i < node.childNodes.length; i++) {
+			nodes.push(node.childNodes[i]);
+		}
+	}
+	dojo.dom.removeChildren(node);
+	node.appendChild(newChild);
+	for (var i = 0; i < nodes.length; i++) {
+		dojo.dom.destroyNode(nodes[i]);
+	}
+};
+dojo.dom.removeChildren = function (node) {
+	var count = node.childNodes.length;
+	while (node.hasChildNodes()) {
+		dojo.dom.removeNode(node.firstChild);
+	}
+	return count;
+};
+dojo.dom.replaceNode = function (node, newNode) {
+	return node.parentNode.replaceChild(newNode, node);
+};
+dojo.dom.destroyNode = function (node) {
+	if (node.parentNode) {
+		node = dojo.dom.removeNode(node);
+	}
+	if (node.nodeType != 3) {
+		if (dojo.evalObjPath("dojo.event.browser.clean", false)) {
+			dojo.event.browser.clean(node);
+		}
+		if (dojo.render.html.ie) {
+			node.outerHTML = "";
+		}
+	}
+};
+dojo.dom.removeNode = function (node) {
+	if (node && node.parentNode) {
+		return node.parentNode.removeChild(node);
+	}
+};
+dojo.dom.getAncestors = function (node, filterFunction, 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.parentNode;
+	}
+	if (returnFirstHit) {
+		return null;
+	}
+	return ancestors;
+};
+dojo.dom.getAncestorsByTag = function (node, tag, returnFirstHit) {
+	tag = tag.toLowerCase();
+	return dojo.dom.getAncestors(node, function (el) {
+		return ((el.tagName) && (el.tagName.toLowerCase() == tag));
+	}, returnFirstHit);
+};
+dojo.dom.getFirstAncestorByTag = function (node, tag) {
+	return dojo.dom.getAncestorsByTag(node, tag, true);
+};
+dojo.dom.isDescendantOf = function (node, ancestor, guaranteeDescendant) {
+	if (guaranteeDescendant && node) {
+		node = node.parentNode;
+	}
+	while (node) {
+		if (node == ancestor) {
+			return true;
+		}
+		node = node.parentNode;
+	}
+	return false;
+};
+dojo.dom.innerXML = function (node) {
+	if (node.innerXML) {
+		return node.innerXML;
+	} else {
+		if (node.xml) {
+			return node.xml;
+		} else {
+			if (typeof XMLSerializer != "undefined") {
+				return (new XMLSerializer()).serializeToString(node);
+			}
+		}
+	}
+};
+dojo.dom.createDocument = function () {
+	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) {
+			}
+			if (doc) {
+				break;
+			}
+		}
+	} else {
+		if ((_document.implementation) && (_document.implementation.createDocument)) {
+			doc = _document.implementation.createDocument("", "", null);
+		}
+	}
+	return doc;
+};
+dojo.dom.createDocumentFromText = function (str, mimetype) {
+	if (!mimetype) {
+		mimetype = "text/xml";
+	}
+	if (!dj_undef("DOMParser")) {
+		var parser = new DOMParser();
+		return parser.parseFromString(str, mimetype);
+	} else {
+		if (!dj_undef("ActiveXObject")) {
+			var domDoc = dojo.dom.createDocument();
+			if (domDoc) {
+				domDoc.async = false;
+				domDoc.loadXML(str);
+				return domDoc;
+			} else {
+				dojo.debug("toXml didn't work?");
+			}
+		} else {
+			var _document = dojo.doc();
+			if (_document.createElement) {
+				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;
+				}
+				return ((tmp.document) && (tmp.document.firstChild ? tmp.document.firstChild : tmp));
+			}
+		}
+	}
+	return null;
+};
+dojo.dom.prependChild = function (node, parent) {
+	if (parent.firstChild) {
+		parent.insertBefore(node, parent.firstChild);
+	} else {
+		parent.appendChild(node);
+	}
+	return true;
+};
+dojo.dom.insertBefore = function (node, ref, force) {
+	if ((force != true) && (node === ref || node.nextSibling === ref)) {
+		return false;
+	}
+	var parent = ref.parentNode;
+	parent.insertBefore(node, ref);
+	return true;
+};
+dojo.dom.insertAfter = function (node, ref, force) {
+	var pn = ref.parentNode;
+	if (ref == pn.lastChild) {
+		if ((force != true) && (node === ref)) {
+			return false;
+		}
+		pn.appendChild(node);
+	} else {
+		return this.insertBefore(node, ref.nextSibling, force);
+	}
+	return true;
+};
+dojo.dom.insertAtPosition = function (node, ref, position) {
+	if ((!node) || (!ref) || (!position)) {
+		return false;
+	}
+	switch (position.toLowerCase()) {
+	  case "before":
+		return dojo.dom.insertBefore(node, ref);
+	  case "after":
+		return dojo.dom.insertAfter(node, ref);
+	  case "first":
+		if (ref.firstChild) {
+			return dojo.dom.insertBefore(node, ref.firstChild);
+		} else {
+			ref.appendChild(node);
+			return true;
+		}
+		break;
+	  default:
+		ref.appendChild(node);
+		return true;
+	}
+};
+dojo.dom.insertAtIndex = function (node, containingNode, insertionIndex) {
+	var siblingNodes = containingNode.childNodes;
+	if (!siblingNodes.length || siblingNodes.length == insertionIndex) {
+		containingNode.appendChild(node);
+		return true;
+	}
+	if (insertionIndex == 0) {
+		return dojo.dom.prependChild(node, containingNode);
+	}
+	return dojo.dom.insertAfter(node, siblingNodes[insertionIndex - 1]);
+};
+dojo.dom.textContent = function (node, text) {
+	if (arguments.length > 1) {
+		var _document = dojo.doc();
+		dojo.dom.replaceChildren(node, _document.createTextNode(text));
+		return text;
+	} else {
+		if (node.textContent != undefined) {
+			return node.textContent;
+		}
+		var _result = "";
+		if (node == null) {
+			return _result;
+		}
+		for (var i = 0; i < node.childNodes.length; i++) {
+			switch (node.childNodes[i].nodeType) {
+			  case 1:
+			  case 5:
+				_result += dojo.dom.textContent(node.childNodes[i]);
+				break;
+			  case 3:
+			  case 2:
+			  case 4:
+				_result += node.childNodes[i].nodeValue;
+				break;
+			  default:
+				break;
+			}
+		}
+		return _result;
+	}
+};
+dojo.dom.hasParent = function (node) {
+	return Boolean(node && node.parentNode && dojo.dom.isNode(node.parentNode));
+};
+dojo.dom.isTag = function (node) {
+	if (node && node.tagName) {
+		for (var i = 1; i < arguments.length; i++) {
+			if (node.tagName == String(arguments[i])) {
+				return String(arguments[i]);
+			}
+		}
+	}
+	return "";
+};
+dojo.dom.setAttributeNS = function (elem, namespaceURI, attrName, attrValue) {
+	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"))) {
+		elem.setAttributeNS(namespaceURI, attrName, attrValue);
+	} else {
+		var ownerDoc = elem.ownerDocument;
+		var attribute = ownerDoc.createNode(2, attrName, namespaceURI);
+		attribute.nodeValue = attrValue;
+		elem.setAttributeNode(attribute);
+	}
+};
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dom.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js Thu Jul 16 19:14:41 2009
@@ -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.provide("dojo.event");
+dojo.require("dojo.event.*");
+dojo.deprecated("dojo.event", "replaced by dojo.event.*", "0.5");
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,15 @@
+/*
+	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: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/__package__.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,491 @@
+/*
+	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");
+dojo._ie_clobber = new function () {
+	this.clobberNodes = [];
+	function nukeProp(node, prop) {
+		try {
+			node[prop] = null;
+		}
+		catch (e) {
+		}
+		try {
+			delete node[prop];
+		}
+		catch (e) {
+		}
+		try {
+			node.removeAttribute(prop);
+		}
+		catch (e) {
+		}
+	}
+	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 (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) {
+			}
+		}
+		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) {
+		}
+		if (dojo.widget) {
+			for (var name in dojo.widget._templateCache) {
+				if (dojo.widget._templateCache[name].node) {
+					dojo.dom.destroyNode(dojo.widget._templateCache[name].node);
+					dojo.widget._templateCache[name].node = null;
+					delete dojo.widget._templateCache[name].node;
+				}
+			}
+		}
+		try {
+			window.onload = null;
+		}
+		catch (e) {
+		}
+		try {
+			window.onunload = null;
+		}
+		catch (e) {
+		}
+		dojo._ie_clobber.clobberNodes = [];
+	});
+}
+dojo.event.browser = new function () {
+	var clobberIdx = 0;
+	this.normalizedEventName = function (eventName) {
+		switch (eventName) {
+		  case "CheckboxStateChange":
+		  case "DOMAttrModified":
+		  case "DOMMenuItemActive":
+		  case "DOMMenuItemInactive":
+		  case "DOMMouseScroll":
+		  case "DOMNodeInserted":
+		  case "DOMNodeRemoved":
+		  case "RadioStateChange":
+			return eventName;
+			break;
+		  default:
+			var lcn = eventName.toLowerCase();
+			return (lcn.indexOf("on") == 0) ? lcn.substr(2) : lcn;
+			break;
+		}
+	};
+	this.clean = function (node) {
+		if (dojo.render.html.ie) {
+			dojo._ie_clobber.clobber(node);
+		}
+	};
+	this.addClobberNode = function (node) {
+		if (!dojo.render.html.ie) {
+			return;
+		}
+		if (!node["__doClobber__"]) {
+			node.__doClobber__ = true;
+			dojo._ie_clobber.clobberNodes.push(node);
+			node.__clobberAttrs__ = [];
+		}
+	};
+	this.addClobberNodeAttrs = function (node, props) {
+		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 (node, evtName, fp, capture) {
+		if (!capture) {
+			var capture = false;
+		}
+		evtName = dojo.event.browser.normalizedEventName(evtName);
+		if (evtName == "key") {
+			if (dojo.render.html.ie) {
+				this.removeListener(node, "onkeydown", fp, capture);
+			}
+			evtName = "keypress";
+		}
+		if (node.removeEventListener) {
+			node.removeEventListener(evtName, fp, capture);
+		}
+	};
+	this.addListener = function (node, evtName, fp, capture, dontFix) {
+		if (!node) {
+			return;
+		}
+		if (!capture) {
+			var capture = false;
+		}
+		evtName = dojo.event.browser.normalizedEventName(evtName);
+		if (evtName == "key") {
+			if (dojo.render.html.ie) {
+				this.addListener(node, "onkeydown", fp, capture, dontFix);
+			}
+			evtName = "keypress";
+		}
+		if (!dontFix) {
+			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, newfp, capture);
+			return newfp;
+		} else {
+			evtName = "on" + evtName;
+			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 (obj) {
+		return (typeof obj != "undefined") && (obj) && (typeof Event != "undefined") && (obj.eventPhase);
+	};
+	this.currentEvent = null;
+	this.callListener = function (listener, curTarget) {
+		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};
+	this.revKeys = [];
+	for (var key in this.keys) {
+		this.revKeys[this.keys[key]] = key;
+	}
+	this.fixEvent = function (evt, sender) {
+		if (!evt) {
+			if (window["event"]) {
+				evt = window.event;
+			}
+		}
+		if ((evt["type"]) && (evt["type"].indexOf("key") == 0)) {
+			evt.keys = this.revKeys;
+			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:
+				  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;
+				  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;
+				  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 (unifiedCharCode >= 65 && unifiedCharCode <= 90 && evt.shiftKey == false) {
+							unifiedCharCode += 32;
+						}
+						if (unifiedCharCode >= 1 && unifiedCharCode <= 26 && evt.ctrlKey) {
+							unifiedCharCode += 96;
+						}
+						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) {
+							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 25:
+									evt.key = evt.KEY_TAB;
+									evt.shift = true;
+									break;
+								  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;
+								  case 63236:
+									evt.key = evt.KEY_F1;
+									break;
+								  case 63237:
+									evt.key = evt.KEY_F2;
+									break;
+								  case 63238:
+									evt.key = evt.KEY_F3;
+									break;
+								  case 63239:
+									evt.key = evt.KEY_F4;
+									break;
+								  case 63240:
+									evt.key = evt.KEY_F5;
+									break;
+								  case 63241:
+									evt.key = evt.KEY_F6;
+									break;
+								  case 63242:
+									evt.key = evt.KEY_F7;
+									break;
+								  case 63243:
+									evt.key = evt.KEY_F8;
+									break;
+								  case 63244:
+									evt.key = evt.KEY_F9;
+									break;
+								  case 63245:
+									evt.key = evt.KEY_F10;
+									break;
+								  case 63246:
+									evt.key = evt.KEY_F11;
+									break;
+								  case 63247:
+									evt.key = evt.KEY_F12;
+									break;
+								  case 63250:
+									evt.key = evt.KEY_PAUSE;
+									break;
+								  case 63272:
+									evt.key = evt.KEY_DELETE;
+									break;
+								  case 63273:
+									evt.key = evt.KEY_HOME;
+									break;
+								  case 63275:
+									evt.key = evt.KEY_END;
+									break;
+								  case 63276:
+									evt.key = evt.KEY_PAGE_UP;
+									break;
+								  case 63277:
+									evt.key = evt.KEY_PAGE_DOWN;
+									break;
+								  case 63302:
+									evt.key = evt.KEY_INSERT;
+									break;
+								  case 63248:
+								  case 63249:
+								  case 63289:
+									break;
+								  default:
+									evt.key = evt.charCode >= evt.KEY_SPACE ? 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;
+			}
+			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);
+			}
+			if (evt.type == "mouseover") {
+				evt.relatedTarget = evt.fromElement;
+			}
+			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;
+	};
+	this.stopEvent = function (evt) {
+		if (window.event) {
+			evt.cancelBubble = true;
+			evt.returnValue = false;
+		} else {
+			evt.preventDefault();
+			evt.stopPropagation();
+		}
+	};
+};
+

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/event/browser.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message