tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jkuhn...@apache.org
Subject svn commit: r618461 [17/43] - in /tapestry/tapestry4/trunk/tapestry-framework/src/js: dojo-0.4.3-custom-4.1.5/ dojo-0.4.3-custom-4.1.5/nls/ dojo-0.4.3-custom-4.1.5/src/ dojo-0.4.3-custom-4.1.5/src/animation/ dojo-0.4.3-custom-4.1.5/src/cal/ dojo-0.4.3-...
Date Mon, 04 Feb 2008 22:08:37 GMT
Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html Mon Feb  4 14:07:13 2008
@@ -0,0 +1,362 @@
+<html>
+<head>
+<title>Deep Debugger</title>
+<script>
+
+var tableRows = {};
+var tableCels = {};
+var tableObjs = {};
+var tablesBuilt = {};
+var tableShows = {};
+var tableHides = {};
+
+// IE: nodes w/id need to be redeclared or getElementById is b0rked
+var frame = null;
+
+window.onload = function(){
+	// if IE loads this page too quickly (instantly) then 
+	// window.debugVar might not have been set
+	window.setTimeout(startMeUp, 100);
+}
+
+function startMeUp(){
+	frame = document.getElementById('frame');
+	// GET string 
+	var index = location.search.split("=").pop();
+	var debugObj = window.opener.dojo.debugDeep;
+	var debugVar = debugObj.debugVars[index] || window.debugVar;
+	buildTable('root', frame, debugVar);
+}
+
+function buildTable(path, parent, obj){
+	var keys = [];
+	var vals = [];
+	for(var prop in obj){
+		keys.push(prop);
+		try {
+			vals[prop] = obj[prop];
+		} catch(E) {
+			vals[prop] = 'ERROR: ' + E.message;
+		}
+	}
+	keys.sort(keySorter);
+
+	if (!keys.length){
+
+		var div = document.createElement('div');
+		div.appendChild(document.createTextNode('Object has no properties.'));
+
+		parent.appendChild(div);
+		return;
+	}
+
+
+	var t = document.createElement('table');
+	t.border = "1";
+
+	var tb = document.createElement('tbody');
+	t.appendChild(tb);
+
+
+	for(var i = 0; i < keys.length; i++) {
+		buildTableRow(path+'-'+keys[i], tb, keys[i], vals[keys[i]]);
+	}
+
+	if (path == 'root'){
+		//t.style.width = '90%';
+	}
+	t.style.width = '100%';
+
+	parent.appendChild(t);
+
+	tablesBuilt[path] = true;
+}
+
+function buildTableRow(path, tb, name, value) {
+
+	var simpleType = typeof(value);
+	var createSubrow = (simpleType == 'object');
+	var complexType = simpleType;
+
+	if (simpleType == 'object'){
+		var cls = getConstructorClass(value);
+		if (cls){
+			if (cls == 'Object'){
+			}else if (cls == 'Array'){
+				complexType = 'array';
+			}else{
+				complexType += ' ('+cls+')';
+			}
+		}
+	}
+
+/*var tr1 = document.createElement('tr');
+	var td1 = document.createElement('td');
+	var td2 = document.createElement('td');
+	var td3 = document.createElement('td');
+	var td4 = document.createElement('td');*/
+
+	var row = tb.rows.length;
+	var tr1 = tb.insertRow(row++);
+	var td1 = tr1.insertCell(0);
+	var td2 = tr1.insertCell(1);
+	var td3 = tr1.insertCell(2);
+	var td4 = tr1.insertCell(3);
+	
+	tr1.style.verticalAlign = 'top';
+	td1.style.verticalAlign = 'middle';
+
+	td1.className = 'propPlus';
+	td2.className = 'propName';
+	td3.className = 'propType';
+	td4.className = 'propVal';
+
+	//tr1.appendChild(td1);
+	//tr1.appendChild(td2);
+	//tr1.appendChild(td3);
+	//tr1.appendChild(td4);
+
+	if (createSubrow){
+		var img1 = document.createElement('img');
+		img1.width = 9;
+		img1.height = 9;
+		img1.src = 'arrow_show.gif';
+		var a1 = document.createElement('a');
+		a1.appendChild(img1);
+		a1.href = '#';
+		a1.onclick = function(){ showTableRow(path); return false; };
+
+		var img2 = document.createElement('img');
+		img2.width = 9;
+		img2.height = 9;
+		img2.src = 'arrow_hide.gif';
+		var a2 = document.createElement('a');
+		a2.appendChild(img2);
+		a2.href = '#';
+		a2.onclick = function(){ hideTableRow(path); return false; };
+		a2.style.display = 'none';
+
+		tableShows[path] = a1;
+		tableHides[path] = a2;
+
+		td1.appendChild(a1);
+		td1.appendChild(a2);
+	}else{
+		var img = document.createElement('img');
+		img.width = 9;
+		img.height = 9;
+		img.src = 'spacer.gif';
+
+		td1.appendChild(img);
+	}
+
+	td2.appendChild(document.createTextNode(name));
+	td3.appendChild(document.createTextNode(complexType));
+	td4.appendChild(buildPreBlock(value));
+
+	//tb.appendChild(tr1);
+
+	if (createSubrow){
+		var tr2 = tb.insertRow(row++);
+		var td5 = tr2.insertCell(0);
+		var td6 = tr2.insertCell(1);
+		
+		//var tr2 = document.createElement('tr');
+		//var td5 = document.createElement('td');
+		//var td6 = document.createElement('td');
+
+		td5.innerHTML = '&nbsp;';
+		//td6.innerHTML = '&nbsp;';
+
+		td6.colSpan = '3';
+
+		tr2.appendChild(td5);
+		tr2.appendChild(td6);
+
+		tr2.style.display = 'none';
+
+		tb.appendChild(tr2);
+
+		tableRows[path] = tr2;
+		tableCels[path] = td6;
+		tableObjs[path] = value;
+	}
+}
+
+function showTableRow(path){
+
+	var tr = tableRows[path];
+	var td = tableCels[path];
+	var a1 = tableShows[path];
+	var a2 = tableHides[path];
+
+	if (!tablesBuilt[path]){
+
+		//alert('building table for '+path);
+		buildTable(path, td, tableObjs[path]);
+	}
+
+	tr.style.display = 'table-row';
+
+	a1.style.display = 'none';
+	a2.style.display = 'inline';
+}
+
+function hideTableRow(path){
+
+	var tr = tableRows[path];
+	var a1 = tableShows[path];
+	var a2 = tableHides[path];
+
+	tr.style.display = 'none';
+
+	a1.style.display = 'inline';
+	a2.style.display = 'none';
+}
+
+function buildPreBlock(value){
+
+	//
+	// how many lines ?
+	//
+
+	var s = ''+value;
+	s = s.replace("\r\n", "\n");
+	s = s.replace("\r", "");
+	var lines = s.split("\n");
+
+
+	if (lines.length < 2){
+
+		if (lines[0].length < 60){
+
+			var pre = document.createElement('pre');
+			pre.appendChild(document.createTextNode(s));
+			return pre;
+		}
+	}
+
+
+	//
+	// multiple lines :(
+	//
+
+	var preview = lines[0].substr(0, 60) + ' ...';
+
+	var pre1 = document.createElement('pre');
+	pre1.appendChild(document.createTextNode(preview));
+	pre1.className = 'clicky';
+
+	var pre2 = document.createElement('pre');
+	pre2.appendChild(document.createTextNode(s));
+	pre2.style.display = 'none';
+	pre2.className = 'clicky';
+
+	pre1.onclick = function(){
+		pre1.style.display = 'none';
+		pre2.style.display = 'block';
+	}
+
+	pre2.onclick = function(){
+		pre1.style.display = 'block';
+		pre2.style.display = 'none';
+	}
+
+	var pre = document.createElement('div');
+
+	pre.appendChild(pre1);
+	pre.appendChild(pre2);
+
+	return pre;
+}
+
+function getConstructorClass(obj){
+
+	if (!obj.constructor || !obj.constructor.toString) return;
+
+	var m = obj.constructor.toString().match(/function\s*(\w+)/);
+
+	if (m && m.length == 2) return m[1];
+
+	return null;
+}
+
+function keySorter(a, b){
+
+	if (a == parseInt(a) && b == parseInt(b)){
+
+		return (parseInt(a) > parseInt(b)) ? 1 : ((parseInt(a) < parseInt(b)) ? -1 : 0);
+	}
+
+	// sort by lowercase string
+
+	var a2 = String(a).toLowerCase();
+	var b2 = String(b).toLowerCase();
+
+	return (a2 > b2) ? 1 : ((a2 < b2) ? -1 : 0);
+}
+
+</script>
+<style>
+
+body {
+	font-family: arial, helvetica, sans-serif;
+}
+
+table {
+	border-width: 0px;
+	border-spacing: 1px;
+	border-collapse: separate;
+}
+
+td {
+	border-width: 0px;
+	padding: 2px;
+}
+
+img {
+	border: 0;
+}
+
+pre {
+	margin: 0;
+	padding: 0;
+	white-space: -moz-pre-wrap;  /* Mozilla, supported since 1999 */
+	white-space: -pre-wrap;      /* Opera 4 - 6 */
+	white-space: -o-pre-wrap;    /* Opera 7 */
+	white-space: pre-wrap;       /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */
+	word-wrap: break-word;       /* IE 5.5+ */
+}
+
+pre.clicky {
+	cursor: hand;
+	cursor: pointer;
+}
+
+td.propPlus {
+	width: 9px;
+	background-color: #ddd;
+}
+
+td.propName {
+	background-color: #ddd;
+}
+
+td.propType {
+	background-color: #ddd;
+}
+
+td.propVal {
+	background-color: #ddd;
+}
+
+</style>
+</head>
+<body>
+
+<h2>Javascript Object Browser</h2>
+
+<div id="frame"></div>
+
+</body>
+</html>
\ No newline at end of file

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/deep.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/spacer.gif
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/spacer.gif?rev=618461&view=auto
==============================================================================
Binary file - no diff available.

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/debug/spacer.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,63 @@
+dojo.require("dojo.lang.common");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.lang.declare");
+dojo.provide("dojo.dnd.DragAndDrop");
+dojo.declare("dojo.dnd.DragSource",null,{type:"",onDragEnd:function(_1){
+},onDragStart:function(_2){
+},onSelected:function(_3){
+},unregister:function(){
+dojo.dnd.dragManager.unregisterDragSource(this);
+},reregister:function(){
+dojo.dnd.dragManager.registerDragSource(this);
+}});
+dojo.declare("dojo.dnd.DragObject",null,{type:"",register:function(){
+var dm=dojo.dnd.dragManager;
+if(dm["registerDragObject"]){
+dm.registerDragObject(this);
+}
+},onDragStart:function(_5){
+},onDragMove:function(_6){
+},onDragOver:function(_7){
+},onDragOut:function(_8){
+},onDragEnd:function(_9){
+},onDragLeave:dojo.lang.forward("onDragOut"),onDragEnter:dojo.lang.forward("onDragOver"),ondragout:dojo.lang.forward("onDragOut"),ondragover:dojo.lang.forward("onDragOver")});
+dojo.declare("dojo.dnd.DropTarget",null,{acceptsType:function(_a){
+if(!dojo.lang.inArray(this.acceptedTypes,"*")){
+if(!dojo.lang.inArray(this.acceptedTypes,_a)){
+return false;
+}
+}
+return true;
+},accepts:function(_b){
+if(!dojo.lang.inArray(this.acceptedTypes,"*")){
+for(var i=0;i<_b.length;i++){
+if(!dojo.lang.inArray(this.acceptedTypes,_b[i].type)){
+return false;
+}
+}
+}
+return true;
+},unregister:function(){
+dojo.dnd.dragManager.unregisterDropTarget(this);
+},onDragOver:function(_d){
+},onDragOut:function(_e){
+},onDragMove:function(_f){
+},onDropStart:function(evt){
+},onDrop:function(evt){
+},onDropEnd:function(){
+}},function(){
+this.acceptedTypes=[];
+});
+dojo.dnd.DragEvent=function(){
+this.dragSource=null;
+this.dragObject=null;
+this.target=null;
+this.eventStatus="success";
+};
+dojo.declare("dojo.dnd.DragManager",null,{selectedSources:[],dragObjects:[],dragSources:[],registerDragSource:function(_12){
+},dropTargets:[],registerDropTarget:function(_13){
+},lastDragTarget:null,currentDragTarget:null,onKeyDown:function(){
+},onMouseOut:function(){
+},onMouseMove:function(){
+},onMouseUp:function(){
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/DragAndDrop.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,356 @@
+dojo.provide("dojo.dnd.HtmlDragAndDrop");
+dojo.require("dojo.dnd.HtmlDragManager");
+dojo.require("dojo.dnd.DragAndDrop");
+dojo.require("dojo.html.*");
+dojo.require("dojo.html.display");
+dojo.require("dojo.html.util");
+dojo.require("dojo.html.selection");
+dojo.require("dojo.html.iframe");
+dojo.require("dojo.lang.extras");
+dojo.require("dojo.lfx.*");
+dojo.require("dojo.event.*");
+dojo.declare("dojo.dnd.HtmlDragSource",dojo.dnd.DragSource,{dragClass:"",onDragStart:function(){
+var _1=new dojo.dnd.HtmlDragObject(this.dragObject,this.type);
+if(this.dragClass){
+_1.dragClass=this.dragClass;
+}
+if(this.constrainToContainer){
+_1.constrainTo(this.constrainingContainer||this.domNode.parentNode);
+}
+return _1;
+},setDragHandle:function(_2){
+_2=dojo.byId(_2);
+dojo.dnd.dragManager.unregisterDragSource(this);
+this.domNode=_2;
+dojo.dnd.dragManager.registerDragSource(this);
+},setDragTarget:function(_3){
+this.dragObject=_3;
+},constrainTo:function(_4){
+this.constrainToContainer=true;
+if(_4){
+this.constrainingContainer=_4;
+}
+},onSelected:function(){
+for(var i=0;i<this.dragObjects.length;i++){
+dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragSource(this.dragObjects[i]));
+}
+},addDragObjects:function(el){
+for(var i=0;i<arguments.length;i++){
+this.dragObjects.push(dojo.byId(arguments[i]));
+}
+}},function(_8,_9){
+_8=dojo.byId(_8);
+this.dragObjects=[];
+this.constrainToContainer=false;
+if(_8){
+this.domNode=_8;
+this.dragObject=_8;
+this.type=(_9)||(this.domNode.nodeName.toLowerCase());
+dojo.dnd.DragSource.prototype.reregister.call(this);
+}
+});
+dojo.declare("dojo.dnd.HtmlDragObject",dojo.dnd.DragObject,{dragClass:"",opacity:0.5,createIframe:true,disableX:false,disableY:false,createDragNode:function(){
+var _a=this.domNode.cloneNode(true);
+if(this.dragClass){
+dojo.html.addClass(_a,this.dragClass);
+}
+if(this.opacity<1){
+dojo.html.setOpacity(_a,this.opacity);
+}
+var _b=_a.tagName.toLowerCase();
+var _c=(_b=="tr");
+if((_c)||(_b=="tbody")){
+var _d=this.domNode.ownerDocument;
+var _e=_d.createElement("table");
+if(_c){
+var _f=_d.createElement("tbody");
+_e.appendChild(_f);
+_f.appendChild(_a);
+}else{
+_e.appendChild(_a);
+}
+var _10=((_c)?this.domNode:this.domNode.firstChild);
+var _11=((_c)?_a:_a.firstChild);
+var _12=_10.childNodes;
+var _13=_11.childNodes;
+for(var i=0;i<_12.length;i++){
+if((_13[i])&&(_13[i].style)){
+_13[i].style.width=dojo.html.getContentBox(_12[i]).width+"px";
+}
+}
+_a=_e;
+}
+if((dojo.render.html.ie55||dojo.render.html.ie60)&&this.createIframe){
+with(_a.style){
+top="0px";
+left="0px";
+}
+var _15=document.createElement("div");
+_15.appendChild(_a);
+this.bgIframe=new dojo.html.BackgroundIframe(_15);
+_15.appendChild(this.bgIframe.iframe);
+_a=_15;
+}
+_a.style.zIndex=999;
+return _a;
+},onDragStart:function(e){
+dojo.html.clearSelection();
+this.scrollOffset=dojo.html.getScroll().offset;
+this.dragStartPosition=dojo.html.getAbsolutePosition(this.domNode,true);
+this.dragOffset={y:this.dragStartPosition.y-e.pageY,x:this.dragStartPosition.x-e.pageX};
+this.dragClone=this.createDragNode();
+this.containingBlockPosition=this.domNode.offsetParent?dojo.html.getAbsolutePosition(this.domNode.offsetParent,true):{x:0,y:0};
+if(this.constrainToContainer){
+this.constraints=this.getConstraints();
+}
+with(this.dragClone.style){
+position="absolute";
+top=this.dragOffset.y+e.pageY+"px";
+left=this.dragOffset.x+e.pageX+"px";
+}
+dojo.body().appendChild(this.dragClone);
+dojo.event.topic.publish("dragStart",{source:this});
+},getConstraints:function(){
+if(this.constrainingContainer.nodeName.toLowerCase()=="body"){
+var _17=dojo.html.getViewport();
+var _18=_17.width;
+var _19=_17.height;
+var _1a=dojo.html.getScroll().offset;
+var x=_1a.x;
+var y=_1a.y;
+}else{
+var _1d=dojo.html.getContentBox(this.constrainingContainer);
+_18=_1d.width;
+_19=_1d.height;
+x=this.containingBlockPosition.x+dojo.html.getPixelValue(this.constrainingContainer,"padding-left",true)+dojo.html.getBorderExtent(this.constrainingContainer,"left");
+y=this.containingBlockPosition.y+dojo.html.getPixelValue(this.constrainingContainer,"padding-top",true)+dojo.html.getBorderExtent(this.constrainingContainer,"top");
+}
+var mb=dojo.html.getMarginBox(this.domNode);
+return {minX:x,minY:y,maxX:x+_18-mb.width,maxY:y+_19-mb.height};
+},updateDragOffset:function(){
+var _1f=dojo.html.getScroll().offset;
+if(_1f.y!=this.scrollOffset.y){
+var _20=_1f.y-this.scrollOffset.y;
+this.dragOffset.y+=_20;
+this.scrollOffset.y=_1f.y;
+}
+if(_1f.x!=this.scrollOffset.x){
+var _20=_1f.x-this.scrollOffset.x;
+this.dragOffset.x+=_20;
+this.scrollOffset.x=_1f.x;
+}
+},onDragMove:function(e){
+this.updateDragOffset();
+var x=this.dragOffset.x+e.pageX;
+var y=this.dragOffset.y+e.pageY;
+if(this.constrainToContainer){
+if(x<this.constraints.minX){
+x=this.constraints.minX;
+}
+if(y<this.constraints.minY){
+y=this.constraints.minY;
+}
+if(x>this.constraints.maxX){
+x=this.constraints.maxX;
+}
+if(y>this.constraints.maxY){
+y=this.constraints.maxY;
+}
+}
+this.setAbsolutePosition(x,y);
+dojo.event.topic.publish("dragMove",{source:this});
+},setAbsolutePosition:function(x,y){
+if(!this.disableY){
+this.dragClone.style.top=y+"px";
+}
+if(!this.disableX){
+this.dragClone.style.left=x+"px";
+}
+},onDragEnd:function(e){
+switch(e.dragStatus){
+case "dropSuccess":
+dojo.html.removeNode(this.dragClone);
+this.dragClone=null;
+break;
+case "dropFailure":
+var _27=dojo.html.getAbsolutePosition(this.dragClone,true);
+var _28={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
+var _29=dojo.lfx.slideTo(this.dragClone,_28,300);
+var _2a=this;
+dojo.event.connect(_29,"onEnd",function(e){
+dojo.html.removeNode(_2a.dragClone);
+_2a.dragClone=null;
+});
+_29.play();
+break;
+}
+dojo.event.topic.publish("dragEnd",{source:this});
+},constrainTo:function(_2c){
+this.constrainToContainer=true;
+if(_2c){
+this.constrainingContainer=_2c;
+}else{
+this.constrainingContainer=this.domNode.parentNode;
+}
+}},function(_2d,_2e){
+this.domNode=dojo.byId(_2d);
+this.type=_2e;
+this.constrainToContainer=false;
+this.dragSource=null;
+dojo.dnd.DragObject.prototype.register.call(this);
+});
+dojo.declare("dojo.dnd.HtmlDropTarget",dojo.dnd.DropTarget,{vertical:false,onDragOver:function(e){
+if(!this.accepts(e.dragObjects)){
+return false;
+}
+this.childBoxes=[];
+for(var i=0,_31;i<this.domNode.childNodes.length;i++){
+_31=this.domNode.childNodes[i];
+if(_31.nodeType!=dojo.html.ELEMENT_NODE){
+continue;
+}
+var pos=dojo.html.getAbsolutePosition(_31,true);
+var _33=dojo.html.getBorderBox(_31);
+this.childBoxes.push({top:pos.y,bottom:pos.y+_33.height,left:pos.x,right:pos.x+_33.width,height:_33.height,width:_33.width,node:_31});
+}
+return true;
+},_getNodeUnderMouse:function(e){
+for(var i=0,_36;i<this.childBoxes.length;i++){
+with(this.childBoxes[i]){
+if(e.pageX>=left&&e.pageX<=right&&e.pageY>=top&&e.pageY<=bottom){
+return i;
+}
+}
+}
+return -1;
+},createDropIndicator:function(){
+this.dropIndicator=document.createElement("div");
+with(this.dropIndicator.style){
+position="absolute";
+zIndex=999;
+if(this.vertical){
+borderLeftWidth="1px";
+borderLeftColor="black";
+borderLeftStyle="solid";
+height=dojo.html.getBorderBox(this.domNode).height+"px";
+top=dojo.html.getAbsolutePosition(this.domNode,true).y+"px";
+}else{
+borderTopWidth="1px";
+borderTopColor="black";
+borderTopStyle="solid";
+width=dojo.html.getBorderBox(this.domNode).width+"px";
+left=dojo.html.getAbsolutePosition(this.domNode,true).x+"px";
+}
+}
+},onDragMove:function(e,_38){
+var i=this._getNodeUnderMouse(e);
+if(!this.dropIndicator){
+this.createDropIndicator();
+}
+var _3a=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
+var _3b=false;
+if(i<0){
+if(this.childBoxes.length){
+var _3c=(dojo.html.gravity(this.childBoxes[0].node,e)&_3a);
+if(_3c){
+_3b=true;
+}
+}else{
+var _3c=true;
+}
+}else{
+var _3d=this.childBoxes[i];
+var _3c=(dojo.html.gravity(_3d.node,e)&_3a);
+if(_3d.node===_38[0].dragSource.domNode){
+_3b=true;
+}else{
+var _3e=_3c?(i>0?this.childBoxes[i-1]:_3d):(i<this.childBoxes.length-1?this.childBoxes[i+1]:_3d);
+if(_3e.node===_38[0].dragSource.domNode){
+_3b=true;
+}
+}
+}
+if(_3b){
+this.dropIndicator.style.display="none";
+return;
+}else{
+this.dropIndicator.style.display="";
+}
+this.placeIndicator(e,_38,i,_3c);
+if(!dojo.html.hasParent(this.dropIndicator)){
+dojo.body().appendChild(this.dropIndicator);
+}
+},placeIndicator:function(e,_40,_41,_42){
+var _43=this.vertical?"left":"top";
+var _44;
+if(_41<0){
+if(this.childBoxes.length){
+_44=_42?this.childBoxes[0]:this.childBoxes[this.childBoxes.length-1];
+}else{
+this.dropIndicator.style[_43]=dojo.html.getAbsolutePosition(this.domNode,true)[this.vertical?"x":"y"]+"px";
+}
+}else{
+_44=this.childBoxes[_41];
+}
+if(_44){
+this.dropIndicator.style[_43]=(_42?_44[_43]:_44[this.vertical?"right":"bottom"])+"px";
+if(this.vertical){
+this.dropIndicator.style.height=_44.height+"px";
+this.dropIndicator.style.top=_44.top+"px";
+}else{
+this.dropIndicator.style.width=_44.width+"px";
+this.dropIndicator.style.left=_44.left+"px";
+}
+}
+},onDragOut:function(e){
+if(this.dropIndicator){
+dojo.html.removeNode(this.dropIndicator);
+delete this.dropIndicator;
+}
+},onDrop:function(e){
+this.onDragOut(e);
+var i=this._getNodeUnderMouse(e);
+var _48=this.vertical?dojo.html.gravity.WEST:dojo.html.gravity.NORTH;
+if(i<0){
+if(this.childBoxes.length){
+if(dojo.html.gravity(this.childBoxes[0].node,e)&_48){
+return this.insert(e,this.childBoxes[0].node,"before");
+}else{
+return this.insert(e,this.childBoxes[this.childBoxes.length-1].node,"after");
+}
+}
+return this.insert(e,this.domNode,"append");
+}
+var _49=this.childBoxes[i];
+if(dojo.html.gravity(_49.node,e)&_48){
+return this.insert(e,_49.node,"before");
+}else{
+return this.insert(e,_49.node,"after");
+}
+},insert:function(e,_4b,_4c){
+var _4d=e.dragObject.domNode;
+if(_4c=="before"){
+return dojo.html.insertBefore(_4d,_4b);
+}else{
+if(_4c=="after"){
+return dojo.html.insertAfter(_4d,_4b);
+}else{
+if(_4c=="append"){
+_4b.appendChild(_4d);
+return true;
+}
+}
+}
+return false;
+}},function(_4e,_4f){
+if(arguments.length==0){
+return;
+}
+this.domNode=dojo.byId(_4e);
+dojo.dnd.DropTarget.call(this);
+if(_4f&&dojo.lang.isString(_4f)){
+_4f=[_4f];
+}
+this.acceptedTypes=_4f||[];
+dojo.dnd.dragManager.registerDropTarget(this);
+});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragAndDrop.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,57 @@
+dojo.provide("dojo.dnd.HtmlDragCopy");
+dojo.require("dojo.dnd.*");
+dojo.declare("dojo.dnd.HtmlDragCopySource",dojo.dnd.HtmlDragSource,function(_1,_2,_3){
+this.copyOnce=_3;
+this.makeCopy=true;
+},{onDragStart:function(){
+var _4=new dojo.dnd.HtmlDragCopyObject(this.dragObject,this.type,this);
+if(this.dragClass){
+_4.dragClass=this.dragClass;
+}
+if(this.constrainToContainer){
+_4.constrainTo(this.constrainingContainer||this.domNode.parentNode);
+}
+return _4;
+},onSelected:function(){
+for(var i=0;i<this.dragObjects.length;i++){
+dojo.dnd.dragManager.selectedSources.push(new dojo.dnd.HtmlDragCopySource(this.dragObjects[i]));
+}
+}});
+dojo.declare("dojo.dnd.HtmlDragCopyObject",dojo.dnd.HtmlDragObject,function(_6,_7,_8){
+this.copySource=_8;
+},{onDragStart:function(e){
+dojo.dnd.HtmlDragCopyObject.superclass.onDragStart.apply(this,arguments);
+if(this.copySource.makeCopy){
+this.sourceNode=this.domNode;
+this.domNode=this.domNode.cloneNode(true);
+}
+},onDragEnd:function(e){
+switch(e.dragStatus){
+case "dropFailure":
+var _b=dojo.html.getAbsolutePosition(this.dragClone,true);
+var _c={left:this.dragStartPosition.x+1,top:this.dragStartPosition.y+1};
+var _d=dojo.lfx.slideTo(this.dragClone,_c,500,dojo.lfx.easeOut);
+var _e=this;
+dojo.event.connect(_d,"onEnd",function(e){
+dojo.lang.setTimeout(function(){
+dojo.html.removeNode(_e.dragClone);
+_e.dragClone=null;
+if(_e.copySource.makeCopy){
+dojo.html.removeNode(_e.domNode);
+_e.domNode=_e.sourceNode;
+_e.sourceNode=null;
+}
+},200);
+});
+_d.play();
+dojo.event.topic.publish("dragEnd",{source:this});
+return;
+}
+dojo.dnd.HtmlDragCopyObject.superclass.onDragEnd.apply(this,arguments);
+this.copySource.dragObject=this.domNode;
+if(this.copySource.copyOnce){
+this.copySource.makeCopy=false;
+}
+new dojo.dnd.HtmlDragCopySource(this.sourceNode,this.type,this.copySource.copyOnce);
+this.sourceNode=null;
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragCopy.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,282 @@
+dojo.provide("dojo.dnd.HtmlDragManager");
+dojo.require("dojo.dnd.DragAndDrop");
+dojo.require("dojo.event.*");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.html.common");
+dojo.require("dojo.html.layout");
+dojo.declare("dojo.dnd.HtmlDragManager",dojo.dnd.DragManager,{disabled:false,nestedTargets:false,mouseDownTimer:null,dsCounter:0,dsPrefix:"dojoDragSource",dropTargetDimensions:[],currentDropTarget:null,previousDropTarget:null,_dragTriggered:false,selectedSources:[],dragObjects:[],dragSources:[],dropTargets:[],currentX:null,currentY:null,lastX:null,lastY:null,mouseDownX:null,mouseDownY:null,threshold:7,dropAcceptable:false,cancelEvent:function(e){
+e.stopPropagation();
+e.preventDefault();
+},registerDragSource:function(ds){
+if(ds["domNode"]){
+var dp=this.dsPrefix;
+var _4=dp+"Idx_"+(this.dsCounter++);
+ds.dragSourceId=_4;
+this.dragSources[_4]=ds;
+ds.domNode.setAttribute(dp,_4);
+if(dojo.render.html.ie){
+dojo.event.browser.addListener(ds.domNode,"ondragstart",this.cancelEvent);
+}
+}
+},unregisterDragSource:function(ds){
+if(ds["domNode"]){
+var dp=this.dsPrefix;
+var _7=ds.dragSourceId;
+delete ds.dragSourceId;
+delete this.dragSources[_7];
+ds.domNode.setAttribute(dp,null);
+if(dojo.render.html.ie){
+dojo.event.browser.removeListener(ds.domNode,"ondragstart",this.cancelEvent);
+}
+}
+},registerDropTarget:function(dt){
+this.dropTargets.push(dt);
+},unregisterDropTarget:function(dt){
+var _a=dojo.lang.find(this.dropTargets,dt,true);
+if(_a>=0){
+this.dropTargets.splice(_a,1);
+}
+},getDragSource:function(e){
+var tn=e.target;
+if(tn===dojo.body()){
+return;
+}
+var ta=dojo.html.getAttribute(tn,this.dsPrefix);
+while((!ta)&&(tn)){
+tn=tn.parentNode;
+if((!tn)||(tn===dojo.body())){
+return;
+}
+ta=dojo.html.getAttribute(tn,this.dsPrefix);
+}
+return this.dragSources[ta];
+},onKeyDown:function(e){
+},onMouseDown:function(e){
+if(this.disabled){
+return;
+}
+if(dojo.render.html.ie){
+if(e.button!=1){
+return;
+}
+}else{
+if(e.which!=1){
+return;
+}
+}
+var _10=e.target.nodeType==dojo.html.TEXT_NODE?e.target.parentNode:e.target;
+if(dojo.html.isTag(_10,"button","textarea","input","select","option")){
+return;
+}
+var ds=this.getDragSource(e);
+if(!ds){
+return;
+}
+if(!dojo.lang.inArray(this.selectedSources,ds)){
+this.selectedSources.push(ds);
+ds.onSelected();
+}
+this.mouseDownX=e.pageX;
+this.mouseDownY=e.pageY;
+e.preventDefault();
+dojo.event.connect(document,"onmousemove",this,"onMouseMove");
+},onMouseUp:function(e,_13){
+if(this.selectedSources.length==0){
+return;
+}
+this.mouseDownX=null;
+this.mouseDownY=null;
+this._dragTriggered=false;
+e.dragSource=this.dragSource;
+if((!e.shiftKey)&&(!e.ctrlKey)){
+if(this.currentDropTarget){
+this.currentDropTarget.onDropStart();
+}
+dojo.lang.forEach(this.dragObjects,function(_14){
+var ret=null;
+if(!_14){
+return;
+}
+if(this.currentDropTarget){
+e.dragObject=_14;
+var ce=this.currentDropTarget.domNode.childNodes;
+if(ce.length>0){
+e.dropTarget=ce[0];
+while(e.dropTarget==_14.domNode){
+e.dropTarget=e.dropTarget.nextSibling;
+}
+}else{
+e.dropTarget=this.currentDropTarget.domNode;
+}
+if(this.dropAcceptable){
+ret=this.currentDropTarget.onDrop(e);
+}else{
+this.currentDropTarget.onDragOut(e);
+}
+}
+e.dragStatus=this.dropAcceptable&&ret?"dropSuccess":"dropFailure";
+dojo.lang.delayThese([function(){
+try{
+_14.dragSource.onDragEnd(e);
+}
+catch(err){
+var _17={};
+for(var i in e){
+if(i=="type"){
+_17.type="mouseup";
+continue;
+}
+_17[i]=e[i];
+}
+_14.dragSource.onDragEnd(_17);
+}
+},function(){
+_14.onDragEnd(e);
+}]);
+},this);
+this.selectedSources=[];
+this.dragObjects=[];
+this.dragSource=null;
+if(this.currentDropTarget){
+this.currentDropTarget.onDropEnd();
+}
+}else{
+}
+dojo.event.disconnect(document,"onmousemove",this,"onMouseMove");
+this.currentDropTarget=null;
+},onScroll:function(){
+for(var i=0;i<this.dragObjects.length;i++){
+if(this.dragObjects[i].updateDragOffset){
+this.dragObjects[i].updateDragOffset();
+}
+}
+if(this.dragObjects.length){
+this.cacheTargetLocations();
+}
+},_dragStartDistance:function(x,y){
+if((!this.mouseDownX)||(!this.mouseDownX)){
+return;
+}
+var dx=Math.abs(x-this.mouseDownX);
+var dx2=dx*dx;
+var dy=Math.abs(y-this.mouseDownY);
+var dy2=dy*dy;
+return parseInt(Math.sqrt(dx2+dy2),10);
+},cacheTargetLocations:function(){
+dojo.profile.start("cacheTargetLocations");
+this.dropTargetDimensions=[];
+dojo.lang.forEach(this.dropTargets,function(_20){
+var tn=_20.domNode;
+if(!tn||!_20.accepts([this.dragSource])){
+return;
+}
+var abs=dojo.html.getAbsolutePosition(tn,true);
+var bb=dojo.html.getBorderBox(tn);
+this.dropTargetDimensions.push([[abs.x,abs.y],[abs.x+bb.width,abs.y+bb.height],_20]);
+},this);
+dojo.profile.end("cacheTargetLocations");
+},onMouseMove:function(e){
+if((dojo.render.html.ie)&&(e.button!=1)){
+this.currentDropTarget=null;
+this.onMouseUp(e,true);
+return;
+}
+if((this.selectedSources.length)&&(!this.dragObjects.length)){
+var dx;
+var dy;
+if(!this._dragTriggered){
+this._dragTriggered=(this._dragStartDistance(e.pageX,e.pageY)>this.threshold);
+if(!this._dragTriggered){
+return;
+}
+dx=e.pageX-this.mouseDownX;
+dy=e.pageY-this.mouseDownY;
+}
+this.dragSource=this.selectedSources[0];
+dojo.lang.forEach(this.selectedSources,function(_27){
+if(!_27){
+return;
+}
+var tdo=_27.onDragStart(e);
+if(tdo){
+tdo.onDragStart(e);
+tdo.dragOffset.y+=dy;
+tdo.dragOffset.x+=dx;
+tdo.dragSource=_27;
+this.dragObjects.push(tdo);
+}
+},this);
+this.previousDropTarget=null;
+this.cacheTargetLocations();
+}
+dojo.lang.forEach(this.dragObjects,function(_29){
+if(_29){
+_29.onDragMove(e);
+}
+});
+if(this.currentDropTarget){
+var c=dojo.html.toCoordinateObject(this.currentDropTarget.domNode,true);
+var dtp=[[c.x,c.y],[c.x+c.width,c.y+c.height]];
+}
+if((!this.nestedTargets)&&(dtp)&&(this.isInsideBox(e,dtp))){
+if(this.dropAcceptable){
+this.currentDropTarget.onDragMove(e,this.dragObjects);
+}
+}else{
+var _2c=this.findBestTarget(e);
+if(_2c.target===null){
+if(this.currentDropTarget){
+this.currentDropTarget.onDragOut(e);
+this.previousDropTarget=this.currentDropTarget;
+this.currentDropTarget=null;
+}
+this.dropAcceptable=false;
+return;
+}
+if(this.currentDropTarget!==_2c.target){
+if(this.currentDropTarget){
+this.previousDropTarget=this.currentDropTarget;
+this.currentDropTarget.onDragOut(e);
+}
+this.currentDropTarget=_2c.target;
+e.dragObjects=this.dragObjects;
+this.dropAcceptable=this.currentDropTarget.onDragOver(e);
+}else{
+if(this.dropAcceptable){
+this.currentDropTarget.onDragMove(e,this.dragObjects);
+}
+}
+}
+},findBestTarget:function(e){
+var _2e=this;
+var _2f=new Object();
+_2f.target=null;
+_2f.points=null;
+dojo.lang.every(this.dropTargetDimensions,function(_30){
+if(!_2e.isInsideBox(e,_30)){
+return true;
+}
+_2f.target=_30[2];
+_2f.points=_30;
+return Boolean(_2e.nestedTargets);
+});
+return _2f;
+},isInsideBox:function(e,_32){
+if((e.pageX>_32[0][0])&&(e.pageX<_32[1][0])&&(e.pageY>_32[0][1])&&(e.pageY<_32[1][1])){
+return true;
+}
+return false;
+},onMouseOver:function(e){
+},onMouseOut:function(e){
+}});
+dojo.dnd.dragManager=new dojo.dnd.HtmlDragManager();
+(function(){
+var d=document;
+var dm=dojo.dnd.dragManager;
+dojo.event.connect(d,"onkeydown",dm,"onKeyDown");
+dojo.event.connect(d,"onmouseover",dm,"onMouseOver");
+dojo.event.connect(d,"onmouseout",dm,"onMouseOut");
+dojo.event.connect(d,"onmousedown",dm,"onMouseDown");
+dojo.event.connect(d,"onmouseup",dm,"onMouseUp");
+dojo.event.connect(window,"onscroll",dm,"onScroll");
+})();

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragManager.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,41 @@
+dojo.provide("dojo.dnd.HtmlDragMove");
+dojo.require("dojo.dnd.*");
+dojo.declare("dojo.dnd.HtmlDragMoveSource",dojo.dnd.HtmlDragSource,{onDragStart:function(){
+var _1=new dojo.dnd.HtmlDragMoveObject(this.dragObject,this.type);
+if(this.constrainToContainer){
+_1.constrainTo(this.constrainingContainer);
+}
+return _1;
+},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 _4=parseInt(dojo.html.getComputedStyle(this.domNode,"left"));
+var _5=parseInt(dojo.html.getComputedStyle(this.domNode,"top"));
+this.dragStartPosition={x:isNaN(_4)?0:_4,y:isNaN(_5)?0:_5};
+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: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/HtmlDragMove.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,11 @@
+dojo.provide("dojo.dnd.Sortable");
+dojo.require("dojo.dnd.*");
+dojo.dnd.Sortable=function(){
+};
+dojo.lang.extend(dojo.dnd.Sortable,{ondragstart:function(e){
+var _2=e.target;
+while(_2.parentNode&&_2.parentNode!=this){
+_2=_2.parentNode;
+}
+return _2;
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/Sortable.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,240 @@
+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(_1,_2,_3,_4){
+this.controller=_2;
+this.treeNode=_4;
+dojo.dnd.HtmlDragSource.call(this,_1,_3);
+};
+dojo.inherits(dojo.dnd.TreeDragSource,dojo.dnd.HtmlDragSource);
+dojo.lang.extend(dojo.dnd.TreeDragSource,{onDragStart:function(){
+var _5=dojo.dnd.HtmlDragSource.prototype.onDragStart.call(this);
+_5.treeNode=this.treeNode;
+_5.onDragStart=dojo.lang.hitch(_5,function(e){
+this.savedSelectedNode=this.treeNode.tree.selector.selectedNode;
+if(this.savedSelectedNode){
+this.savedSelectedNode.unMarkSelected();
+}
+var _7=dojo.dnd.HtmlDragObject.prototype.onDragStart.apply(this,arguments);
+var _8=this.dragClone.getElementsByTagName("img");
+for(var i=0;i<_8.length;i++){
+_8.item(i).style.backgroundImage="url()";
+}
+return _7;
+});
+_5.onDragEnd=function(e){
+if(this.savedSelectedNode){
+this.savedSelectedNode.markSelected();
+}
+return dojo.dnd.HtmlDragObject.prototype.onDragEnd.apply(this,arguments);
+};
+return _5;
+},onDragEnd:function(e){
+var _c=dojo.dnd.HtmlDragSource.prototype.onDragEnd.call(this,e);
+return _c;
+}});
+dojo.dnd.TreeDropTarget=function(_d,_e,_f,_10){
+this.treeNode=_10;
+this.controller=_e;
+dojo.dnd.HtmlDropTarget.apply(this,[_d,_f]);
+};
+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(_11){
+if(this.position==_11){
+return;
+}
+this.hideIndicator();
+this.position=_11;
+if(_11=="before"){
+this.treeNode.labelNode.style.borderTop=this.indicatorStyle;
+}else{
+if(_11=="after"){
+this.treeNode.labelNode.style.borderBottom=this.indicatorStyle;
+}else{
+if(_11=="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 _13=dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this,arguments);
+if(_13&&this.treeNode.isFolder&&!this.treeNode.isExpanded){
+this.setAutoExpandTimer();
+}
+return _13;
+},accepts:function(_14){
+var _15=dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this,arguments);
+if(!_15){
+return false;
+}
+var _16=_14[0].treeNode;
+if(dojo.lang.isUndefined(_16)||!_16||!_16.isTreeNode){
+dojo.raise("Source is not TreeNode or not found");
+}
+if(_16===this.treeNode){
+return false;
+}
+return true;
+},setAutoExpandTimer:function(){
+var _17=this;
+var _18=function(){
+if(dojo.dnd.dragManager.currentDropTarget===_17){
+_17.controller.expand(_17.treeNode);
+}
+};
+this.autoExpandTimer=dojo.lang.setTimeout(_18,_17.autoExpandDelay);
+},getDNDMode:function(){
+return this.treeNode.tree.DNDMode;
+},getAcceptPosition:function(e,_1a){
+var _1b=this.getDNDMode();
+if(_1b&dojo.widget.Tree.prototype.DNDModes.ONTO&&!(!this.treeNode.actionIsDisabled(dojo.widget.TreeNode.prototype.actions.ADDCHILD)&&_1a.parent!==this.treeNode&&this.controller.canMove(_1a,this.treeNode))){
+_1b&=~dojo.widget.Tree.prototype.DNDModes.ONTO;
+}
+var _1c=this.getPosition(e,_1b);
+if(_1c=="onto"||(!this.isAdjacentNode(_1a,_1c)&&this.controller.canMove(_1a,this.treeNode.parent))){
+return _1c;
+}else{
+return false;
+}
+},onDragOut:function(e){
+this.clearAutoExpandTimer();
+this.hideIndicator();
+},clearAutoExpandTimer:function(){
+if(this.autoExpandTimer){
+clearTimeout(this.autoExpandTimer);
+this.autoExpandTimer=null;
+}
+},onDragMove:function(e,_1f){
+var _20=_1f[0].treeNode;
+var _21=this.getAcceptPosition(e,_20);
+if(_21){
+this.showIndicator(_21);
+}
+},isAdjacentNode:function(_22,_23){
+if(_22===this.treeNode){
+return true;
+}
+if(_22.getNextSibling()===this.treeNode&&_23=="before"){
+return true;
+}
+if(_22.getPreviousSibling()===this.treeNode&&_23=="after"){
+return true;
+}
+return false;
+},getPosition:function(e,_25){
+var _26=dojo.byId(this.treeNode.labelNode);
+var _27=e.pageY||e.clientY+dojo.body().scrollTop;
+var _28=dojo.html.getAbsolutePosition(_26).y;
+var _29=dojo.html.getBorderBox(_26).height;
+var _2a=_27-_28;
+var p=_2a/_29;
+var _2c="";
+if(_25&dojo.widget.Tree.prototype.DNDModes.ONTO&&_25&dojo.widget.Tree.prototype.DNDModes.BETWEEN){
+if(p<=0.3){
+_2c="before";
+}else{
+if(p<=0.7){
+_2c="onto";
+}else{
+_2c="after";
+}
+}
+}else{
+if(_25&dojo.widget.Tree.prototype.DNDModes.BETWEEN){
+if(p<=0.5){
+_2c="before";
+}else{
+_2c="after";
+}
+}else{
+if(_25&dojo.widget.Tree.prototype.DNDModes.ONTO){
+_2c="onto";
+}
+}
+}
+return _2c;
+},getTargetParentIndex:function(_2d,_2e){
+var _2f=_2e=="before"?this.treeNode.getParentIndex():this.treeNode.getParentIndex()+1;
+if(this.treeNode.parent===_2d.parent&&this.treeNode.getParentIndex()>_2d.getParentIndex()){
+_2f--;
+}
+return _2f;
+},onDrop:function(e){
+var _31=this.position;
+this.onDragOut(e);
+var _32=e.dragObject.treeNode;
+if(!dojo.lang.isObject(_32)){
+dojo.raise("TreeNode not found in dragObject");
+}
+if(_31=="onto"){
+return this.controller.move(_32,this.treeNode,0);
+}else{
+var _33=this.getTargetParentIndex(_32,_31);
+return this.controller.move(_32,this.treeNode.parent,_33);
+}
+}});
+dojo.dnd.TreeDNDController=function(_34){
+this.treeController=_34;
+this.dragSources={};
+this.dropTargets={};
+};
+dojo.lang.extend(dojo.dnd.TreeDNDController,{listenTree:function(_35){
+dojo.event.topic.subscribe(_35.eventNames.createDOMNode,this,"onCreateDOMNode");
+dojo.event.topic.subscribe(_35.eventNames.moveFrom,this,"onMoveFrom");
+dojo.event.topic.subscribe(_35.eventNames.moveTo,this,"onMoveTo");
+dojo.event.topic.subscribe(_35.eventNames.addChild,this,"onAddChild");
+dojo.event.topic.subscribe(_35.eventNames.removeNode,this,"onRemoveNode");
+dojo.event.topic.subscribe(_35.eventNames.treeDestroy,this,"onTreeDestroy");
+},unlistenTree:function(_36){
+dojo.event.topic.unsubscribe(_36.eventNames.createDOMNode,this,"onCreateDOMNode");
+dojo.event.topic.unsubscribe(_36.eventNames.moveFrom,this,"onMoveFrom");
+dojo.event.topic.unsubscribe(_36.eventNames.moveTo,this,"onMoveTo");
+dojo.event.topic.unsubscribe(_36.eventNames.addChild,this,"onAddChild");
+dojo.event.topic.unsubscribe(_36.eventNames.removeNode,this,"onRemoveNode");
+dojo.event.topic.unsubscribe(_36.eventNames.treeDestroy,this,"onTreeDestroy");
+},onTreeDestroy:function(_37){
+this.unlistenTree(_37.source);
+},onCreateDOMNode:function(_38){
+this.registerDNDNode(_38.source);
+},onAddChild:function(_39){
+this.registerDNDNode(_39.child);
+},onMoveFrom:function(_3a){
+var _3b=this;
+dojo.lang.forEach(_3a.child.getDescendants(),function(_3c){
+_3b.unregisterDNDNode(_3c);
+});
+},onMoveTo:function(_3d){
+var _3e=this;
+dojo.lang.forEach(_3d.child.getDescendants(),function(_3f){
+_3e.registerDNDNode(_3f);
+});
+},registerDNDNode:function(_40){
+if(!_40.tree.DNDMode){
+return;
+}
+var _41=null;
+var _42=null;
+if(!_40.actionIsDisabled(_40.actions.MOVE)){
+var _41=new dojo.dnd.TreeDragSource(_40.labelNode,this,_40.tree.widgetId,_40);
+this.dragSources[_40.widgetId]=_41;
+}
+var _42=new dojo.dnd.TreeDropTarget(_40.labelNode,this.treeController,_40.tree.DNDAcceptTypes,_40);
+this.dropTargets[_40.widgetId]=_42;
+},unregisterDNDNode:function(_43){
+if(this.dragSources[_43.widgetId]){
+dojo.dnd.dragManager.unregisterDragSource(this.dragSources[_43.widgetId]);
+delete this.dragSources[_43.widgetId];
+}
+if(this.dropTargets[_43.widgetId]){
+dojo.dnd.dragManager.unregisterDropTarget(this.dropTargets[_43.widgetId]);
+delete this.dropTargets[_43.widgetId];
+}
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDrop.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,205 @@
+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(_1,_2,_3,_4){
+this.controller=_2;
+this.treeNode=_4;
+dojo.dnd.HtmlDragSource.call(this,_1,_3);
+};
+dojo.inherits(dojo.dnd.TreeDragSourceV3,dojo.dnd.HtmlDragSource);
+dojo.dnd.TreeDropTargetV3=function(_5,_6,_7,_8){
+this.treeNode=_8;
+this.controller=_6;
+dojo.dnd.HtmlDropTarget.call(this,_5,_7);
+};
+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(_9){
+if(this.position==_9){
+return;
+}
+this.hideIndicator();
+this.position=_9;
+var _a=this.treeNode;
+_a.contentNode.style.width=dojo.html.getBorderBox(_a.labelNode).width+"px";
+if(_9=="onto"){
+_a.contentNode.style.border=this.indicatorStyle;
+}else{
+if(_9=="before"){
+_a.contentNode.style.borderTop=this.indicatorStyle;
+}else{
+if(_9=="after"){
+_a.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 _c=dojo.dnd.HtmlDropTarget.prototype.onDragOver.apply(this,arguments);
+if(_c&&this.treeNode.isFolder&&!this.treeNode.isExpanded){
+this.setAutoExpandTimer();
+}
+if(_c){
+this.cacheNodeCoords();
+}
+return _c;
+},accepts:function(_d){
+var _e=dojo.dnd.HtmlDropTarget.prototype.accepts.apply(this,arguments);
+if(!_e){
+return false;
+}
+for(var i=0;i<_d.length;i++){
+var _10=_d[i].treeNode;
+if(_10===this.treeNode){
+return false;
+}
+}
+return true;
+},setAutoExpandTimer:function(){
+var _11=this;
+var _12=function(){
+if(dojo.dnd.dragManager.currentDropTarget===_11){
+_11.controller.expand(_11.treeNode);
+dojo.dnd.dragManager.cacheTargetLocations();
+}
+};
+this.autoExpandTimer=dojo.lang.setTimeout(_12,_11.autoExpandDelay);
+},getAcceptPosition:function(e,_14){
+var _15=this.treeNode.tree.DndMode;
+if(_15&dojo.widget.TreeV3.prototype.DndModes.ONTO&&this.treeNode.actionIsDisabledNow(this.treeNode.actions.ADDCHILD)){
+_15&=~dojo.widget.TreeV3.prototype.DndModes.ONTO;
+}
+var _16=this.getPosition(e,_15);
+if(_16=="onto"){
+return _16;
+}
+for(var i=0;i<_14.length;i++){
+var _18=_14[i].dragSource;
+if(_18.treeNode&&this.isAdjacentNode(_18.treeNode,_16)){
+continue;
+}
+if(!this.controller.canMove(_18.treeNode?_18.treeNode:_18,this.treeNode.parent)){
+return false;
+}
+}
+return _16;
+},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,_1c){
+var _1d=this.getAcceptPosition(e,_1c);
+if(_1d){
+this.showIndicator(_1d);
+}
+},isAdjacentNode:function(_1e,_1f){
+if(_1e===this.treeNode){
+return true;
+}
+if(_1e.getNextSibling()===this.treeNode&&_1f=="before"){
+return true;
+}
+if(_1e.getPreviousSibling()===this.treeNode&&_1f=="after"){
+return true;
+}
+return false;
+},cacheNodeCoords:function(){
+var _20=this.treeNode.contentNode;
+this.cachedNodeY=dojo.html.getAbsolutePosition(_20).y;
+this.cachedNodeHeight=dojo.html.getBorderBox(_20).height;
+},getPosition:function(e,_22){
+var _23=e.pageY||e.clientY+dojo.body().scrollTop;
+var _24=_23-this.cachedNodeY;
+var p=_24/this.cachedNodeHeight;
+var _26="";
+if(_22&dojo.widget.TreeV3.prototype.DndModes.ONTO&&_22&dojo.widget.TreeV3.prototype.DndModes.BETWEEN){
+if(p<=0.33){
+_26="before";
+}else{
+if(p<=0.66||this.treeNode.isExpanded&&this.treeNode.children.length&&!this.treeNode.isLastChild()){
+_26="onto";
+}else{
+_26="after";
+}
+}
+}else{
+if(_22&dojo.widget.TreeV3.prototype.DndModes.BETWEEN){
+if(p<=0.5||this.treeNode.isExpanded&&this.treeNode.children.length&&!this.treeNode.isLastChild()){
+_26="before";
+}else{
+_26="after";
+}
+}else{
+if(_22&dojo.widget.TreeV3.prototype.DndModes.ONTO){
+_26="onto";
+}
+}
+}
+return _26;
+},getTargetParentIndex:function(_27,_28){
+var _29=_28=="before"?this.treeNode.getParentIndex():this.treeNode.getParentIndex()+1;
+if(_27.treeNode&&this.treeNode.parent===_27.treeNode.parent&&this.treeNode.getParentIndex()>_27.treeNode.getParentIndex()){
+_29--;
+}
+return _29;
+},onDrop:function(e){
+var _2b=this.position;
+var _2c=e.dragObject.dragSource;
+var _2d,_2e;
+if(_2b=="onto"){
+_2d=this.treeNode;
+_2e=0;
+}else{
+_2e=this.getTargetParentIndex(_2c,_2b);
+_2d=this.treeNode.parent;
+}
+var r=this.getDropHandler(e,_2c,_2d,_2e)();
+return r;
+},getDropHandler:function(e,_31,_32,_33){
+var _34;
+var _35=this;
+_34=function(){
+var _36;
+if(_31.treeNode){
+_36=_35.controller.move(_31.treeNode,_32,_33,true);
+}else{
+if(dojo.lang.isFunction(_31.onDrop)){
+_31.onDrop(_32,_33);
+}
+var _37=_31.getTreeNode();
+if(_37){
+_36=_35.controller.createChild(_32,_33,_37,true);
+}else{
+_36=true;
+}
+}
+if(_36 instanceof dojo.Deferred){
+var _38=_36.fired==0;
+if(!_38){
+_35.handleDropError(_31,_32,_33,_36);
+}
+return _38;
+}else{
+return _36;
+}
+};
+return _34;
+},handleDropError:function(_39,_3a,_3b,_3c){
+dojo.debug("TreeDropTargetV3.handleDropError: DND error occured");
+dojo.debugShallow(_3c);
+}});

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/TreeDragAndDropV3.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,2 @@
+dojo.kwCompoundRequire({common:["dojo.dnd.DragAndDrop"],browser:["dojo.dnd.HtmlDragAndDrop"],dashboard:["dojo.dnd.HtmlDragAndDrop"]});
+dojo.provide("dojo.dnd.*");

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dnd/__package__.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js Mon Feb  4 14:07:13 2008
@@ -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: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/docs.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,368 @@
+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.xmls
 oap.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 _2=dojo.doc();
+do{
+var id="dj_unique_"+(++arguments.callee._idIncrement);
+}while(_2.getElementById(id));
+return id;
+};
+dojo.dom.getUniqueId._idIncrement=0;
+dojo.dom.firstElement=dojo.dom.getFirstChildElement=function(_4,_5){
+var _6=_4.firstChild;
+while(_6&&_6.nodeType!=dojo.dom.ELEMENT_NODE){
+_6=_6.nextSibling;
+}
+if(_5&&_6&&_6.tagName&&_6.tagName.toLowerCase()!=_5.toLowerCase()){
+_6=dojo.dom.nextElement(_6,_5);
+}
+return _6;
+};
+dojo.dom.lastElement=dojo.dom.getLastChildElement=function(_7,_8){
+var _9=_7.lastChild;
+while(_9&&_9.nodeType!=dojo.dom.ELEMENT_NODE){
+_9=_9.previousSibling;
+}
+if(_8&&_9&&_9.tagName&&_9.tagName.toLowerCase()!=_8.toLowerCase()){
+_9=dojo.dom.prevElement(_9,_8);
+}
+return _9;
+};
+dojo.dom.nextElement=dojo.dom.getNextSiblingElement=function(_a,_b){
+if(!_a){
+return null;
+}
+do{
+_a=_a.nextSibling;
+}while(_a&&_a.nodeType!=dojo.dom.ELEMENT_NODE);
+if(_a&&_b&&_b.toLowerCase()!=_a.tagName.toLowerCase()){
+return dojo.dom.nextElement(_a,_b);
+}
+return _a;
+};
+dojo.dom.prevElement=dojo.dom.getPreviousSiblingElement=function(_c,_d){
+if(!_c){
+return null;
+}
+if(_d){
+_d=_d.toLowerCase();
+}
+do{
+_c=_c.previousSibling;
+}while(_c&&_c.nodeType!=dojo.dom.ELEMENT_NODE);
+if(_c&&_d&&_d.toLowerCase()!=_c.tagName.toLowerCase()){
+return dojo.dom.prevElement(_c,_d);
+}
+return _c;
+};
+dojo.dom.moveChildren=function(_e,_f,_10){
+var _11=0;
+if(_10){
+while(_e.hasChildNodes()&&_e.firstChild.nodeType==dojo.dom.TEXT_NODE){
+_e.removeChild(_e.firstChild);
+}
+while(_e.hasChildNodes()&&_e.lastChild.nodeType==dojo.dom.TEXT_NODE){
+_e.removeChild(_e.lastChild);
+}
+}
+while(_e.hasChildNodes()){
+_f.appendChild(_e.firstChild);
+_11++;
+}
+return _11;
+};
+dojo.dom.copyChildren=function(_12,_13,_14){
+var _15=_12.cloneNode(true);
+return this.moveChildren(_15,_13,_14);
+};
+dojo.dom.replaceChildren=function(_16,_17){
+var _18=[];
+if(dojo.render.html.ie){
+for(var i=0;i<_16.childNodes.length;i++){
+_18.push(_16.childNodes[i]);
+}
+}
+dojo.dom.removeChildren(_16);
+_16.appendChild(_17);
+for(var i=0;i<_18.length;i++){
+dojo.dom.destroyNode(_18[i]);
+}
+};
+dojo.dom.removeChildren=function(_1a){
+var _1b=_1a.childNodes.length;
+while(_1a.hasChildNodes()){
+dojo.dom.removeNode(_1a.firstChild);
+}
+return _1b;
+};
+dojo.dom.replaceNode=function(_1c,_1d){
+return _1c.parentNode.replaceChild(_1d,_1c);
+};
+dojo.dom.destroyNode=function(_1e){
+if(_1e.parentNode){
+_1e=dojo.dom.removeNode(_1e);
+}
+if(_1e.nodeType!=3){
+if(dojo.evalObjPath("dojo.event.browser.clean",false)){
+dojo.event.browser.clean(_1e);
+}
+if(dojo.render.html.ie){
+_1e.outerHTML="";
+}
+}
+};
+dojo.dom.removeNode=function(_1f){
+if(_1f&&_1f.parentNode){
+return _1f.parentNode.removeChild(_1f);
+}
+};
+dojo.dom.getAncestors=function(_20,_21,_22){
+var _23=[];
+var _24=(_21&&(_21 instanceof Function||typeof _21=="function"));
+while(_20){
+if(!_24||_21(_20)){
+_23.push(_20);
+}
+if(_22&&_23.length>0){
+return _23[0];
+}
+_20=_20.parentNode;
+}
+if(_22){
+return null;
+}
+return _23;
+};
+dojo.dom.getAncestorsByTag=function(_25,tag,_27){
+tag=tag.toLowerCase();
+return dojo.dom.getAncestors(_25,function(el){
+return ((el.tagName)&&(el.tagName.toLowerCase()==tag));
+},_27);
+};
+dojo.dom.getFirstAncestorByTag=function(_29,tag){
+return dojo.dom.getAncestorsByTag(_29,tag,true);
+};
+dojo.dom.isDescendantOf=function(_2b,_2c,_2d){
+if(_2d&&_2b){
+_2b=_2b.parentNode;
+}
+while(_2b){
+if(_2b==_2c){
+return true;
+}
+_2b=_2b.parentNode;
+}
+return false;
+};
+dojo.dom.innerXML=function(_2e){
+if(_2e.innerXML){
+return _2e.innerXML;
+}else{
+if(_2e.xml){
+return _2e.xml;
+}else{
+if(typeof XMLSerializer!="undefined"){
+return (new XMLSerializer()).serializeToString(_2e);
+}
+}
+}
+};
+dojo.dom.createDocument=function(){
+var doc=null;
+var _30=dojo.doc();
+if(!dj_undef("ActiveXObject")){
+var _31=["MSXML2","Microsoft","MSXML","MSXML3"];
+for(var i=0;i<_31.length;i++){
+try{
+doc=new ActiveXObject(_31[i]+".XMLDOM");
+}
+catch(e){
+}
+if(doc){
+break;
+}
+}
+}else{
+if((_30.implementation)&&(_30.implementation.createDocument)){
+doc=_30.implementation.createDocument("","",null);
+}
+}
+return doc;
+};
+dojo.dom.createDocumentFromText=function(str,_34){
+if(!_34){
+_34="text/xml";
+}
+if(!dj_undef("DOMParser")){
+var _35=new DOMParser();
+return _35.parseFromString(str,_34);
+}else{
+if(!dj_undef("ActiveXObject")){
+var _36=dojo.dom.createDocument();
+if(_36){
+_36.async=false;
+_36.loadXML(str);
+return _36;
+}else{
+dojo.debug("toXml didn't work?");
+}
+}else{
+var _37=dojo.doc();
+if(_37.createElement){
+var tmp=_37.createElement("xml");
+tmp.innerHTML=str;
+if(_37.implementation&&_37.implementation.createDocument){
+var _39=_37.implementation.createDocument("foo","",null);
+for(var i=0;i<tmp.childNodes.length;i++){
+_39.importNode(tmp.childNodes.item(i),true);
+}
+return _39;
+}
+return ((tmp.document)&&(tmp.document.firstChild?tmp.document.firstChild:tmp));
+}
+}
+}
+return null;
+};
+dojo.dom.prependChild=function(_3b,_3c){
+if(_3c.firstChild){
+_3c.insertBefore(_3b,_3c.firstChild);
+}else{
+_3c.appendChild(_3b);
+}
+return true;
+};
+dojo.dom.insertBefore=function(_3d,ref,_3f){
+if((_3f!=true)&&(_3d===ref||_3d.nextSibling===ref)){
+return false;
+}
+var _40=ref.parentNode;
+_40.insertBefore(_3d,ref);
+return true;
+};
+dojo.dom.insertAfter=function(_41,ref,_43){
+var pn=ref.parentNode;
+if(ref==pn.lastChild){
+if((_43!=true)&&(_41===ref)){
+return false;
+}
+pn.appendChild(_41);
+}else{
+return this.insertBefore(_41,ref.nextSibling,_43);
+}
+return true;
+};
+dojo.dom.insertAtPosition=function(_45,ref,_47){
+if((!_45)||(!ref)||(!_47)){
+return false;
+}
+switch(_47.toLowerCase()){
+case "before":
+return dojo.dom.insertBefore(_45,ref);
+case "after":
+return dojo.dom.insertAfter(_45,ref);
+case "first":
+if(ref.firstChild){
+return dojo.dom.insertBefore(_45,ref.firstChild);
+}else{
+ref.appendChild(_45);
+return true;
+}
+break;
+default:
+ref.appendChild(_45);
+return true;
+}
+};
+dojo.dom.insertAtIndex=function(_48,_49,_4a){
+var _4b=_49.childNodes;
+if(!_4b.length||_4b.length==_4a){
+_49.appendChild(_48);
+return true;
+}
+if(_4a==0){
+return dojo.dom.prependChild(_48,_49);
+}
+return dojo.dom.insertAfter(_48,_4b[_4a-1]);
+};
+dojo.dom.textContent=function(_4c,_4d){
+if(arguments.length>1){
+var _4e=dojo.doc();
+dojo.dom.replaceChildren(_4c,_4e.createTextNode(_4d));
+return _4d;
+}else{
+if(_4c.textContent!=undefined){
+return _4c.textContent;
+}
+var _4f="";
+if(_4c==null){
+return _4f;
+}
+for(var i=0;i<_4c.childNodes.length;i++){
+switch(_4c.childNodes[i].nodeType){
+case 1:
+case 5:
+_4f+=dojo.dom.textContent(_4c.childNodes[i]);
+break;
+case 3:
+case 2:
+case 4:
+_4f+=_4c.childNodes[i].nodeValue;
+break;
+default:
+break;
+}
+}
+return _4f;
+}
+};
+dojo.dom.hasParent=function(_51){
+return Boolean(_51&&_51.parentNode&&dojo.dom.isNode(_51.parentNode));
+};
+dojo.dom.isTag=function(_52){
+if(_52&&_52.tagName){
+for(var i=1;i<arguments.length;i++){
+if(_52.tagName==String(arguments[i])){
+return String(arguments[i]);
+}
+}
+}
+return "";
+};
+dojo.dom.setAttributeNS=function(_54,_55,_56,_57){
+if(_54==null||((_54==undefined)&&(typeof _54=="undefined"))){
+dojo.raise("No element given to dojo.dom.setAttributeNS");
+}
+if(!((_54.setAttributeNS==undefined)&&(typeof _54.setAttributeNS=="undefined"))){
+_54.setAttributeNS(_55,_56,_57);
+}else{
+var _58=_54.ownerDocument;
+var _59=_58.createNode(2,_56,_55);
+_59.nodeValue=_57;
+_54.setAttributeNode(_59);
+}
+};

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/dom.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js?rev=618461&view=auto
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js (added)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/js/dojo-0.4.3-custom-4.1.5/src/event.js Mon Feb  4 14:07:13 2008
@@ -0,0 +1,3 @@
+dojo.provide("dojo.event");
+dojo.require("dojo.event.*");
+dojo.deprecated("dojo.event","replaced by dojo.event.*","0.5");



Mime
View raw message