geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r794787 [6/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/date/common.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/common.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/common.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/common.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,316 @@
+/*
+	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.date.common");
+dojo.date.setDayOfYear = function (dateObject, dayOfYear) {
+	dateObject.setMonth(0);
+	dateObject.setDate(dayOfYear);
+	return dateObject;
+};
+dojo.date.getDayOfYear = function (dateObject) {
+	var fullYear = dateObject.getFullYear();
+	var lastDayOfPrevYear = new Date(fullYear - 1, 11, 31);
+	return Math.floor((dateObject.getTime() - lastDayOfPrevYear.getTime()) / 86400000);
+};
+dojo.date.setWeekOfYear = function (dateObject, week, firstDay) {
+	if (arguments.length == 1) {
+		firstDay = 0;
+	}
+	dojo.unimplemented("dojo.date.setWeekOfYear");
+};
+dojo.date.getWeekOfYear = function (dateObject, firstDay) {
+	if (arguments.length == 1) {
+		firstDay = 0;
+	}
+	var firstDayOfYear = new Date(dateObject.getFullYear(), 0, 1);
+	var day = firstDayOfYear.getDay();
+	firstDayOfYear.setDate(firstDayOfYear.getDate() - day + firstDay - (day > firstDay ? 7 : 0));
+	return Math.floor((dateObject.getTime() - firstDayOfYear.getTime()) / 604800000);
+};
+dojo.date.setIsoWeekOfYear = function (dateObject, week, firstDay) {
+	if (arguments.length == 1) {
+		firstDay = 1;
+	}
+	dojo.unimplemented("dojo.date.setIsoWeekOfYear");
+};
+dojo.date.getIsoWeekOfYear = function (dateObject, firstDay) {
+	if (arguments.length == 1) {
+		firstDay = 1;
+	}
+	dojo.unimplemented("dojo.date.getIsoWeekOfYear");
+};
+dojo.date.shortTimezones = ["IDLW", "BET", "HST", "MART", "AKST", "PST", "MST", "CST", "EST", "AST", "NFT", "BST", "FST", "AT", "GMT", "CET", "EET", "MSK", "IRT", "GST", "AFT", "AGTT", "IST", "NPT", "ALMT", "MMT", "JT", "AWST", "JST", "ACST", "AEST", "LHST", "VUT", "NFT", "NZT", "CHAST", "PHOT", "LINT"];
+dojo.date.timezoneOffsets = [-720, -660, -600, -570, -540, -480, -420, -360, -300, -240, -210, -180, -120, -60, 0, 60, 120, 180, 210, 240, 270, 300, 330, 345, 360, 390, 420, 480, 540, 570, 600, 630, 660, 690, 720, 765, 780, 840];
+dojo.date.getDaysInMonth = function (dateObject) {
+	var month = dateObject.getMonth();
+	var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
+	if (month == 1 && dojo.date.isLeapYear(dateObject)) {
+		return 29;
+	} else {
+		return days[month];
+	}
+};
+dojo.date.isLeapYear = function (dateObject) {
+	var year = dateObject.getFullYear();
+	return (year % 400 == 0) ? true : (year % 100 == 0) ? false : (year % 4 == 0) ? true : false;
+};
+dojo.date.getTimezoneName = function (dateObject) {
+	var str = dateObject.toString();
+	var tz = "";
+	var match;
+	var pos = str.indexOf("(");
+	if (pos > -1) {
+		pos++;
+		tz = str.substring(pos, str.indexOf(")"));
+	} else {
+		var pat = /([A-Z\/]+) \d{4}$/;
+		if ((match = str.match(pat))) {
+			tz = match[1];
+		} else {
+			str = dateObject.toLocaleString();
+			pat = / ([A-Z\/]+)$/;
+			if ((match = str.match(pat))) {
+				tz = match[1];
+			}
+		}
+	}
+	return tz == "AM" || tz == "PM" ? "" : tz;
+};
+dojo.date.getOrdinal = function (dateObject) {
+	var date = dateObject.getDate();
+	if (date % 100 != 11 && date % 10 == 1) {
+		return "st";
+	} else {
+		if (date % 100 != 12 && date % 10 == 2) {
+			return "nd";
+		} else {
+			if (date % 100 != 13 && date % 10 == 3) {
+				return "rd";
+			} else {
+				return "th";
+			}
+		}
+	}
+};
+dojo.date.compareTypes = {DATE:1, TIME:2};
+dojo.date.compare = function (dateA, dateB, options) {
+	var dA = dateA;
+	var dB = dateB || new Date();
+	var now = new Date();
+	with (dojo.date.compareTypes) {
+		var opt = options || (DATE | TIME);
+		var d1 = new Date((opt & DATE) ? dA.getFullYear() : now.getFullYear(), (opt & DATE) ? dA.getMonth() : now.getMonth(), (opt & DATE) ? dA.getDate() : now.getDate(), (opt & TIME) ? dA.getHours() : 0, (opt & TIME) ? dA.getMinutes() : 0, (opt & TIME) ? dA.getSeconds() : 0);
+		var d2 = new Date((opt & DATE) ? dB.getFullYear() : now.getFullYear(), (opt & DATE) ? dB.getMonth() : now.getMonth(), (opt & DATE) ? dB.getDate() : now.getDate(), (opt & TIME) ? dB.getHours() : 0, (opt & TIME) ? dB.getMinutes() : 0, (opt & TIME) ? dB.getSeconds() : 0);
+	}
+	if (d1.valueOf() > d2.valueOf()) {
+		return 1;
+	}
+	if (d1.valueOf() < d2.valueOf()) {
+		return -1;
+	}
+	return 0;
+};
+dojo.date.dateParts = {YEAR:0, MONTH:1, DAY:2, HOUR:3, MINUTE:4, SECOND:5, MILLISECOND:6, QUARTER:7, WEEK:8, WEEKDAY:9};
+dojo.date.add = function (dt, interv, incr) {
+	if (typeof dt == "number") {
+		dt = new Date(dt);
+	}
+	function fixOvershoot() {
+		if (sum.getDate() < dt.getDate()) {
+			sum.setDate(0);
+		}
+	}
+	var sum = new Date(dt);
+	with (dojo.date.dateParts) {
+		switch (interv) {
+		  case YEAR:
+			sum.setFullYear(dt.getFullYear() + incr);
+			fixOvershoot();
+			break;
+		  case QUARTER:
+			incr *= 3;
+		  case MONTH:
+			sum.setMonth(dt.getMonth() + incr);
+			fixOvershoot();
+			break;
+		  case WEEK:
+			incr *= 7;
+		  case DAY:
+			sum.setDate(dt.getDate() + incr);
+			break;
+		  case WEEKDAY:
+			var dat = dt.getDate();
+			var weeks = 0;
+			var days = 0;
+			var strt = 0;
+			var trgt = 0;
+			var adj = 0;
+			var mod = incr % 5;
+			if (mod == 0) {
+				days = (incr > 0) ? 5 : -5;
+				weeks = (incr > 0) ? ((incr - 5) / 5) : ((incr + 5) / 5);
+			} else {
+				days = mod;
+				weeks = parseInt(incr / 5);
+			}
+			strt = dt.getDay();
+			if (strt == 6 && incr > 0) {
+				adj = 1;
+			} else {
+				if (strt == 0 && incr < 0) {
+					adj = -1;
+				}
+			}
+			trgt = (strt + days);
+			if (trgt == 0 || trgt == 6) {
+				adj = (incr > 0) ? 2 : -2;
+			}
+			sum.setDate(dat + (7 * weeks) + days + adj);
+			break;
+		  case HOUR:
+			sum.setHours(sum.getHours() + incr);
+			break;
+		  case MINUTE:
+			sum.setMinutes(sum.getMinutes() + incr);
+			break;
+		  case SECOND:
+			sum.setSeconds(sum.getSeconds() + incr);
+			break;
+		  case MILLISECOND:
+			sum.setMilliseconds(sum.getMilliseconds() + incr);
+			break;
+		  default:
+			break;
+		}
+	}
+	return sum;
+};
+dojo.date.diff = function (dtA, dtB, interv) {
+	if (typeof dtA == "number") {
+		dtA = new Date(dtA);
+	}
+	if (typeof dtB == "number") {
+		dtB = new Date(dtB);
+	}
+	var yeaDiff = dtB.getFullYear() - dtA.getFullYear();
+	var monDiff = (dtB.getMonth() - dtA.getMonth()) + (yeaDiff * 12);
+	var msDiff = dtB.getTime() - dtA.getTime();
+	var secDiff = msDiff / 1000;
+	var minDiff = secDiff / 60;
+	var houDiff = minDiff / 60;
+	var dayDiff = houDiff / 24;
+	var weeDiff = dayDiff / 7;
+	var delta = 0;
+	with (dojo.date.dateParts) {
+		switch (interv) {
+		  case YEAR:
+			delta = yeaDiff;
+			break;
+		  case QUARTER:
+			var mA = dtA.getMonth();
+			var mB = dtB.getMonth();
+			var qA = Math.floor(mA / 3) + 1;
+			var qB = Math.floor(mB / 3) + 1;
+			qB += (yeaDiff * 4);
+			delta = qB - qA;
+			break;
+		  case MONTH:
+			delta = monDiff;
+			break;
+		  case WEEK:
+			delta = parseInt(weeDiff);
+			break;
+		  case DAY:
+			delta = dayDiff;
+			break;
+		  case WEEKDAY:
+			var days = Math.round(dayDiff);
+			var weeks = parseInt(days / 7);
+			var mod = days % 7;
+			if (mod == 0) {
+				days = weeks * 5;
+			} else {
+				var adj = 0;
+				var aDay = dtA.getDay();
+				var bDay = dtB.getDay();
+				weeks = parseInt(days / 7);
+				mod = days % 7;
+				var dtMark = new Date(dtA);
+				dtMark.setDate(dtMark.getDate() + (weeks * 7));
+				var dayMark = dtMark.getDay();
+				if (dayDiff > 0) {
+					switch (true) {
+					  case aDay == 6:
+						adj = -1;
+						break;
+					  case aDay == 0:
+						adj = 0;
+						break;
+					  case bDay == 6:
+						adj = -1;
+						break;
+					  case bDay == 0:
+						adj = -2;
+						break;
+					  case (dayMark + mod) > 5:
+						adj = -2;
+						break;
+					  default:
+						break;
+					}
+				} else {
+					if (dayDiff < 0) {
+						switch (true) {
+						  case aDay == 6:
+							adj = 0;
+							break;
+						  case aDay == 0:
+							adj = 1;
+							break;
+						  case bDay == 6:
+							adj = 2;
+							break;
+						  case bDay == 0:
+							adj = 1;
+							break;
+						  case (dayMark + mod) < 0:
+							adj = 2;
+							break;
+						  default:
+							break;
+						}
+					}
+				}
+				days += adj;
+				days -= (weeks * 2);
+			}
+			delta = days;
+			break;
+		  case HOUR:
+			delta = houDiff;
+			break;
+		  case MINUTE:
+			delta = minDiff;
+			break;
+		  case SECOND:
+			delta = secDiff;
+			break;
+		  case MILLISECOND:
+			delta = msDiff;
+			break;
+		  default:
+			break;
+		}
+	}
+	return Math.round(delta);
+};
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/format.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/format.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/format.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/format.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,713 @@
+/*
+	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.date.format");
+dojo.require("dojo.date.common");
+dojo.require("dojo.date.supplemental");
+dojo.require("dojo.lang.array");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.lang.func");
+dojo.require("dojo.string.common");
+dojo.require("dojo.i18n.common");
+dojo.requireLocalization("dojo.i18n.calendar", "gregorian", null, "ko,zh-cn,zh,sv,ja,en,zh-tw,it,hu,nl,fi,zh-hk,fr,pt,ROOT,es,de,pt-br");
+dojo.requireLocalization("dojo.i18n.calendar", "gregorianExtras", null, "zh,ROOT,ja");
+(function () {
+	dojo.date.format = function (dateObject, options) {
+		if (typeof options == "string") {
+			dojo.deprecated("dojo.date.format", "To format dates with POSIX-style strings, please use dojo.date.strftime instead", "0.5");
+			return dojo.date.strftime(dateObject, options);
+		}
+		function formatPattern(dateObject, pattern) {
+			return pattern.replace(/([a-z])\1*/ig, function (match) {
+				var s;
+				var c = match.charAt(0);
+				var l = match.length;
+				var pad;
+				var widthList = ["abbr", "wide", "narrow"];
+				switch (c) {
+				  case "G":
+					if (l > 3) {
+						dojo.unimplemented("Era format not implemented");
+					}
+					s = info.eras[dateObject.getFullYear() < 0 ? 1 : 0];
+					break;
+				  case "y":
+					s = dateObject.getFullYear();
+					switch (l) {
+					  case 1:
+						break;
+					  case 2:
+						s = String(s).substr(-2);
+						break;
+					  default:
+						pad = true;
+					}
+					break;
+				  case "Q":
+				  case "q":
+					s = Math.ceil((dateObject.getMonth() + 1) / 3);
+					switch (l) {
+					  case 1:
+					  case 2:
+						pad = true;
+						break;
+					  case 3:
+					  case 4:
+						dojo.unimplemented("Quarter format not implemented");
+					}
+					break;
+				  case "M":
+				  case "L":
+					var m = dateObject.getMonth();
+					var width;
+					switch (l) {
+					  case 1:
+					  case 2:
+						s = m + 1;
+						pad = true;
+						break;
+					  case 3:
+					  case 4:
+					  case 5:
+						width = widthList[l - 3];
+						break;
+					}
+					if (width) {
+						var type = (c == "L") ? "standalone" : "format";
+						var prop = ["months", type, width].join("-");
+						s = info[prop][m];
+					}
+					break;
+				  case "w":
+					var firstDay = 0;
+					s = dojo.date.getWeekOfYear(dateObject, firstDay);
+					pad = true;
+					break;
+				  case "d":
+					s = dateObject.getDate();
+					pad = true;
+					break;
+				  case "D":
+					s = dojo.date.getDayOfYear(dateObject);
+					pad = true;
+					break;
+				  case "E":
+				  case "e":
+				  case "c":
+					var d = dateObject.getDay();
+					var width;
+					switch (l) {
+					  case 1:
+					  case 2:
+						if (c == "e") {
+							var first = dojo.date.getFirstDayOfWeek(options.locale);
+							d = (d - first + 7) % 7;
+						}
+						if (c != "c") {
+							s = d + 1;
+							pad = true;
+							break;
+						}
+					  case 3:
+					  case 4:
+					  case 5:
+						width = widthList[l - 3];
+						break;
+					}
+					if (width) {
+						var type = (c == "c") ? "standalone" : "format";
+						var prop = ["days", type, width].join("-");
+						s = info[prop][d];
+					}
+					break;
+				  case "a":
+					var timePeriod = (dateObject.getHours() < 12) ? "am" : "pm";
+					s = info[timePeriod];
+					break;
+				  case "h":
+				  case "H":
+				  case "K":
+				  case "k":
+					var h = dateObject.getHours();
+					switch (c) {
+					  case "h":
+						s = (h % 12) || 12;
+						break;
+					  case "H":
+						s = h;
+						break;
+					  case "K":
+						s = (h % 12);
+						break;
+					  case "k":
+						s = h || 24;
+						break;
+					}
+					pad = true;
+					break;
+				  case "m":
+					s = dateObject.getMinutes();
+					pad = true;
+					break;
+				  case "s":
+					s = dateObject.getSeconds();
+					pad = true;
+					break;
+				  case "S":
+					s = Math.round(dateObject.getMilliseconds() * Math.pow(10, l - 3));
+					break;
+				  case "v":
+				  case "z":
+					s = dojo.date.getTimezoneName(dateObject);
+					if (s) {
+						break;
+					}
+					l = 4;
+				  case "Z":
+					var offset = dateObject.getTimezoneOffset();
+					var tz = [(offset <= 0 ? "+" : "-"), dojo.string.pad(Math.floor(Math.abs(offset) / 60), 2), dojo.string.pad(Math.abs(offset) % 60, 2)];
+					if (l == 4) {
+						tz.splice(0, 0, "GMT");
+						tz.splice(3, 0, ":");
+					}
+					s = tz.join("");
+					break;
+				  case "Y":
+				  case "u":
+				  case "W":
+				  case "F":
+				  case "g":
+				  case "A":
+					dojo.debug(match + " modifier not yet implemented");
+					s = "?";
+					break;
+				  default:
+					dojo.raise("dojo.date.format: invalid pattern char: " + pattern);
+				}
+				if (pad) {
+					s = dojo.string.pad(s, l);
+				}
+				return s;
+			});
+		}
+		options = options || {};
+		var locale = dojo.hostenv.normalizeLocale(options.locale);
+		var formatLength = options.formatLength || "full";
+		var info = dojo.date._getGregorianBundle(locale);
+		var str = [];
+		var sauce = dojo.lang.curry(this, formatPattern, dateObject);
+		if (options.selector != "timeOnly") {
+			var datePattern = options.datePattern || info["dateFormat-" + formatLength];
+			if (datePattern) {
+				str.push(_processPattern(datePattern, sauce));
+			}
+		}
+		if (options.selector != "dateOnly") {
+			var timePattern = options.timePattern || info["timeFormat-" + formatLength];
+			if (timePattern) {
+				str.push(_processPattern(timePattern, sauce));
+			}
+		}
+		var result = str.join(" ");
+		return result;
+	};
+	dojo.date.parse = function (value, options) {
+		options = options || {};
+		var locale = dojo.hostenv.normalizeLocale(options.locale);
+		var info = dojo.date._getGregorianBundle(locale);
+		var formatLength = options.formatLength || "full";
+		if (!options.selector) {
+			options.selector = "dateOnly";
+		}
+		var datePattern = options.datePattern || info["dateFormat-" + formatLength];
+		var timePattern = options.timePattern || info["timeFormat-" + formatLength];
+		var pattern;
+		if (options.selector == "dateOnly") {
+			pattern = datePattern;
+		} else {
+			if (options.selector == "timeOnly") {
+				pattern = timePattern;
+			} else {
+				if (options.selector == "dateTime") {
+					pattern = datePattern + " " + timePattern;
+				} else {
+					var msg = "dojo.date.parse: Unknown selector param passed: '" + options.selector + "'.";
+					msg += " Defaulting to date pattern.";
+					dojo.debug(msg);
+					pattern = datePattern;
+				}
+			}
+		}
+		var groups = [];
+		var dateREString = _processPattern(pattern, dojo.lang.curry(this, _buildDateTimeRE, groups, info, options));
+		var dateRE = new RegExp("^" + dateREString + "$");
+		var match = dateRE.exec(value);
+		if (!match) {
+			return null;
+		}
+		var widthList = ["abbr", "wide", "narrow"];
+		var result = new Date(1972, 0);
+		var expected = {};
+		for (var i = 1; i < match.length; i++) {
+			var grp = groups[i - 1];
+			var l = grp.length;
+			var v = match[i];
+			switch (grp.charAt(0)) {
+			  case "y":
+				if (l != 2) {
+					result.setFullYear(v);
+					expected.year = v;
+				} else {
+					if (v < 100) {
+						v = Number(v);
+						var year = "" + new Date().getFullYear();
+						var century = year.substring(0, 2) * 100;
+						var yearPart = Number(year.substring(2, 4));
+						var cutoff = Math.min(yearPart + 20, 99);
+						var num = (v < cutoff) ? century + v : century - 100 + v;
+						result.setFullYear(num);
+						expected.year = num;
+					} else {
+						if (options.strict) {
+							return null;
+						}
+						result.setFullYear(v);
+						expected.year = v;
+					}
+				}
+				break;
+			  case "M":
+				if (l > 2) {
+					if (!options.strict) {
+						v = v.replace(/\./g, "");
+						v = v.toLowerCase();
+					}
+					var months = info["months-format-" + widthList[l - 3]].concat();
+					for (var j = 0; j < months.length; j++) {
+						if (!options.strict) {
+							months[j] = months[j].toLowerCase();
+						}
+						if (v == months[j]) {
+							result.setMonth(j);
+							expected.month = j;
+							break;
+						}
+					}
+					if (j == months.length) {
+						dojo.debug("dojo.date.parse: Could not parse month name: '" + v + "'.");
+						return null;
+					}
+				} else {
+					result.setMonth(v - 1);
+					expected.month = v - 1;
+				}
+				break;
+			  case "E":
+			  case "e":
+				if (!options.strict) {
+					v = v.toLowerCase();
+				}
+				var days = info["days-format-" + widthList[l - 3]].concat();
+				for (var j = 0; j < days.length; j++) {
+					if (!options.strict) {
+						days[j] = days[j].toLowerCase();
+					}
+					if (v == days[j]) {
+						break;
+					}
+				}
+				if (j == days.length) {
+					dojo.debug("dojo.date.parse: Could not parse weekday name: '" + v + "'.");
+					return null;
+				}
+				break;
+			  case "d":
+				result.setDate(v);
+				expected.date = v;
+				break;
+			  case "a":
+				var am = options.am || info.am;
+				var pm = options.pm || info.pm;
+				if (!options.strict) {
+					v = v.replace(/\./g, "").toLowerCase();
+					am = am.replace(/\./g, "").toLowerCase();
+					pm = pm.replace(/\./g, "").toLowerCase();
+				}
+				if (options.strict && v != am && v != pm) {
+					dojo.debug("dojo.date.parse: Could not parse am/pm part.");
+					return null;
+				}
+				var hours = result.getHours();
+				if (v == pm && hours < 12) {
+					result.setHours(hours + 12);
+				} else {
+					if (v == am && hours == 12) {
+						result.setHours(0);
+					}
+				}
+				break;
+			  case "K":
+				if (v == 24) {
+					v = 0;
+				}
+			  case "h":
+			  case "H":
+			  case "k":
+				if (v > 23) {
+					dojo.debug("dojo.date.parse: Illegal hours value");
+					return null;
+				}
+				result.setHours(v);
+				break;
+			  case "m":
+				result.setMinutes(v);
+				break;
+			  case "s":
+				result.setSeconds(v);
+				break;
+			  case "S":
+				result.setMilliseconds(v);
+				break;
+			  default:
+				dojo.unimplemented("dojo.date.parse: unsupported pattern char=" + grp.charAt(0));
+			}
+		}
+		if (expected.year && result.getFullYear() != expected.year) {
+			dojo.debug("Parsed year: '" + result.getFullYear() + "' did not match input year: '" + expected.year + "'.");
+			return null;
+		}
+		if (expected.month && result.getMonth() != expected.month) {
+			dojo.debug("Parsed month: '" + result.getMonth() + "' did not match input month: '" + expected.month + "'.");
+			return null;
+		}
+		if (expected.date && result.getDate() != expected.date) {
+			dojo.debug("Parsed day of month: '" + result.getDate() + "' did not match input day of month: '" + expected.date + "'.");
+			return null;
+		}
+		return result;
+	};
+	function _processPattern(pattern, applyPattern, applyLiteral, applyAll) {
+		var identity = function (x) {
+			return x;
+		};
+		applyPattern = applyPattern || identity;
+		applyLiteral = applyLiteral || identity;
+		applyAll = applyAll || identity;
+		var chunks = pattern.match(/(''|[^'])+/g);
+		var literal = false;
+		for (var i = 0; i < chunks.length; i++) {
+			if (!chunks[i]) {
+				chunks[i] = "";
+			} else {
+				chunks[i] = (literal ? applyLiteral : applyPattern)(chunks[i]);
+				literal = !literal;
+			}
+		}
+		return applyAll(chunks.join(""));
+	}
+	function _buildDateTimeRE(groups, info, options, pattern) {
+		return pattern.replace(/([a-z])\1*/ig, function (match) {
+			var s;
+			var c = match.charAt(0);
+			var l = match.length;
+			switch (c) {
+			  case "y":
+				s = "\\d" + ((l == 2) ? "{2,4}" : "+");
+				break;
+			  case "M":
+				s = (l > 2) ? "\\S+" : "\\d{1,2}";
+				break;
+			  case "d":
+				s = "\\d{1,2}";
+				break;
+			  case "E":
+				s = "\\S+";
+				break;
+			  case "h":
+			  case "H":
+			  case "K":
+			  case "k":
+				s = "\\d{1,2}";
+				break;
+			  case "m":
+			  case "s":
+				s = "[0-5]\\d";
+				break;
+			  case "S":
+				s = "\\d{1,3}";
+				break;
+			  case "a":
+				var am = options.am || info.am || "AM";
+				var pm = options.pm || info.pm || "PM";
+				if (options.strict) {
+					s = am + "|" + pm;
+				} else {
+					s = am;
+					s += (am != am.toLowerCase()) ? "|" + am.toLowerCase() : "";
+					s += "|";
+					s += (pm != pm.toLowerCase()) ? pm + "|" + pm.toLowerCase() : pm;
+				}
+				break;
+			  default:
+				dojo.unimplemented("parse of date format, pattern=" + pattern);
+			}
+			if (groups) {
+				groups.push(match);
+			}
+			return "\\s*(" + s + ")\\s*";
+		});
+	}
+})();
+dojo.date.strftime = function (dateObject, format, locale) {
+	var padChar = null;
+	function _(s, n) {
+		return dojo.string.pad(s, n || 2, padChar || "0");
+	}
+	var info = dojo.date._getGregorianBundle(locale);
+	function $(property) {
+		switch (property) {
+		  case "a":
+			return dojo.date.getDayShortName(dateObject, locale);
+		  case "A":
+			return dojo.date.getDayName(dateObject, locale);
+		  case "b":
+		  case "h":
+			return dojo.date.getMonthShortName(dateObject, locale);
+		  case "B":
+			return dojo.date.getMonthName(dateObject, locale);
+		  case "c":
+			return dojo.date.format(dateObject, {locale:locale});
+		  case "C":
+			return _(Math.floor(dateObject.getFullYear() / 100));
+		  case "d":
+			return _(dateObject.getDate());
+		  case "D":
+			return $("m") + "/" + $("d") + "/" + $("y");
+		  case "e":
+			if (padChar == null) {
+				padChar = " ";
+			}
+			return _(dateObject.getDate());
+		  case "f":
+			if (padChar == null) {
+				padChar = " ";
+			}
+			return _(dateObject.getMonth() + 1);
+		  case "g":
+			break;
+		  case "G":
+			dojo.unimplemented("unimplemented modifier 'G'");
+			break;
+		  case "F":
+			return $("Y") + "-" + $("m") + "-" + $("d");
+		  case "H":
+			return _(dateObject.getHours());
+		  case "I":
+			return _(dateObject.getHours() % 12 || 12);
+		  case "j":
+			return _(dojo.date.getDayOfYear(dateObject), 3);
+		  case "k":
+			if (padChar == null) {
+				padChar = " ";
+			}
+			return _(dateObject.getHours());
+		  case "l":
+			if (padChar == null) {
+				padChar = " ";
+			}
+			return _(dateObject.getHours() % 12 || 12);
+		  case "m":
+			return _(dateObject.getMonth() + 1);
+		  case "M":
+			return _(dateObject.getMinutes());
+		  case "n":
+			return "\n";
+		  case "p":
+			return info[dateObject.getHours() < 12 ? "am" : "pm"];
+		  case "r":
+			return $("I") + ":" + $("M") + ":" + $("S") + " " + $("p");
+		  case "R":
+			return $("H") + ":" + $("M");
+		  case "S":
+			return _(dateObject.getSeconds());
+		  case "t":
+			return "\t";
+		  case "T":
+			return $("H") + ":" + $("M") + ":" + $("S");
+		  case "u":
+			return String(dateObject.getDay() || 7);
+		  case "U":
+			return _(dojo.date.getWeekOfYear(dateObject));
+		  case "V":
+			return _(dojo.date.getIsoWeekOfYear(dateObject));
+		  case "W":
+			return _(dojo.date.getWeekOfYear(dateObject, 1));
+		  case "w":
+			return String(dateObject.getDay());
+		  case "x":
+			return dojo.date.format(dateObject, {selector:"dateOnly", locale:locale});
+		  case "X":
+			return dojo.date.format(dateObject, {selector:"timeOnly", locale:locale});
+		  case "y":
+			return _(dateObject.getFullYear() % 100);
+		  case "Y":
+			return String(dateObject.getFullYear());
+		  case "z":
+			var timezoneOffset = dateObject.getTimezoneOffset();
+			return (timezoneOffset > 0 ? "-" : "+") + _(Math.floor(Math.abs(timezoneOffset) / 60)) + ":" + _(Math.abs(timezoneOffset) % 60);
+		  case "Z":
+			return dojo.date.getTimezoneName(dateObject);
+		  case "%":
+			return "%";
+		}
+	}
+	var string = "";
+	var i = 0;
+	var index = 0;
+	var switchCase = null;
+	while ((index = format.indexOf("%", i)) != -1) {
+		string += format.substring(i, index++);
+		switch (format.charAt(index++)) {
+		  case "_":
+			padChar = " ";
+			break;
+		  case "-":
+			padChar = "";
+			break;
+		  case "0":
+			padChar = "0";
+			break;
+		  case "^":
+			switchCase = "upper";
+			break;
+		  case "*":
+			switchCase = "lower";
+			break;
+		  case "#":
+			switchCase = "swap";
+			break;
+		  default:
+			padChar = null;
+			index--;
+			break;
+		}
+		var property = $(format.charAt(index++));
+		switch (switchCase) {
+		  case "upper":
+			property = property.toUpperCase();
+			break;
+		  case "lower":
+			property = property.toLowerCase();
+			break;
+		  case "swap":
+			var compareString = property.toLowerCase();
+			var swapString = "";
+			var j = 0;
+			var ch = "";
+			while (j < property.length) {
+				ch = property.charAt(j);
+				swapString += (ch == compareString.charAt(j)) ? ch.toUpperCase() : ch.toLowerCase();
+				j++;
+			}
+			property = swapString;
+			break;
+		  default:
+			break;
+		}
+		switchCase = null;
+		string += property;
+		i = index;
+	}
+	string += format.substring(i);
+	return string;
+};
+(function () {
+	var _customFormats = [];
+	dojo.date.addCustomFormats = function (packageName, bundleName) {
+		_customFormats.push({pkg:packageName, name:bundleName});
+	};
+	dojo.date._getGregorianBundle = function (locale) {
+		var gregorian = {};
+		dojo.lang.forEach(_customFormats, function (desc) {
+			var bundle = dojo.i18n.getLocalization(desc.pkg, desc.name, locale);
+			gregorian = dojo.lang.mixin(gregorian, bundle);
+		}, this);
+		return gregorian;
+	};
+})();
+dojo.date.addCustomFormats("dojo.i18n.calendar", "gregorian");
+dojo.date.addCustomFormats("dojo.i18n.calendar", "gregorianExtras");
+dojo.date.getNames = function (item, type, use, locale) {
+	var label;
+	var lookup = dojo.date._getGregorianBundle(locale);
+	var props = [item, use, type];
+	if (use == "standAlone") {
+		label = lookup[props.join("-")];
+	}
+	props[1] = "format";
+	return (label || lookup[props.join("-")]).concat();
+};
+dojo.date.getDayName = function (dateObject, locale) {
+	return dojo.date.getNames("days", "wide", "format", locale)[dateObject.getDay()];
+};
+dojo.date.getDayShortName = function (dateObject, locale) {
+	return dojo.date.getNames("days", "abbr", "format", locale)[dateObject.getDay()];
+};
+dojo.date.getMonthName = function (dateObject, locale) {
+	return dojo.date.getNames("months", "wide", "format", locale)[dateObject.getMonth()];
+};
+dojo.date.getMonthShortName = function (dateObject, locale) {
+	return dojo.date.getNames("months", "abbr", "format", locale)[dateObject.getMonth()];
+};
+dojo.date.toRelativeString = function (dateObject) {
+	var now = new Date();
+	var diff = (now - dateObject) / 1000;
+	var end = " ago";
+	var future = false;
+	if (diff < 0) {
+		future = true;
+		end = " from now";
+		diff = -diff;
+	}
+	if (diff < 60) {
+		diff = Math.round(diff);
+		return diff + " second" + (diff == 1 ? "" : "s") + end;
+	}
+	if (diff < 60 * 60) {
+		diff = Math.round(diff / 60);
+		return diff + " minute" + (diff == 1 ? "" : "s") + end;
+	}
+	if (diff < 60 * 60 * 24) {
+		diff = Math.round(diff / 3600);
+		return diff + " hour" + (diff == 1 ? "" : "s") + end;
+	}
+	if (diff < 60 * 60 * 24 * 7) {
+		diff = Math.round(diff / (3600 * 24));
+		if (diff == 1) {
+			return future ? "Tomorrow" : "Yesterday";
+		} else {
+			return diff + " days" + end;
+		}
+	}
+	return dojo.date.format(dateObject);
+};
+dojo.date.toSql = function (dateObject, noTime) {
+	return dojo.date.strftime(dateObject, "%F" + !noTime ? " %T" : "");
+};
+dojo.date.fromSql = function (sqlDate) {
+	var parts = sqlDate.split(/[\- :]/g);
+	while (parts.length < 6) {
+		parts.push(0);
+	}
+	return new Date(parts[0], (parseInt(parts[1], 10) - 1), parts[2], parts[3], parts[4], parts[5]);
+};
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/serialize.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/serialize.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/serialize.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/serialize.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,129 @@
+/*
+	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.date.serialize");
+dojo.require("dojo.string.common");
+dojo.date.setIso8601 = function (dateObject, formattedString) {
+	var comps = (formattedString.indexOf("T") == -1) ? formattedString.split(" ") : formattedString.split("T");
+	dateObject = dojo.date.setIso8601Date(dateObject, comps[0]);
+	if (comps.length == 2) {
+		dateObject = dojo.date.setIso8601Time(dateObject, comps[1]);
+	}
+	return dateObject;
+};
+dojo.date.fromIso8601 = function (formattedString) {
+	return dojo.date.setIso8601(new Date(0, 0), formattedString);
+};
+dojo.date.setIso8601Date = function (dateObject, formattedString) {
+	var regexp = "^([0-9]{4})((-?([0-9]{2})(-?([0-9]{2}))?)|" + "(-?([0-9]{3}))|(-?W([0-9]{2})(-?([1-7]))?))?$";
+	var d = formattedString.match(new RegExp(regexp));
+	if (!d) {
+		dojo.debug("invalid date string: " + formattedString);
+		return null;
+	}
+	var year = d[1];
+	var month = d[4];
+	var date = d[6];
+	var dayofyear = d[8];
+	var week = d[10];
+	var dayofweek = d[12] ? d[12] : 1;
+	dateObject.setFullYear(year);
+	if (dayofyear) {
+		dateObject.setMonth(0);
+		dateObject.setDate(Number(dayofyear));
+	} else {
+		if (week) {
+			dateObject.setMonth(0);
+			dateObject.setDate(1);
+			var gd = dateObject.getDay();
+			var day = gd ? gd : 7;
+			var offset = Number(dayofweek) + (7 * Number(week));
+			if (day <= 4) {
+				dateObject.setDate(offset + 1 - day);
+			} else {
+				dateObject.setDate(offset + 8 - day);
+			}
+		} else {
+			if (month) {
+				dateObject.setDate(1);
+				dateObject.setMonth(month - 1);
+			}
+			if (date) {
+				dateObject.setDate(date);
+			}
+		}
+	}
+	return dateObject;
+};
+dojo.date.fromIso8601Date = function (formattedString) {
+	return dojo.date.setIso8601Date(new Date(0, 0), formattedString);
+};
+dojo.date.setIso8601Time = function (dateObject, formattedString) {
+	var timezone = "Z|(([-+])([0-9]{2})(:?([0-9]{2}))?)$";
+	var d = formattedString.match(new RegExp(timezone));
+	var offset = 0;
+	if (d) {
+		if (d[0] != "Z") {
+			offset = (Number(d[3]) * 60) + Number(d[5]);
+			offset *= ((d[2] == "-") ? 1 : -1);
+		}
+		offset -= dateObject.getTimezoneOffset();
+		formattedString = formattedString.substr(0, formattedString.length - d[0].length);
+	}
+	var regexp = "^([0-9]{2})(:?([0-9]{2})(:?([0-9]{2})(.([0-9]+))?)?)?$";
+	d = formattedString.match(new RegExp(regexp));
+	if (!d) {
+		dojo.debug("invalid time string: " + formattedString);
+		return null;
+	}
+	var hours = d[1];
+	var mins = Number((d[3]) ? d[3] : 0);
+	var secs = (d[5]) ? d[5] : 0;
+	var ms = d[7] ? (Number("0." + d[7]) * 1000) : 0;
+	dateObject.setHours(hours);
+	dateObject.setMinutes(mins);
+	dateObject.setSeconds(secs);
+	dateObject.setMilliseconds(ms);
+	if (offset !== 0) {
+		dateObject.setTime(dateObject.getTime() + offset * 60000);
+	}
+	return dateObject;
+};
+dojo.date.fromIso8601Time = function (formattedString) {
+	return dojo.date.setIso8601Time(new Date(0, 0), formattedString);
+};
+dojo.date.toRfc3339 = function (dateObject, selector) {
+	if (!dateObject) {
+		dateObject = new Date();
+	}
+	var _ = dojo.string.pad;
+	var formattedDate = [];
+	if (selector != "timeOnly") {
+		var date = [_(dateObject.getFullYear(), 4), _(dateObject.getMonth() + 1, 2), _(dateObject.getDate(), 2)].join("-");
+		formattedDate.push(date);
+	}
+	if (selector != "dateOnly") {
+		var time = [_(dateObject.getHours(), 2), _(dateObject.getMinutes(), 2), _(dateObject.getSeconds(), 2)].join(":");
+		var timezoneOffset = dateObject.getTimezoneOffset();
+		time += (timezoneOffset > 0 ? "-" : "+") + _(Math.floor(Math.abs(timezoneOffset) / 60), 2) + ":" + _(Math.abs(timezoneOffset) % 60, 2);
+		formattedDate.push(time);
+	}
+	return formattedDate.join("T");
+};
+dojo.date.fromRfc3339 = function (rfcDate) {
+	if (rfcDate.indexOf("Tany") != -1) {
+		rfcDate = rfcDate.replace("Tany", "");
+	}
+	var dateObject = new Date();
+	return dojo.date.setIso8601(dateObject, rfcDate);
+};
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/supplemental.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/supplemental.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/supplemental.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/date/supplemental.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,47 @@
+/*
+	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.date.supplemental");
+dojo.date.getFirstDayOfWeek = function (locale) {
+	var firstDay = {mv:5, ae:6, af:6, bh:6, dj:6, dz:6, eg:6, er:6, et:6, iq:6, ir:6, jo:6, ke:6, kw:6, lb:6, ly:6, ma:6, om:6, qa:6, sa:6, sd:6, so:6, tn:6, ye:6, as:0, au:0, az:0, bw:0, ca:0, cn:0, fo:0, ge:0, gl:0, gu:0, hk:0, ie:0, il:0, is:0, jm:0, jp:0, kg:0, kr:0, la:0, mh:0, mo:0, mp:0, mt:0, nz:0, ph:0, pk:0, sg:0, th:0, tt:0, tw:0, um:0, us:0, uz:0, vi:0, za:0, zw:0, et:0, mw:0, ng:0, tj:0, gb:0, sy:4};
+	locale = dojo.hostenv.normalizeLocale(locale);
+	var country = locale.split("-")[1];
+	var dow = firstDay[country];
+	return (typeof dow == "undefined") ? 1 : dow;
+};
+dojo.date.getWeekend = function (locale) {
+	var weekendStart = {eg:5, il:5, sy:5, "in":0, ae:4, bh:4, dz:4, iq:4, jo:4, kw:4, lb:4, ly:4, ma:4, om:4, qa:4, sa:4, sd:4, tn:4, ye:4};
+	var weekendEnd = {ae:5, bh:5, dz:5, iq:5, jo:5, kw:5, lb:5, ly:5, ma:5, om:5, qa:5, sa:5, sd:5, tn:5, ye:5, af:5, ir:5, eg:6, il:6, sy:6};
+	locale = dojo.hostenv.normalizeLocale(locale);
+	var country = locale.split("-")[1];
+	var start = weekendStart[country];
+	var end = weekendEnd[country];
+	if (typeof start == "undefined") {
+		start = 6;
+	}
+	if (typeof end == "undefined") {
+		end = 0;
+	}
+	return {start:start, end:end};
+};
+dojo.date.isWeekend = function (dateObj, locale) {
+	var weekend = dojo.date.getWeekend(locale);
+	var day = (dateObj || new Date()).getDay();
+	if (weekend.end < weekend.start) {
+		weekend.end += 7;
+		if (day < weekend.start) {
+			day += 7;
+		}
+	}
+	return day >= weekend.start && day <= weekend.end;
+};
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,85 @@
+/*
+	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.debug");
+dojo.debug = function () {
+	if (!djConfig.isDebug) {
+		return;
+	}
+	var args = arguments;
+	if (dj_undef("println", dojo.hostenv)) {
+		dojo.raise("dojo.debug not available (yet?)");
+	}
+	var isJUM = dj_global["jum"] && !dj_global["jum"].isBrowser;
+	var s = [(isJUM ? "" : "DEBUG: ")];
+	for (var i = 0; i < args.length; ++i) {
+		if (!false && args[i] && args[i] instanceof Error) {
+			var msg = "[" + args[i].name + ": " + dojo.errorToString(args[i]) + (args[i].fileName ? ", file: " + args[i].fileName : "") + (args[i].lineNumber ? ", line: " + args[i].lineNumber : "") + "]";
+		} else {
+			try {
+				var msg = String(args[i]);
+			}
+			catch (e) {
+				if (dojo.render.html.ie) {
+					var msg = "[ActiveXObject]";
+				} else {
+					var msg = "[unknown]";
+				}
+			}
+		}
+		s.push(msg);
+	}
+	dojo.hostenv.println(s.join(" "));
+};
+dojo.debugShallow = function (obj) {
+	if (!djConfig.isDebug) {
+		return;
+	}
+	dojo.debug("------------------------------------------------------------");
+	dojo.debug("Object: " + obj);
+	var props = [];
+	for (var prop in obj) {
+		try {
+			props.push(prop + ": " + obj[prop]);
+		}
+		catch (E) {
+			props.push(prop + ": ERROR - " + E.message);
+		}
+	}
+	props.sort();
+	for (var i = 0; i < props.length; i++) {
+		dojo.debug(props[i]);
+	}
+	dojo.debug("------------------------------------------------------------");
+};
+dojo.debugDeep = function (obj) {
+	if (!djConfig.isDebug) {
+		return;
+	}
+	if (!dojo.uri || !dojo.uri.dojoUri) {
+		return dojo.debug("You'll need to load dojo.uri.* for deep debugging - sorry!");
+	}
+	if (!window.open) {
+		return dojo.debug("Deep debugging is only supported in host environments with window.open");
+	}
+	var idx = dojo.debugDeep.debugVars.length;
+	dojo.debugDeep.debugVars.push(obj);
+	var url = (djConfig["dojoDebugDeepHtmlUrl"] || new dojo.uri.Uri(location, dojo.uri.moduleUri("dojo.debug", "deep.html")).toString()) + "?var=" + idx;
+	var win = window.open(url, "_blank", "width=600, height=400, resizable=yes, scrollbars=yes, status=yes");
+	try {
+		win.debugVar = obj;
+	}
+	catch (e) {
+	}
+};
+dojo.debugDeep.debugVars = [];
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/Firebug.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/Firebug.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/Firebug.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/Firebug.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,57 @@
+/*
+	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.debug.Firebug");
+dojo.deprecated("dojo.debug.Firebug is slated for removal in 0.5; use dojo.debug.console instead.", "0.5");
+if (dojo.render.html.moz) {
+	if (console && console.log) {
+		var consoleLog = function () {
+			if (!djConfig.isDebug) {
+				return;
+			}
+			var args = dojo.lang.toArray(arguments);
+			args.splice(0, 0, "DEBUG: ");
+			console.log.apply(console, args);
+		};
+		dojo.debug = consoleLog;
+		dojo.debugDeep = consoleLog;
+		dojo.debugShallow = function (obj) {
+			if (!djConfig.isDebug) {
+				return;
+			}
+			if (dojo.lang.isArray(obj)) {
+				console.log("Array: ", obj);
+				for (var i = 0; x < obj.length; i++) {
+					console.log("	", "[" + i + "]", obj[i]);
+				}
+			} else {
+				console.log("Object: ", obj);
+				var propNames = [];
+				for (var prop in obj) {
+					propNames.push(prop);
+				}
+				propNames.sort();
+				dojo.lang.forEach(propNames, function (prop) {
+					try {
+						console.log("	", prop, obj[prop]);
+					}
+					catch (e) {
+						console.log("	", prop, "ERROR", e.message, e);
+					}
+				});
+			}
+		};
+	} else {
+		dojo.debug("dojo.debug.Firebug requires Firebug > 0.4");
+	}
+}
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/console.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/console.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/console.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/console.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,97 @@
+/*
+	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.debug.console");
+dojo.require("dojo.logging.ConsoleLogger");
+if (window.console) {
+	if (console.info != null) {
+		dojo.hostenv.println = function () {
+			if (!djConfig.isDebug) {
+				return;
+			}
+			console.info.apply(console, arguments);
+		};
+		dojo.debug = dojo.hostenv.println;
+		dojo.debugDeep = dojo.debug;
+		dojo.debugShallow = function (obj, showMethods, sort) {
+			if (!djConfig.isDebug) {
+				return;
+			}
+			showMethods = (showMethods != false);
+			sort = (sort != false);
+			if (obj == null || obj.constructor == null) {
+				return dojo.debug(obj);
+			}
+			var type = obj.declaredClass;
+			if (type == null) {
+				type = obj.constructor.toString().match(/function\s*(.*)\(/);
+				if (type) {
+					type = type[1];
+				}
+			}
+			if (type) {
+				if (type == "String" || type == "Number") {
+					return dojo.debug(type + ": ", obj);
+				}
+				if (showMethods && !sort) {
+					var sortedObj = obj;
+				} else {
+					var propNames = [];
+					if (showMethods) {
+						for (var prop in obj) {
+							propNames.push(prop);
+						}
+					} else {
+						for (var prop in obj) {
+							if (typeof obj[prop] != "function") {
+								propNames.push(prop);
+							} else {
+								dojo.debug(prop);
+							}
+						}
+					}
+					if (sort) {
+						propNames.sort();
+					}
+					var sortedObj = {};
+					dojo.lang.forEach(propNames, function (prop) {
+						sortedObj[prop] = obj[prop];
+					});
+				}
+				return dojo.debug(type + ": %o\n%2.o", obj, sortedObj);
+			}
+			return dojo.debug(obj.constructor + ": ", obj);
+		};
+	} else {
+		if (console.log != null) {
+			dojo.hostenv.println = function () {
+				if (!djConfig.isDebug) {
+					return;
+				}
+				var args = dojo.lang.toArray(arguments);
+				console.log("DEBUG: " + args.join(" "));
+			};
+			dojo.debug = dojo.hostenv.println;
+		} else {
+			dojo.debug("dojo.debug.console requires Firebug > 0.4");
+		}
+	}
+} else {
+	if (dojo.render.html.opera) {
+		if (opera && opera.postError) {
+			dojo.hostenv.println = opera.postError;
+		} else {
+			dojo.debug("dojo.debug.Opera requires Opera > 8.0");
+		}
+	}
+}
+

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

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

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

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

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/deep.html
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/debug/deep.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/DragAndDrop.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/DragAndDrop.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/DragAndDrop.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/DragAndDrop.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,76 @@
+/*
+	Copyright (c) 2004-2006, The Dojo Foundation
+	All Rights Reserved.
+
+	Licensed under the Academic Free License version 2.1 or above OR the
+	modified BSD license. For more information on Dojo licensing, see:
+
+		http://dojotoolkit.org/community/licensing.shtml
+*/
+
+
+
+dojo.require("dojo.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 (evt) {
+}, onDragStart:function (evt) {
+}, onSelected:function (evt) {
+}, 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 (evt) {
+}, onDragMove:function (evt) {
+}, onDragOver:function (evt) {
+}, onDragOut:function (evt) {
+}, onDragEnd:function (evt) {
+}, 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 (type) {
+	if (!dojo.lang.inArray(this.acceptedTypes, "*")) {
+		if (!dojo.lang.inArray(this.acceptedTypes, type)) {
+			return false;
+		}
+	}
+	return true;
+}, accepts:function (dragObjects) {
+	if (!dojo.lang.inArray(this.acceptedTypes, "*")) {
+		for (var i = 0; i < dragObjects.length; i++) {
+			if (!dojo.lang.inArray(this.acceptedTypes, dragObjects[i].type)) {
+				return false;
+			}
+		}
+	}
+	return true;
+}, unregister:function () {
+	dojo.dnd.dragManager.unregisterDropTarget(this);
+}, onDragOver:function (evt) {
+}, onDragOut:function (evt) {
+}, onDragMove:function (evt) {
+}, 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 (source) {
+}, dropTargets:[], registerDropTarget:function (target) {
+}, lastDragTarget:null, currentDragTarget:null, onKeyDown:function () {
+}, onMouseOut:function () {
+}, onMouseMove:function () {
+}, onMouseUp:function () {
+}});
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragAndDrop.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragAndDrop.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragAndDrop.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragAndDrop.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,369 @@
+/*
+	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.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 dragObj = new dojo.dnd.HtmlDragObject(this.dragObject, this.type);
+	if (this.dragClass) {
+		dragObj.dragClass = this.dragClass;
+	}
+	if (this.constrainToContainer) {
+		dragObj.constrainTo(this.constrainingContainer || this.domNode.parentNode);
+	}
+	return dragObj;
+}, setDragHandle:function (node) {
+	node = dojo.byId(node);
+	dojo.dnd.dragManager.unregisterDragSource(this);
+	this.domNode = node;
+	dojo.dnd.dragManager.registerDragSource(this);
+}, setDragTarget:function (node) {
+	this.dragObject = node;
+}, constrainTo:function (container) {
+	this.constrainToContainer = true;
+	if (container) {
+		this.constrainingContainer = container;
+	}
+}, 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 (node, type) {
+	node = dojo.byId(node);
+	this.dragObjects = [];
+	this.constrainToContainer = false;
+	if (node) {
+		this.domNode = node;
+		this.dragObject = node;
+		this.type = (type) || (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 node = this.domNode.cloneNode(true);
+	if (this.dragClass) {
+		dojo.html.addClass(node, this.dragClass);
+	}
+	if (this.opacity < 1) {
+		dojo.html.setOpacity(node, this.opacity);
+	}
+	var ltn = node.tagName.toLowerCase();
+	var isTr = (ltn == "tr");
+	if ((isTr) || (ltn == "tbody")) {
+		var doc = this.domNode.ownerDocument;
+		var table = doc.createElement("table");
+		if (isTr) {
+			var tbody = doc.createElement("tbody");
+			table.appendChild(tbody);
+			tbody.appendChild(node);
+		} else {
+			table.appendChild(node);
+		}
+		var tmpSrcTr = ((isTr) ? this.domNode : this.domNode.firstChild);
+		var tmpDstTr = ((isTr) ? node : node.firstChild);
+		var domTds = tmpSrcTr.childNodes;
+		var cloneTds = tmpDstTr.childNodes;
+		for (var i = 0; i < domTds.length; i++) {
+			if ((cloneTds[i]) && (cloneTds[i].style)) {
+				cloneTds[i].style.width = dojo.html.getContentBox(domTds[i]).width + "px";
+			}
+		}
+		node = table;
+	}
+	if ((dojo.render.html.ie55 || dojo.render.html.ie60) && this.createIframe) {
+		with (node.style) {
+			top = "0px";
+			left = "0px";
+		}
+		var outer = document.createElement("div");
+		outer.appendChild(node);
+		this.bgIframe = new dojo.html.BackgroundIframe(outer);
+		outer.appendChild(this.bgIframe.iframe);
+		node = outer;
+	}
+	node.style.zIndex = 999;
+	return node;
+}, 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 viewport = dojo.html.getViewport();
+		var width = viewport.width;
+		var height = viewport.height;
+		var scroll = dojo.html.getScroll().offset;
+		var x = scroll.x;
+		var y = scroll.y;
+	} else {
+		var content = dojo.html.getContentBox(this.constrainingContainer);
+		width = content.width;
+		height = content.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 + width - mb.width, maxY:y + height - mb.height};
+}, updateDragOffset:function () {
+	var scroll = dojo.html.getScroll().offset;
+	if (scroll.y != this.scrollOffset.y) {
+		var diff = scroll.y - this.scrollOffset.y;
+		this.dragOffset.y += diff;
+		this.scrollOffset.y = scroll.y;
+	}
+	if (scroll.x != this.scrollOffset.x) {
+		var diff = scroll.x - this.scrollOffset.x;
+		this.dragOffset.x += diff;
+		this.scrollOffset.x = scroll.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 startCoords = dojo.html.getAbsolutePosition(this.dragClone, true);
+		var endCoords = {left:this.dragStartPosition.x + 1, top:this.dragStartPosition.y + 1};
+		var anim = dojo.lfx.slideTo(this.dragClone, endCoords, 300);
+		var dragObject = this;
+		dojo.event.connect(anim, "onEnd", function (e) {
+			dojo.html.removeNode(dragObject.dragClone);
+			dragObject.dragClone = null;
+		});
+		anim.play();
+		break;
+	}
+	dojo.event.topic.publish("dragEnd", {source:this});
+}, constrainTo:function (container) {
+	this.constrainToContainer = true;
+	if (container) {
+		this.constrainingContainer = container;
+	} else {
+		this.constrainingContainer = this.domNode.parentNode;
+	}
+}}, function (node, type) {
+	this.domNode = dojo.byId(node);
+	this.type = type;
+	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, child; i < this.domNode.childNodes.length; i++) {
+		child = this.domNode.childNodes[i];
+		if (child.nodeType != dojo.html.ELEMENT_NODE) {
+			continue;
+		}
+		var pos = dojo.html.getAbsolutePosition(child, true);
+		var inner = dojo.html.getBorderBox(child);
+		this.childBoxes.push({top:pos.y, bottom:pos.y + inner.height, left:pos.x, right:pos.x + inner.width, height:inner.height, width:inner.width, node:child});
+	}
+	return true;
+}, _getNodeUnderMouse:function (e) {
+	for (var i = 0, child; 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, dragObjects) {
+	var i = this._getNodeUnderMouse(e);
+	if (!this.dropIndicator) {
+		this.createDropIndicator();
+	}
+	var gravity = this.vertical ? dojo.html.gravity.WEST : dojo.html.gravity.NORTH;
+	var hide = false;
+	if (i < 0) {
+		if (this.childBoxes.length) {
+			var before = (dojo.html.gravity(this.childBoxes[0].node, e) & gravity);
+			if (before) {
+				hide = true;
+			}
+		} else {
+			var before = true;
+		}
+	} else {
+		var child = this.childBoxes[i];
+		var before = (dojo.html.gravity(child.node, e) & gravity);
+		if (child.node === dragObjects[0].dragSource.domNode) {
+			hide = true;
+		} else {
+			var currentPosChild = before ? (i > 0 ? this.childBoxes[i - 1] : child) : (i < this.childBoxes.length - 1 ? this.childBoxes[i + 1] : child);
+			if (currentPosChild.node === dragObjects[0].dragSource.domNode) {
+				hide = true;
+			}
+		}
+	}
+	if (hide) {
+		this.dropIndicator.style.display = "none";
+		return;
+	} else {
+		this.dropIndicator.style.display = "";
+	}
+	this.placeIndicator(e, dragObjects, i, before);
+	if (!dojo.html.hasParent(this.dropIndicator)) {
+		dojo.body().appendChild(this.dropIndicator);
+	}
+}, placeIndicator:function (e, dragObjects, boxIndex, before) {
+	var targetProperty = this.vertical ? "left" : "top";
+	var child;
+	if (boxIndex < 0) {
+		if (this.childBoxes.length) {
+			child = before ? this.childBoxes[0] : this.childBoxes[this.childBoxes.length - 1];
+		} else {
+			this.dropIndicator.style[targetProperty] = dojo.html.getAbsolutePosition(this.domNode, true)[this.vertical ? "x" : "y"] + "px";
+		}
+	} else {
+		child = this.childBoxes[boxIndex];
+	}
+	if (child) {
+		this.dropIndicator.style[targetProperty] = (before ? child[targetProperty] : child[this.vertical ? "right" : "bottom"]) + "px";
+		if (this.vertical) {
+			this.dropIndicator.style.height = child.height + "px";
+			this.dropIndicator.style.top = child.top + "px";
+		} else {
+			this.dropIndicator.style.width = child.width + "px";
+			this.dropIndicator.style.left = child.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 gravity = 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) & gravity) {
+				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 child = this.childBoxes[i];
+	if (dojo.html.gravity(child.node, e) & gravity) {
+		return this.insert(e, child.node, "before");
+	} else {
+		return this.insert(e, child.node, "after");
+	}
+}, insert:function (e, refNode, position) {
+	var node = e.dragObject.domNode;
+	if (position == "before") {
+		return dojo.html.insertBefore(node, refNode);
+	} else {
+		if (position == "after") {
+			return dojo.html.insertAfter(node, refNode);
+		} else {
+			if (position == "append") {
+				refNode.appendChild(node);
+				return true;
+			}
+		}
+	}
+	return false;
+}}, function (node, types) {
+	if (arguments.length == 0) {
+		return;
+	}
+	this.domNode = dojo.byId(node);
+	dojo.dnd.DropTarget.call(this);
+	if (types && dojo.lang.isString(types)) {
+		types = [types];
+	}
+	this.acceptedTypes = types || [];
+	dojo.dnd.dragManager.registerDropTarget(this);
+});
+

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

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragCopy.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragCopy.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragCopy.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragCopy.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,70 @@
+/*
+	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.HtmlDragCopy");
+dojo.require("dojo.dnd.*");
+dojo.declare("dojo.dnd.HtmlDragCopySource", dojo.dnd.HtmlDragSource, function (node, type, copyOnce) {
+	this.copyOnce = copyOnce;
+	this.makeCopy = true;
+}, {onDragStart:function () {
+	var dragObj = new dojo.dnd.HtmlDragCopyObject(this.dragObject, this.type, this);
+	if (this.dragClass) {
+		dragObj.dragClass = this.dragClass;
+	}
+	if (this.constrainToContainer) {
+		dragObj.constrainTo(this.constrainingContainer || this.domNode.parentNode);
+	}
+	return dragObj;
+}, 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 (dragObject, type, source) {
+	this.copySource = source;
+}, {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 startCoords = dojo.html.getAbsolutePosition(this.dragClone, true);
+		var endCoords = {left:this.dragStartPosition.x + 1, top:this.dragStartPosition.y + 1};
+		var anim = dojo.lfx.slideTo(this.dragClone, endCoords, 500, dojo.lfx.easeOut);
+		var dragObject = this;
+		dojo.event.connect(anim, "onEnd", function (e) {
+			dojo.lang.setTimeout(function () {
+				dojo.html.removeNode(dragObject.dragClone);
+				dragObject.dragClone = null;
+				if (dragObject.copySource.makeCopy) {
+					dojo.html.removeNode(dragObject.domNode);
+					dragObject.domNode = dragObject.sourceNode;
+					dragObject.sourceNode = null;
+				}
+			}, 200);
+		});
+		anim.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: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragCopy.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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

Added: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragManager.js
URL: http://svn.apache.org/viewvc/geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragManager.js?rev=794787&view=auto
==============================================================================
--- geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragManager.js (added)
+++ geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragManager.js Thu Jul 16 19:14:41 2009
@@ -0,0 +1,295 @@
+/*
+	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.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 dpIdx = dp + "Idx_" + (this.dsCounter++);
+		ds.dragSourceId = dpIdx;
+		this.dragSources[dpIdx] = ds;
+		ds.domNode.setAttribute(dp, dpIdx);
+		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 dpIdx = ds.dragSourceId;
+		delete ds.dragSourceId;
+		delete this.dragSources[dpIdx];
+		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 index = dojo.lang.find(this.dropTargets, dt, true);
+	if (index >= 0) {
+		this.dropTargets.splice(index, 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 target = e.target.nodeType == dojo.html.TEXT_NODE ? e.target.parentNode : e.target;
+	if (dojo.html.isTag(target, "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, cancel) {
+	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 (tempDragObj) {
+			var ret = null;
+			if (!tempDragObj) {
+				return;
+			}
+			if (this.currentDropTarget) {
+				e.dragObject = tempDragObj;
+				var ce = this.currentDropTarget.domNode.childNodes;
+				if (ce.length > 0) {
+					e.dropTarget = ce[0];
+					while (e.dropTarget == tempDragObj.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 {
+					tempDragObj.dragSource.onDragEnd(e);
+				}
+				catch (err) {
+					var ecopy = {};
+					for (var i in e) {
+						if (i == "type") {
+							ecopy.type = "mouseup";
+							continue;
+						}
+						ecopy[i] = e[i];
+					}
+					tempDragObj.dragSource.onDragEnd(ecopy);
+				}
+			}, function () {
+				tempDragObj.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 (tempTarget) {
+		var tn = tempTarget.domNode;
+		if (!tn || !tempTarget.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], tempTarget]);
+	}, 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 (tempSource) {
+			if (!tempSource) {
+				return;
+			}
+			var tdo = tempSource.onDragStart(e);
+			if (tdo) {
+				tdo.onDragStart(e);
+				tdo.dragOffset.y += dy;
+				tdo.dragOffset.x += dx;
+				tdo.dragSource = tempSource;
+				this.dragObjects.push(tdo);
+			}
+		}, this);
+		this.previousDropTarget = null;
+		this.cacheTargetLocations();
+	}
+	dojo.lang.forEach(this.dragObjects, function (dragObj) {
+		if (dragObj) {
+			dragObj.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 bestBox = this.findBestTarget(e);
+		if (bestBox.target === null) {
+			if (this.currentDropTarget) {
+				this.currentDropTarget.onDragOut(e);
+				this.previousDropTarget = this.currentDropTarget;
+				this.currentDropTarget = null;
+			}
+			this.dropAcceptable = false;
+			return;
+		}
+		if (this.currentDropTarget !== bestBox.target) {
+			if (this.currentDropTarget) {
+				this.previousDropTarget = this.currentDropTarget;
+				this.currentDropTarget.onDragOut(e);
+			}
+			this.currentDropTarget = bestBox.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 _this = this;
+	var bestBox = new Object();
+	bestBox.target = null;
+	bestBox.points = null;
+	dojo.lang.every(this.dropTargetDimensions, function (tmpDA) {
+		if (!_this.isInsideBox(e, tmpDA)) {
+			return true;
+		}
+		bestBox.target = tmpDA[2];
+		bestBox.points = tmpDA;
+		return Boolean(_this.nestedTargets);
+	});
+	return bestBox;
+}, isInsideBox:function (e, coords) {
+	if ((e.pageX > coords[0][0]) && (e.pageX < coords[1][0]) && (e.pageY > coords[0][1]) && (e.pageY < coords[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: geronimo/external/trunk/geronimo-dojo-0.4.3/src/main/webapp/src/dnd/HtmlDragManager.js
------------------------------------------------------------------------------
    svn:eol-style = native

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

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



Mime
View raw message