You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ed...@apache.org on 2006/11/11 17:44:48 UTC

svn commit: r473755 [5/43] - in /jackrabbit/trunk/contrib/jcr-browser: ./ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/jackrabbit/ src/main/java/org/apache/jackrabbit/browser/ src/main/resources/ s...

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/a11y.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/a11y.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/a11y.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/a11y.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,93 @@
+dojo.provide("dojo.a11y");
+
+dojo.require("dojo.uri.*");
+dojo.require("dojo.html.common");
+
+dojo.a11y = {
+	// imgPath: String path to the test image for determining if images are displayed or not
+	// doAccessibleCheck: Boolean if true will perform check for need to create accessible widgets
+	// accessible: Boolean uninitialized when null (accessible check has not been performed)
+	//   if true generate accessible widgets
+	imgPath:dojo.uri.dojoUri("src/widget/templates/images"),
+	doAccessibleCheck: true,
+	accessible: null,		
+
+	checkAccessible: function(){ 
+	// summary: 
+	//		perform check for accessibility if accessibility checking is turned
+	//		on and the accessibility test has not been performed yet
+		if(this.accessible === null){ 
+			this.accessible = false; //default
+			if(this.doAccessibleCheck == true){ 
+				this.accessible = this.testAccessible();
+			}
+		}
+		return this.accessible; /* Boolean */
+	},
+	
+	testAccessible: function(){
+	// summary: 
+	//		Always perform the accessibility check to determine if high 
+	//		contrast mode is on or display of images are turned off. Currently only checks 
+	//		in IE and Mozilla. 
+		this.accessible = false; //default
+		if (dojo.render.html.ie || dojo.render.html.mozilla){
+			var div = document.createElement("div");
+			//div.style.color="rgb(153,204,204)";
+			div.style.backgroundImage = "url(\"" + this.imgPath + "/tab_close.gif\")";
+			// must add to hierarchy before can view currentStyle below
+			dojo.body().appendChild(div);
+			// in FF and IE the value for the current background style of the added div
+			// will be "none" in high contrast mode
+			// in FF the return value will be url(invalid-url:) when running over http 
+			var bkImg = null;
+			if (window.getComputedStyle  ) {
+				var cStyle = getComputedStyle(div, ""); 
+				bkImg = cStyle.getPropertyValue("background-image");
+			}else{
+				bkImg = div.currentStyle.backgroundImage;
+			}
+			var bUseImgElem = false;
+			if (bkImg != null && (bkImg == "none" || bkImg == "url(invalid-url:)" )) {
+				this.accessible = true;
+			}
+			/*
+			if(this.accessible == false && document.images){
+				// test if images are off in IE
+				var testImg = new Image();
+				if(testImg.fileSize) {
+					testImg.src = this.imgPath + "/tab_close.gif";
+					if(testImg.fileSize < 0){ 
+						this.accessible = true;
+					}
+				}	
+			}*/
+			dojo.body().removeChild(div);
+		}
+		return this.accessible; /* Boolean */
+	},
+	
+	setCheckAccessible: function(/* Boolean */ bTest){ 
+	// summary: 
+	//		Set whether or not to check for accessibility mode.  Default value
+	//		of module is true - perform check for accessibility modes. 
+	//		bTest: Boolean - true to check; false to turn off checking
+		this.doAccessibleCheck = bTest;
+	},
+
+	setAccessibleMode: function(){
+	// summary:
+	//		perform the accessibility check and sets the correct mode to load 
+	//		a11y widgets. Only runs if test for accessiiblity has not been performed yet. 
+	//		Call testAccessible() to force the test.
+		if (this.accessible === null){
+			if (this.checkAccessible()){
+				dojo.render.html.prefixes.unshift("a11y");
+			}
+		}
+		return this.accessible; /* Boolean */
+	}
+};
+
+//dojo.hostenv.modulesLoadedListeners.unshift(function() { dojo.a11y.setAccessibleMode(); });
+//dojo.event.connect("before", dojo.hostenv, "makeWidgets", dojo.a11y, "setAccessibleMode");

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/a11y.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,4 @@
+dojo.provide("dojo.animation");
+dojo.require("dojo.animation.Animation");
+
+dojo.deprecated("dojo.animation is slated for removal in 0.5; use dojo.lfx instead.", "0.5");

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Animation.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Animation.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Animation.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Animation.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,235 @@
+dojo.provide("dojo.animation.Animation");
+dojo.require("dojo.animation.AnimationEvent");
+
+dojo.require("dojo.lang.func");
+dojo.require("dojo.math");
+dojo.require("dojo.math.curves");
+
+dojo.deprecated("dojo.animation.Animation is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5");
+
+/*
+Animation package based off of Dan Pupius' work on Animations:
+http://pupius.co.uk/js/Toolkit.Drawing.js
+*/
+
+dojo.animation.Animation = function(/*dojo.math.curves.* */ curve, /*int*/ duration, /*Decimal?*/ accel, /*int?*/ repeatCount, /*int?*/ rate) {
+	// summary: Animation object iterates a set of numbers over a curve for a given amount of time, calling 'onAnimate' at each step.
+	// curve: Curve to animate over.
+	// duration: Duration of the animation, in milliseconds.
+	// accel: Either an integer or curve representing amount of acceleration. (?)  Default is linear acceleration.
+	// repeatCount: Number of times to repeat the animation.  Default is 0.
+	// rate: Time between animation steps, in milliseconds.  Default is 25.
+	// description: Calls the following events: "onBegin", "onAnimate", "onEnd", "onPlay", "onPause", "onStop"
+	// 				If the animation implements a "handler" function, that will be called before each event is called.
+
+	if(dojo.lang.isArray(curve)) {
+		// curve: Array
+		// id: i
+		curve = new dojo.math.curves.Line(curve[0], curve[1]);
+	}
+	this.curve = curve;
+	this.duration = duration;
+	this.repeatCount = repeatCount || 0;
+	this.rate = rate || 25;
+	if(accel) {
+		// accel: Decimal
+		// id: j
+		if(dojo.lang.isFunction(accel.getValue)) {
+			// accel: dojo.math.curves.CatmullRom
+			// id: k
+			this.accel = accel;
+		} else {
+			var i = 0.35*accel+0.5;	// 0.15 <= i <= 0.85
+			this.accel = new dojo.math.curves.CatmullRom([[0], [i], [1]], 0.45);
+		}
+	}
+}
+
+dojo.lang.extend(dojo.animation.Animation, {
+	// public properties
+	curve: null,
+	duration: 0,
+	repeatCount: 0,
+	accel: null,
+
+	// events
+	onBegin: null,
+	onAnimate: null,
+	onEnd: null,
+	onPlay: null,
+	onPause: null,
+	onStop: null,
+	handler: null,
+
+	// "private" properties
+	_animSequence: null,
+	_startTime: null,
+	_endTime: null,
+	_lastFrame: null,
+	_timer: null,
+	_percent: 0,
+	_active: false,
+	_paused: false,
+	_startRepeatCount: 0,
+
+	// public methods
+	play: function(/*Boolean?*/ gotoStart) {
+		// summary:  Play the animation.
+		// goToStart: If true, will restart the animation from the beginning.  
+		//				Otherwise, starts from current play counter.
+		// description: Sends an "onPlay" event to any observers.
+		//				Also sends an "onBegin" event if starting from the beginning.
+		if( gotoStart ) {
+			clearTimeout(this._timer);
+			this._active = false;
+			this._paused = false;
+			this._percent = 0;
+		} else if( this._active && !this._paused ) {
+			return;
+		}
+
+		this._startTime = new Date().valueOf();
+		if( this._paused ) {
+			this._startTime -= (this.duration * this._percent / 100);
+		}
+		this._endTime = this._startTime + this.duration;
+		this._lastFrame = this._startTime;
+
+		var e = new dojo.animation.AnimationEvent(this, null, this.curve.getValue(this._percent),
+			this._startTime, this._startTime, this._endTime, this.duration, this._percent, 0);
+
+		this._active = true;
+		this._paused = false;
+
+		if( this._percent == 0 ) {
+			if(!this._startRepeatCount) {
+				this._startRepeatCount = this.repeatCount;
+			}
+			e.type = "begin";
+			if(typeof this.handler == "function") { this.handler(e); }
+			if(typeof this.onBegin == "function") { this.onBegin(e); }
+		}
+
+		e.type = "play";
+		if(typeof this.handler == "function") { this.handler(e); }
+		if(typeof this.onPlay == "function") { this.onPlay(e); }
+
+		if(this._animSequence) { this._animSequence._setCurrent(this); }
+
+		this._cycle();
+	},
+
+	pause: function() {
+		// summary: Temporarily stop the animation, leaving the play counter at the current location.
+		// 			Resume later with sequence.play()
+		// description: Sends an "onPause" AnimationEvent to any observers.
+		clearTimeout(this._timer);
+		if( !this._active ) { return; }
+		this._paused = true;
+		var e = new dojo.animation.AnimationEvent(this, "pause", this.curve.getValue(this._percent),
+			this._startTime, new Date().valueOf(), this._endTime, this.duration, this._percent, 0);
+		if(typeof this.handler == "function") { this.handler(e); }
+		if(typeof this.onPause == "function") { this.onPause(e); }
+	},
+
+	playPause: function() {
+		// summary: Toggle between play and paused states.
+		if( !this._active || this._paused ) {
+			this.play();
+		} else {
+			this.pause();
+		}
+	},
+
+	gotoPercent: function(/*int*/ pct, /*Boolean*/ andPlay) {
+		// summary: Set the play counter at a certain point in the animation.
+		// pct: Point to set the play counter to, expressed as a percentage (0 to 100).
+		// andPlay: If true, will start the animation at the counter automatically.
+		clearTimeout(this._timer);
+		this._active = true;
+		this._paused = true;
+		this._percent = pct;
+		if( andPlay ) { this.play(); }
+	},
+
+	stop: function(/*Boolean?*/ gotoEnd) {
+		// summary: Stop the animation.
+		// gotoEnd: If true, will advance play counter to the end before sending the event.
+		// description: Sends an "onStop" AnimationEvent to any observers.
+		clearTimeout(this._timer);
+		var step = this._percent / 100;
+		if( gotoEnd ) {
+			step = 1;
+		}
+		var e = new dojo.animation.AnimationEvent(this, "stop", this.curve.getValue(step),
+			this._startTime, new Date().valueOf(), this._endTime, this.duration, this._percent);
+		if(typeof this.handler == "function") { this.handler(e); }
+		if(typeof this.onStop == "function") { this.onStop(e); }
+		this._active = false;
+		this._paused = false;
+	},
+
+	status: function() {
+		// summary: Return the status of the animation.
+		// description: Returns one of "playing", "paused" or "stopped".
+		if( this._active ) {
+			return this._paused ? "paused" : "playing";	/* String */
+		} else {
+			return "stopped";	/* String */
+		}
+	},
+
+	// "private" methods
+	_cycle: function() {
+		// summary: Perform once 'cycle' or step of the animation.
+		clearTimeout(this._timer);
+		if( this._active ) {
+			var curr = new Date().valueOf();
+			var step = (curr - this._startTime) / (this._endTime - this._startTime);
+			var fps = 1000 / (curr - this._lastFrame);
+			this._lastFrame = curr;
+
+			if( step >= 1 ) {
+				step = 1;
+				this._percent = 100;
+			} else {
+				this._percent = step * 100;
+			}
+			
+			// Perform accelleration
+			if(this.accel && this.accel.getValue) {
+				step = this.accel.getValue(step);
+			}
+
+			var e = new dojo.animation.AnimationEvent(this, "animate", this.curve.getValue(step),
+				this._startTime, curr, this._endTime, this.duration, this._percent, Math.round(fps));
+
+			if(typeof this.handler == "function") { this.handler(e); }
+			if(typeof this.onAnimate == "function") { this.onAnimate(e); }
+
+			if( step < 1 ) {
+				this._timer = setTimeout(dojo.lang.hitch(this, "_cycle"), this.rate);
+			} else {
+				e.type = "end";
+				this._active = false;
+				if(typeof this.handler == "function") { this.handler(e); }
+				if(typeof this.onEnd == "function") { this.onEnd(e); }
+
+				if( this.repeatCount > 0 ) {
+					this.repeatCount--;
+					this.play(true);
+				} else if( this.repeatCount == -1 ) {
+					this.play(true);
+				} else {
+					if(this._startRepeatCount) {
+						this.repeatCount = this._startRepeatCount;
+						this._startRepeatCount = 0;
+					}
+					if( this._animSequence ) {
+						this._animSequence._playNext();
+					}
+				}
+			}
+		}
+	}
+});

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Animation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationEvent.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationEvent.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationEvent.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationEvent.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,54 @@
+dojo.provide("dojo.animation.AnimationEvent");
+dojo.require("dojo.lang.common");
+
+dojo.deprecated("dojo.animation.AnimationEvent is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5");
+
+dojo.animation.AnimationEvent = function(
+				/*dojo.animation.Animation*/ animation, 
+				/*String*/type, 
+				/*int[] */ coords, 
+				/*int*/ startTime, 
+				/*int*/ currentTime, 
+				/*int*/ endTime, 
+				/*int*/ duration, 
+				/*int*/ percent, 
+				/*int?*/ fps) {
+	// summary: Event sent at various points during an Animation.
+	// animation: Animation throwing the event.
+	// type: One of: "animate", "begin", "end", "play", "pause" or "stop".
+	// coords: Current coordinates of the animation.
+	// startTime: Time the animation was started, as milliseconds.
+	// currentTime: Time the event was thrown, as milliseconds.
+	// endTime: Time the animation is expected to complete, as milliseconds.
+	// duration: Duration of the animation, in milliseconds.
+	// percent: Percent of the animation that has completed, between 0 and 100.
+	// fps: Frames currently shown per second.  (Only sent for "animate" event).
+	// description: The AnimationEvent has public properties of the same name as
+	//				 all constructor arguments, plus "x", "y" and "z".
+	
+	this.type = type; // "animate", "begin", "end", "play", "pause", "stop"
+	this.animation = animation;
+
+	this.coords = coords;
+	this.x = coords[0];
+	this.y = coords[1];
+	this.z = coords[2];
+
+	this.startTime = startTime;
+	this.currentTime = currentTime;
+	this.endTime = endTime;
+
+	this.duration = duration;
+	this.percent = percent;
+	this.fps = fps;
+};
+dojo.extend(dojo.animation.AnimationEvent, {
+	coordsAsInts: function() {
+		// summary: Coerce the coordinates into integers.
+		var cints = new Array(this.coords.length);
+		for(var i = 0; i < this.coords.length; i++) {
+			cints[i] = Math.round(this.coords[i]);
+		}
+		return cints;
+	}
+});

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationEvent.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationSequence.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationSequence.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationSequence.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationSequence.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,152 @@
+dojo.provide("dojo.animation.AnimationSequence");
+dojo.require("dojo.animation.AnimationEvent");
+dojo.require("dojo.animation.Animation");
+
+dojo.deprecated("dojo.animation.AnimationSequence is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5");
+
+dojo.animation.AnimationSequence = function(/*int?*/ repeatCount){
+	// summary: Sequence of Animations, played one after the other.
+	// repeatCount: Number of times to repeat the entire sequence.  Default is 0 (play once only).
+	// description: Calls the following events: "onBegin", "onEnd", "onNext"
+	// 				If the animation implements a "handler" function, that will be called before each event is called.
+	this._anims = [];
+	this.repeatCount = repeatCount || 0;
+}
+
+dojo.lang.extend(dojo.animation.AnimationSequence, {
+	repeatCount: 0,
+
+	_anims: [],
+	_currAnim: -1,
+
+	onBegin: null,
+	onEnd: null,
+	onNext: null,
+	handler: null,
+
+	add: function() {
+		// summary: Add one or more Animations to the sequence.
+		// description:  args: Animations (dojo.animation.Animation) to add to the sequence.
+		for(var i = 0; i < arguments.length; i++) {
+			this._anims.push(arguments[i]);
+			arguments[i]._animSequence = this;
+		}
+	},
+
+	remove: function(/*dojo.animation.Animation*/ anim) {
+		// summary: Remove one particular animation from the sequence.
+		//	amim: Animation to remove.
+		for(var i = 0; i < this._anims.length; i++) {
+			if( this._anims[i] == anim ) {
+				this._anims[i]._animSequence = null;
+				this._anims.splice(i, 1);
+				break;
+			}
+		}
+	},
+
+	removeAll: function() {
+		// summary: Remove all animations from the sequence.
+		for(var i = 0; i < this._anims.length; i++) {
+			this._anims[i]._animSequence = null;
+		}
+		this._anims = [];
+		this._currAnim = -1;
+	},
+
+	clear: function() {
+		// summary: Remove all animations from the sequence.
+		this.removeAll();
+	},
+
+	play: function(/*Boolean?*/ gotoStart) {
+		// summary: Play the animation sequence.
+		// gotoStart: If true, will start at the beginning of the first sequence.
+		//				Otherwise, starts at the current play counter of the current animation.
+		// description: Sends an "onBegin" event to any observers.
+		if( this._anims.length == 0 ) { return; }
+		if( gotoStart || !this._anims[this._currAnim] ) {
+			this._currAnim = 0;
+		}
+		if( this._anims[this._currAnim] ) {
+			if( this._currAnim == 0 ) {
+				var e = {type: "begin", animation: this._anims[this._currAnim]};
+				if(typeof this.handler == "function") { this.handler(e); }
+				if(typeof this.onBegin == "function") { this.onBegin(e); }
+			}
+			this._anims[this._currAnim].play(gotoStart);
+		}
+	},
+
+	pause: function() {
+		// summary: temporarily stop the current animation.  Resume later with sequence.play()
+		if( this._anims[this._currAnim] ) {
+			this._anims[this._currAnim].pause();
+		}
+	},
+
+	playPause: function() {
+		// summary: Toggle between play and paused states.
+		if( this._anims.length == 0 ) { return; }
+		if( this._currAnim == -1 ) { this._currAnim = 0; }
+		if( this._anims[this._currAnim] ) {
+			this._anims[this._currAnim].playPause();
+		}
+	},
+
+	stop: function() {
+		// summary: Stop the current animation.
+		if( this._anims[this._currAnim] ) {
+			this._anims[this._currAnim].stop();
+		}
+	},
+
+	status: function() {
+		// summary: Return the status of the current animation.
+		// description: Returns one of "playing", "paused" or "stopped".
+		if( this._anims[this._currAnim] ) {
+			return this._anims[this._currAnim].status();
+		} else {
+			return "stopped";
+		}
+	},
+
+	_setCurrent: function(/*dojo.animation.Animation*/ anim) {
+		// summary: Set the current animation.
+		// anim: Animation to make current, must have already been added to the sequence.
+		for(var i = 0; i < this._anims.length; i++) {
+			if( this._anims[i] == anim ) {
+				this._currAnim = i;
+				break;
+			}
+		}
+	},
+
+	_playNext: function() {
+		// summary: Play the next animation in the sequence.
+		// description:  Sends an "onNext" event to any observers.
+		//				 Also sends "onEnd" if the last animation is finished.
+		if( this._currAnim == -1 || this._anims.length == 0 ) { return; }
+		this._currAnim++;
+		if( this._anims[this._currAnim] ) {
+			var e = {type: "next", animation: this._anims[this._currAnim]};
+			if(typeof this.handler == "function") { this.handler(e); }
+			if(typeof this.onNext == "function") { this.onNext(e); }
+			this._anims[this._currAnim].play(true);
+		} else {
+			var e = {type: "end", animation: this._anims[this._anims.length-1]};
+			if(typeof this.handler == "function") { this.handler(e); }
+			if(typeof this.onEnd == "function") { this.onEnd(e); }
+			if(this.repeatCount > 0) {
+				this._currAnim = 0;
+				this.repeatCount--;
+				this._anims[this._currAnim].play(true);
+			} else if(this.repeatCount == -1) {
+				this._currAnim = 0;
+				this._anims[this._currAnim].play(true);
+			} else {
+				this._currAnim = -1;
+			}
+		}
+	}
+});

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/AnimationSequence.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Timer.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Timer.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Timer.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Timer.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,6 @@
+dojo.provide("dojo.animation.Timer");
+dojo.require("dojo.lang.timing.Timer");
+
+dojo.deprecated("dojo.animation.Timer is now dojo.lang.timing.Timer", "0.5");
+
+dojo.animation.Timer = dojo.lang.timing.Timer;

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/Timer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/__package__.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/__package__.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/__package__.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/__package__.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,10 @@
+dojo.kwCompoundRequire({
+	common: [
+		"dojo.animation.AnimationEvent",
+		"dojo.animation.Animation",
+		"dojo.animation.AnimationSequence"
+	]
+});
+dojo.provide("dojo.animation.*");
+
+dojo.deprecated("dojo.Animation.* is slated for removal in 0.5; use dojo.lfx.* instead.", "0.5");

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/animation/__package__.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/behavior.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/behavior.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/behavior.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/behavior.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,238 @@
+dojo.provide("dojo.behavior");
+dojo.require("dojo.event.*");
+
+dojo.require("dojo.experimental");
+dojo.experimental("dojo.behavior");
+
+dojo.behavior = new function(){
+	function arrIn(obj, name){
+		if(!obj[name]){ obj[name] = []; }
+		return obj[name];
+	}
+
+	function forIn(obj, scope, func){
+		var tmpObj = {};
+		for(var x in obj){
+			if(typeof tmpObj[x] == "undefined"){
+				if(!func){
+					scope(obj[x], x);
+				}else{
+					func.call(scope, obj[x], x);
+				}
+			}
+		}
+	}
+
+	// FIXME: need a better test so we don't exclude nightly Safari's!
+	this.behaviors = {};
+	this.add = function(behaviorObj){
+		/*	behavior objects are specified in the following format:
+		 *
+		 *	{ 
+		 *	 	"#id": {
+		 *			"found": function(element){
+		 *				// ...
+		 *			},
+		 *
+		 *			"onblah": {targetObj: foo, targetFunc: "bar"},
+		 *
+		 *			"onblarg": "/foo/bar/baz/blarg",
+		 *
+		 *			"onevent": function(evt){
+		 *			},
+		 *
+		 *			"onotherevent: function(evt){
+		 *				// ...
+		 *			}
+		 *		},
+		 *
+		 *		"#id2": {
+		 *			// ...
+		 *		},
+		 *
+		 *		"#id3": function(element){
+		 *			// ...
+		 *		},
+		 *
+		 *		// publish the match on a topic
+		 *		"#id4": "/found/topic/name",
+		 *
+		 *		// match all direct descendants
+		 *		"#id4 > *": function(element){
+		 *			// ...
+		 *		},
+		 *
+		 *		// match the first child node that's an element
+		 *		"#id4 > @firstElement": { ... },
+		 *
+		 *		// match the last child node that's an element
+		 *		"#id4 > @lastElement":  { ... },
+		 *
+		 *		// all elements of type tagname
+		 *		"tagname": {
+		 *			// ...
+		 *		},
+		 *
+		 *		// maps to roughly:
+		 *		//	dojo.lang.forEach(body.getElementsByTagName("tagname1"), function(node){
+		 *		//		dojo.lang.forEach(node.getElementsByTagName("tagname2"), function(node2){
+		 *		//			dojo.lang.forEach(node2.getElementsByTagName("tagname3", function(node3){
+		 *		//				// apply rules
+		 *		//			});
+		 *		//		});
+		 *		//	});
+		 *		"tagname1 tagname2 tagname3": {
+		 *			// ...
+		 *		},
+		 *
+		 *		".classname": {
+		 *			// ...
+		 *		},
+		 *
+		 *		"tagname.classname": {
+		 *			// ...
+		 *		},
+		 *	}
+		 *
+		 *	The "found" method is a generalized handler that's called as soon
+		 *	as the node matches the selector. Rules for values that follow also
+		 *	apply to the "found" key.
+		 *	
+		 *	The "on*" handlers are attached with dojo.event.connect(). If the
+		 *	value is not a function but is rather an object, it's assumed to be
+		 *	the "other half" of a dojo.event.kwConnect() argument object. It
+		 *	may contain any/all properties of such a connection modifier save
+		 *	for the sourceObj and sourceFunc properties which are filled in by
+		 *	the system automatically. If a string is instead encountered, the
+		 *	node publishes the specified event on the topic contained in the
+		 *	string value.
+		 *
+		 *	If the value corresponding to the ID key is a function and not a
+		 *	list, it's treated as though it was the value of "found".
+		 *
+		 */
+
+		var tmpObj = {};
+		forIn(behaviorObj, this, function(behavior, name){
+			var tBehavior = arrIn(this.behaviors, name);
+			if((dojo.lang.isString(behavior))||(dojo.lang.isFunction(behavior))){
+				behavior = { found: behavior };
+			}
+			forIn(behavior, function(rule, ruleName){
+				arrIn(tBehavior, ruleName).push(rule);
+			});
+		});
+	}
+
+	this.apply = function(){
+		dojo.profile.start("dojo.behavior.apply");
+		var r = dojo.render.html;
+		// note, we apply one way for fast queries and one way for slow
+		// iteration. So be it.
+		var safariGoodEnough = (!r.safari);
+		if(r.safari){
+			// Anything over release #420 should work the fast way
+			var uas = r.UA.split("AppleWebKit/")[1];
+			if(parseInt(uas.match(/[0-9.]{3,}/)) >= 420){
+				safariGoodEnough = true;
+			}
+		}
+		if((dj_undef("behaviorFastParse", djConfig) ? (safariGoodEnough) : djConfig["behaviorFastParse"])){
+			this.applyFast();
+		}else{
+			this.applySlow();
+		}
+		dojo.profile.end("dojo.behavior.apply");
+	}
+
+	this.matchCache = {};
+
+	this.elementsById = function(id, handleRemoved){
+		var removed = [];
+		var added = [];
+		arrIn(this.matchCache, id);
+		if(handleRemoved){
+			var nodes = this.matchCache[id];
+			for(var x=0; x<nodes.length; x++){
+				if(nodes[x].id != ""){
+					removed.push(nodes[x]);
+					nodes.splice(x, 1);
+					x--;
+				}
+			}
+		}
+		var tElem = dojo.byId(id);
+		while(tElem){
+			if(!tElem["idcached"]){
+				added.push(tElem);
+			}
+			tElem.id = "";
+			tElem = dojo.byId(id);
+		}
+		this.matchCache[id] = this.matchCache[id].concat(added);
+		dojo.lang.forEach(this.matchCache[id], function(node){
+			node.id = id;
+			node.idcached = true;
+		});
+		return { "removed": removed, "added": added, "match": this.matchCache[id] };
+	}
+
+	this.applyToNode = function(node, action, ruleSetName){
+		if(typeof action == "string"){
+			dojo.event.topic.registerPublisher(action, node, ruleSetName);
+		}else if(typeof action == "function"){
+			if(ruleSetName == "found"){
+				action(node);
+			}else{
+				dojo.event.connect(node, ruleSetName, action);
+			}
+		}else{
+			action.srcObj = node;
+			action.srcFunc = ruleSetName;
+			dojo.event.kwConnect(action);
+		}
+	}
+
+	this.applyFast = function(){
+		dojo.profile.start("dojo.behavior.applyFast");
+		// fast DOM queries...wheeee!
+		forIn(this.behaviors, function(tBehavior, id){
+			var elems = dojo.behavior.elementsById(id);
+			dojo.lang.forEach(elems.added, 
+				function(elem){
+					forIn(tBehavior, function(ruleSet, ruleSetName){
+						if(dojo.lang.isArray(ruleSet)){
+							dojo.lang.forEach(ruleSet, function(action){
+								dojo.behavior.applyToNode(elem, action, ruleSetName);
+							});
+						}
+					});
+				}
+			);
+		});
+		dojo.profile.end("dojo.behavior.applyFast");
+	}
+	
+	this.applySlow = function(){
+		// iterate. Ugg.
+		dojo.profile.start("dojo.behavior.applySlow");
+		var all = document.getElementsByTagName("*");
+		var allLen = all.length;
+		for(var x=0; x<allLen; x++){
+			var elem = all[x];
+			if((elem.id)&&(!elem["behaviorAdded"])&&(this.behaviors[elem.id])){
+				elem["behaviorAdded"] = true;
+				forIn(this.behaviors[elem.id], function(ruleSet, ruleSetName){
+					if(dojo.lang.isArray(ruleSet)){
+						dojo.lang.forEach(ruleSet, function(action){
+							dojo.behavior.applyToNode(elem, action, ruleSetName);
+						});
+					}
+				});
+			}
+		}
+		dojo.profile.end("dojo.behavior.applySlow");
+	}
+}
+
+dojo.addOnLoad(dojo.behavior, "apply");

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/behavior.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap1.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap1.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap1.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap1.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,343 @@
+/**
+* @file bootstrap1.js
+*
+* summary: First file that is loaded that 'bootstraps' the entire dojo library suite.
+* note:  Must run before hostenv_*.js file.
+*
+* @author  Copyright 2004 Mark D. Anderson (mda@discerning.com)
+* TODOC: should the copyright be changed to Dojo Foundation?
+* @license Licensed under the Academic Free License 2.1 http://www.opensource.org/licenses/afl-2.1.php
+*
+* $Id: bootstrap1.js 6258 2006-10-20 03:12:36Z jburke $
+*/
+
+// TODOC: HOW TO DOC THE BELOW?
+// @global: djConfig
+// summary:  
+//		Application code can set the global 'djConfig' prior to loading
+//		the library to override certain global settings for how dojo works.  
+// description:  The variables that can be set are as follows:
+//			- isDebug: false
+//			- allowQueryConfig: false
+//			- baseScriptUri: ""
+//			- baseRelativePath: ""
+//			- libraryScriptUri: ""
+//			- iePreventClobber: false
+//			- ieClobberMinimal: true
+//			- locale: undefined
+//			- extraLocale: undefined
+//			- preventBackButtonFix: true
+//			- searchIds: []
+//			- parseWidgets: true
+// TODOC: HOW TO DOC THESE VARIABLES?
+// TODOC: IS THIS A COMPLETE LIST?
+// note:
+//		'djConfig' does not exist under 'dojo.*' so that it can be set before the 
+//		'dojo' variable exists.  
+// note:
+//		Setting any of these variables *after* the library has loaded does nothing at all. 
+// TODOC: is this still true?  Release notes for 0.3 indicated they could be set after load.
+//
+
+
+//TODOC:  HOW TO DOC THIS?
+// @global: dj_global
+// summary: 
+//		an alias for the top-level global object in the host environment
+//		(e.g., the window object in a browser).
+// description:  
+//		Refer to 'dj_global' rather than referring to window to ensure your
+//		code runs correctly in contexts other than web browsers (eg: Rhino on a server).
+var dj_global = this;
+
+//TODOC:  HOW TO DOC THIS?
+// @global: dj_currentContext
+// summary: 
+//		Private global context object. Where 'dj_global' always refers to the boot-time
+//    global context, 'dj_currentContext' can be modified for temporary context shifting.
+//    dojo.global() returns dj_currentContext.
+// description:  
+//		Refer to dojo.global() rather than referring to dj_global to ensure your
+//		code runs correctly in managed contexts.
+var dj_currentContext = this;
+
+
+// ****************************************************************
+// global public utils
+// TODOC: DO WE WANT TO NOTE THAT THESE ARE GLOBAL PUBLIC UTILS?
+// ****************************************************************
+
+function dj_undef(/*String*/ name, /*Object?*/ object){
+	//summary: Returns true if 'name' is defined on 'object' (or globally if 'object' is null).
+	//description: Note that 'defined' and 'exists' are not the same concept.
+	return (typeof (object || dj_currentContext)[name] == "undefined");	// Boolean
+}
+
+// make sure djConfig is defined
+if(dj_undef("djConfig", this)){ 
+	var djConfig = {}; 
+}
+
+//TODOC:  HOW TO DOC THIS?
+// dojo is the root variable of (almost all) our public symbols -- make sure it is defined.
+if(dj_undef("dojo", this)){ 
+	var dojo = {}; 
+}
+
+dojo.global = function(){
+	// summary:
+	//		return the current global context object
+	//		(e.g., the window object in a browser).
+	// description: 
+	//		Refer to 'dojo.global()' rather than referring to window to ensure your
+	//		code runs correctly in contexts other than web browsers (eg: Rhino on a server).
+	return dj_currentContext;
+}
+
+// Override locale setting, if specified
+dojo.locale  = djConfig.locale;
+
+//TODOC:  HOW TO DOC THIS?
+dojo.version = {
+	// summary: version number of this instance of dojo.
+	major: 0, minor: 3, patch: 1, flag: "+",
+	revision: Number("$Rev: 6258 $".match(/[0-9]+/)[0]),
+	toString: function(){
+		with(dojo.version){
+			return major + "." + minor + "." + patch + flag + " (" + revision + ")";	// String
+		}
+	}
+}
+
+dojo.evalProp = function(/*String*/ name, /*Object*/ object, /*Boolean?*/ create){
+	// summary: Returns 'object[name]'.  If not defined and 'create' is true, will return a new Object.
+	// description: 
+	//		Returns null if 'object[name]' is not defined and 'create' is not true.
+	// 		Note: 'defined' and 'exists' are not the same concept.	
+	if((!object)||(!name)) return undefined; // undefined
+	if(!dj_undef(name, object)) return object[name]; // mixed
+	return (create ? (object[name]={}) : undefined);	// mixed
+}
+
+dojo.parseObjPath = function(/*String*/ path, /*Object?*/ context, /*Boolean?*/ create){
+	// summary: Parse string path to an object, and return corresponding object reference and property name.
+	// description: 
+	//		Returns an object with two properties, 'obj' and 'prop'.  
+	//		'obj[prop]' is the reference indicated by 'path'.
+	// path: Path to an object, in the form "A.B.C".
+	// context: Object to use as root of path.  Defaults to 'dojo.global()'.
+	// create: If true, Objects will be created at any point along the 'path' that is undefined.
+	var object = (context || dojo.global());
+	var names = path.split('.');
+	var prop = names.pop();
+	for (var i=0,l=names.length;i<l && object;i++){
+		object = dojo.evalProp(names[i], object, create);
+	}
+	return {obj: object, prop: prop};	// Object: {obj: Object, prop: String}
+}
+
+dojo.evalObjPath = function(/*String*/ path, /*Boolean?*/ create){
+	// summary: Return the value of object at 'path' in the global scope, without using 'eval()'.
+	// path: Path to an object, in the form "A.B.C".
+	// create: If true, Objects will be created at any point along the 'path' that is undefined.
+	if(typeof path != "string"){ 
+		return dojo.global(); 
+	}
+	// fast path for no periods
+	if(path.indexOf('.') == -1){
+		return dojo.evalProp(path, dojo.global(), create);		// mixed
+	}
+
+	//MOW: old 'with' syntax was confusing and would throw an error if parseObjPath returned null.
+	var ref = dojo.parseObjPath(path, dojo.global(), create);
+	if(ref){
+		return dojo.evalProp(ref.prop, ref.obj, create);	// mixed
+	}
+	return null;
+}
+
+dojo.errorToString = function(/*Error*/ exception){
+	// summary: Return an exception's 'message', 'description' or text.
+
+	// TODO: overriding Error.prototype.toString won't accomplish this?
+ 	// 		... since natively generated Error objects do not always reflect such things?
+	if(!dj_undef("message", exception)){
+		return exception.message;		// String
+	}else if(!dj_undef("description", exception)){
+		return exception.description;	// String
+	}else{
+		return exception;				// Error
+	}
+}
+
+dojo.raise = function(/*String*/ message, /*Error?*/ exception){
+	// summary: Common point for raising exceptions in Dojo to enable logging.
+	//	Throws an error message with text of 'exception' if provided, or
+	//	rethrows exception object.
+
+	if(exception){
+		message = message + ": "+dojo.errorToString(exception);
+	}
+
+	// print the message to the user if hostenv.println is defined
+	try { if(djConfig.isDebug){ dojo.hostenv.println("FATAL exception raised: "+message); } } catch (e) {}
+
+	throw exception || Error(message);
+}
+
+//Stub functions so things don't break.
+//TODOC:  HOW TO DOC THESE?
+dojo.debug = function(){};
+dojo.debugShallow = function(obj){};
+dojo.profile = { start: function(){}, end: function(){}, stop: function(){}, dump: function(){} };
+
+function dj_eval(/*String*/ scriptFragment){ 
+	// summary: Perform an evaluation in the global scope.  Use this rather than calling 'eval()' directly.
+	// description: Placed in a separate function to minimize size of trapped evaluation context.
+	// note:
+	//	 - JSC eval() takes an optional second argument which can be 'unsafe'.
+	//	 - Mozilla/SpiderMonkey eval() takes an optional second argument which is the
+	//  	 scope object for new symbols.
+	return dj_global.eval ? dj_global.eval(scriptFragment) : eval(scriptFragment); 	// mixed
+}
+
+dojo.unimplemented = function(/*String*/ funcname, /*String?*/ extra){
+	// summary: Throw an exception because some function is not implemented.
+	// extra: Text to append to the exception message.
+	var message = "'" + funcname + "' not implemented";
+	if (extra != null) { message += " " + extra; }
+	dojo.raise(message);
+}
+
+dojo.deprecated = function(/*String*/ behaviour, /*String?*/ extra, /*String?*/ removal){
+	// summary: Log a debug message to indicate that a behavior has been deprecated.
+	// extra: Text to append to the message.
+	// removal: Text to indicate when in the future the behavior will be removed.
+	var message = "DEPRECATED: " + behaviour;
+	if(extra){ message += " " + extra; }
+	if(removal){ message += " -- will be removed in version: " + removal; }
+	dojo.debug(message);
+}
+
+dojo.render = (function(){
+	//TODOC: HOW TO DOC THIS?
+	// summary: Details rendering support, OS and browser of the current environment.
+	// TODOC: is this something many folks will interact with?  If so, we should doc the structure created...
+	function vscaffold(prefs, names){
+		var tmp = {
+			capable: false,
+			support: {
+				builtin: false,
+				plugin: false
+			},
+			prefixes: prefs
+		};
+		for(var i=0; i<names.length; i++){
+			tmp[names[i]] = false;
+		}
+		return tmp;
+	}
+
+	return {
+		name: "",
+		ver: dojo.version,
+		os: { win: false, linux: false, osx: false },
+		html: vscaffold(["html"], ["ie", "opera", "khtml", "safari", "moz"]),
+		svg: vscaffold(["svg"], ["corel", "adobe", "batik"]),
+		vml: vscaffold(["vml"], ["ie"]),
+		swf: vscaffold(["Swf", "Flash", "Mm"], ["mm"]),
+		swt: vscaffold(["Swt"], ["ibm"])
+	};
+})();
+
+// ****************************************************************
+// dojo.hostenv methods that must be defined in hostenv_*.js
+// ****************************************************************
+
+/**
+ * The interface definining the interaction with the EcmaScript host environment.
+*/
+
+/*
+ * None of these methods should ever be called directly by library users.
+ * Instead public methods such as loadModule should be called instead.
+ */
+dojo.hostenv = (function(){
+	// TODOC:  HOW TO DOC THIS?
+	// summary: Provides encapsulation of behavior that changes across different 'host environments' 
+	//			(different browsers, server via Rhino, etc).
+	// description: None of these methods should ever be called directly by library users.
+	//				Use public methods such as 'loadModule' instead.
+	
+	// default configuration options
+	var config = {
+		isDebug: false,
+		allowQueryConfig: false,
+		baseScriptUri: "",
+		baseRelativePath: "",
+		libraryScriptUri: "",
+		iePreventClobber: false,
+		ieClobberMinimal: true,
+		preventBackButtonFix: true,
+		delayMozLoadingFix: false,
+		searchIds: [],
+		parseWidgets: true
+	};
+
+	if (typeof djConfig == "undefined") { djConfig = config; }
+	else {
+		for (var option in config) {
+			if (typeof djConfig[option] == "undefined") {
+				djConfig[option] = config[option];
+			}
+		}
+	}
+
+	return {
+		name_: '(unset)',
+		version_: '(unset)',
+
+
+		getName: function(){ 
+			// sumary: Return the name of the host environment.
+			return this.name_; 	// String
+		},
+
+
+		getVersion: function(){ 
+			// summary: Return the version of the hostenv.
+			return this.version_; // String
+		},
+
+		getText: function(/*String*/ uri){
+			// summary:	Read the plain/text contents at the specified 'uri'.
+			// description: 
+			//			If 'getText()' is not implemented, then it is necessary to override 
+			//			'loadUri()' with an implementation that doesn't rely on it.
+
+			dojo.unimplemented('getText', "uri=" + uri);
+		}
+	};
+})();
+
+
+dojo.hostenv.getBaseScriptUri = function(){
+	// summary: Return the base script uri that other scripts are found relative to.
+	// TODOC: HUH?  This comment means nothing to me.  What other scripts? Is this the path to other dojo libraries?
+	//		MAYBE:  Return the base uri to scripts in the dojo library.	 ???
+	// return: Empty string or a path ending in '/'.
+	if(djConfig.baseScriptUri.length){ 
+		return djConfig.baseScriptUri;
+	}
+
+	// MOW: Why not:
+	//			uri = djConfig.libraryScriptUri || djConfig.baseRelativePath
+	//		??? Why 'new String(...)'
+	var uri = new String(djConfig.libraryScriptUri||djConfig.baseRelativePath);
+	if (!uri) { dojo.raise("Nothing returned by getLibraryScriptUri(): " + uri); }
+
+	// MOW: uri seems to not be actually used.  Seems to be hard-coding to djConfig.baseRelativePath... ???
+	var lastslash = uri.lastIndexOf('/');		// MOW ???
+	djConfig.baseScriptUri = djConfig.baseRelativePath;
+	return djConfig.baseScriptUri;	// String
+}

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap1.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap2.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap2.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap2.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap2.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,49 @@
+//Semicolon is for when this file is integrated with a custom build on one line
+//with some other file's contents. Sometimes that makes things not get defined
+//properly, particularly with the using the closure below to do all the work.
+;(function(){
+	//Don't do this work if dojo.js has already done it.
+	if(typeof dj_usingBootstrap != "undefined"){
+		return;
+	}
+
+	var isRhino = false;
+	var isSpidermonkey = false;
+	var isDashboard = false;
+	if((typeof this["load"] == "function")&&((typeof this["Packages"] == "function")||(typeof this["Packages"] == "object"))){
+		isRhino = true;
+	}else if(typeof this["load"] == "function"){
+		isSpidermonkey  = true;
+	}else if(window.widget){
+		isDashboard = true;
+	}
+
+	var tmps = [];
+	if((this["djConfig"])&&((djConfig["isDebug"])||(djConfig["debugAtAllCosts"]))){
+		tmps.push("debug.js");
+	}
+
+	if((this["djConfig"])&&(djConfig["debugAtAllCosts"])&&(!isRhino)&&(!isDashboard)){
+		tmps.push("browser_debug.js");
+	}
+
+	var loaderRoot = djConfig["baseScriptUri"];
+	if((this["djConfig"])&&(djConfig["baseLoaderUri"])){
+		loaderRoot = djConfig["baseLoaderUri"];
+	}
+
+	for(var x=0; x < tmps.length; x++){
+		var spath = loaderRoot+"src/"+tmps[x];
+		if(isRhino||isSpidermonkey){
+			load(spath);
+		} else {
+			try {
+				document.write("<scr"+"ipt type='text/javascript' src='"+spath+"'></scr"+"ipt>");
+			} catch (e) {
+				var script = document.createElement("script");
+				script.src = spath;
+				document.getElementsByTagName("head")[0].appendChild(script);
+			}
+		}
+	}
+})();

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/bootstrap2.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/browser_debug.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/browser_debug.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/browser_debug.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/browser_debug.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,166 @@
+dojo.hostenv.loadedUris.push("../src/bootstrap1.js");
+dojo.hostenv.loadedUris.push("../src/loader.js");
+dojo.hostenv.loadedUris.push("../src/hostenv_browser.js");
+dojo.hostenv.loadedUris.push("../src/bootstrap2.js");
+dojo.hostenv._loadedUrisListStart = dojo.hostenv.loadedUris.length;
+
+function removeComments(contents){
+	contents = new String((!contents) ? "" : contents);
+	// clobber all comments
+	// FIXME broken if // or /* inside quotes or regexp
+	contents = contents.replace( /^(.*?)\/\/(.*)$/mg , "$1");
+	contents = contents.replace( /(\n)/mg , "__DOJONEWLINE");
+	contents = contents.replace( /\/\*(.*?)\*\//g , "");
+	return contents.replace( /__DOJONEWLINE/mg , "\n");
+}
+
+dojo.hostenv.getRequiresAndProvides = function(contents){
+	// FIXME: should probably memoize this!
+	if(!contents){ return []; }
+	
+
+	// check to see if we need to load anything else first. Ugg.
+	var deps = [];
+	var tmp;
+	RegExp.lastIndex = 0;
+	var testExp = /dojo.(hostenv.loadModule|hostenv.require|require|requireIf|kwCompoundRequire|hostenv.conditionalLoadModule|hostenv.startPackage|provide)\([\w\W]*?\)/mg;
+	while((tmp = testExp.exec(contents)) != null){
+		deps.push(tmp[0]);
+	}
+	return deps;
+}
+
+dojo.hostenv.getDelayRequiresAndProvides = function(contents){
+	// FIXME: should probably memoize this!
+	if(!contents){ return []; }
+
+	// check to see if we need to load anything else first. Ugg.
+	var deps = [];
+	var tmp;
+	RegExp.lastIndex = 0;
+	var testExp = /dojo.(requireAfterIf)\([\w\W]*?\)/mg;
+	while((tmp = testExp.exec(contents)) != null){
+		deps.push(tmp[0]);
+	}
+	return deps;
+}
+
+/*
+dojo.getNonExistantDescendants = function(objpath){
+	var ret = [];
+	// fast path for no periods
+	if(typeof objpath != "string"){ return dj_global; }
+	if(objpath.indexOf('.') == -1){
+		if(dj_undef(objpath, dj_global)){
+			ret.push[objpath];
+		}
+		return ret;
+	}
+
+	var syms = objpath.split(/\./);
+	var obj = dj_global;
+	for(var i=0;i<syms.length;++i){
+		if(dj_undef(syms[i], obj)){
+			for(var j=i; j<syms.length; j++){
+				ret.push(syms.slice(0, j+1).join("."));
+			}
+			break;
+		}
+	}
+	return ret;
+}
+*/
+
+dojo.clobberLastObject = function(objpath){
+	if(objpath.indexOf('.') == -1){
+		if(!dj_undef(objpath, dj_global)){
+			delete dj_global[objpath];
+		}
+		return true;
+	}
+
+	var syms = objpath.split(/\./);
+	var base = dojo.evalObjPath(syms.slice(0, -1).join("."), false);
+	var child = syms[syms.length-1];
+	if(!dj_undef(child, base)){
+		// alert(objpath);
+		delete base[child];
+		return true;
+	}
+	return false;
+}
+
+var removals = [];
+
+function zip(arr){
+	var ret = [];
+	var seen = {};
+	for(var x=0; x<arr.length; x++){
+		if(!seen[arr[x]]){
+			ret.push(arr[x]);
+			seen[arr[x]] = true;
+		}
+	}
+	return ret;
+}
+
+// over-write dj_eval to prevent actual loading of subsequent files
+var old_dj_eval = dj_eval;
+dj_eval = function(){ return true; }
+dojo.hostenv.oldLoadUri = dojo.hostenv.loadUri;
+dojo.hostenv.loadUri = function(uri, cb /*optional*/){
+	if(dojo.hostenv.loadedUris[uri]){
+		return true; // fixes endless recursion opera trac 471
+	}
+	try{
+		var text = this.getText(uri, null, true);
+		if(!text) { return false; }
+		if(cb){
+			// No way to load i18n bundles but to eval them, and they usually
+			// don't have script needing to be debugged anyway
+			var expr = old_dj_eval('('+text+')');
+			cb(expr);
+		}else {
+			var requires = dojo.hostenv.getRequiresAndProvides(text);
+			eval(requires.join(";"));
+			dojo.hostenv.loadedUris.push(uri);
+			dojo.hostenv.loadedUris[uri] = true;
+			var delayRequires = dojo.hostenv.getDelayRequiresAndProvides(text);
+			eval(delayRequires.join(";"));
+		}
+	}catch(e){ 
+		alert(e);
+	}
+	return true;
+}
+
+dojo.hostenv._writtenIncludes = {};
+dojo.hostenv.writeIncludes = function(willCallAgain){
+	for(var x=removals.length-1; x>=0; x--){
+		dojo.clobberLastObject(removals[x]);
+	}
+	var depList = [];
+	var seen = dojo.hostenv._writtenIncludes;
+	for(var x=0; x<dojo.hostenv.loadedUris.length; x++){
+		var curi = dojo.hostenv.loadedUris[x];
+		// dojo.debug(curi);
+		if(!seen[curi]){
+			seen[curi] = true;
+			depList.push(curi);
+		}
+	}
+
+	dojo.hostenv._global_omit_module_check = true;
+	
+	for(var x= dojo.hostenv._loadedUrisListStart; x<depList.length; x++){
+		document.write("<script type='text/javascript' src='"+depList[x]+"'></script>");
+	}
+	document.write("<script type='text/javascript'>dojo.hostenv._global_omit_module_check = false;</script>");
+	dojo.hostenv._loadedUrisListStart = 0;
+	if (!willCallAgain) {
+		// turn off debugAtAllCosts, so that dojo.require() calls inside of ContentPane hrefs
+		// work correctly
+		dj_eval = old_dj_eval;
+		dojo.hostenv.loadUri = dojo.hostenv.oldLoadUri;
+	}
+}

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/browser_debug.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/iCalendar.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/iCalendar.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/iCalendar.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/iCalendar.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,805 @@
+dojo.provide("dojo.cal.iCalendar");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.text.textDirectory");
+dojo.require("dojo.date.common");
+dojo.require("dojo.date.serialize");
+
+
+dojo.cal.iCalendar.fromText =  function (/* string */text) {
+	// summary
+	// Parse text of an iCalendar and return an array of iCalendar objects
+
+	var properties = dojo.cal.textDirectory.tokenise(text);
+	var calendars = [];
+
+	//dojo.debug("Parsing iCal String");
+	for (var i = 0, begun = false; i < properties.length; i++) {
+		var prop = properties[i];
+		if (!begun) {
+			if (prop.name == 'BEGIN' && prop.value == 'VCALENDAR') {
+				begun = true;
+				var calbody = [];
+			}
+		} else if (prop.name == 'END' && prop.value == 'VCALENDAR') {
+			calendars.push(new dojo.cal.iCalendar.VCalendar(calbody));
+			begun = false;
+		} else {
+			calbody.push(prop);
+		}
+	}
+	return /* array */calendars;
+}
+
+
+dojo.cal.iCalendar.Component = function (/* string */ body ) {
+	// summary
+	// A component is the basic container of all this stuff. 
+
+	if (!this.name) {
+		this.name = "COMPONENT"
+	}
+
+	this.properties = [];
+	this.components = [];
+
+	if (body) {
+		for (var i = 0, context = ''; i < body.length; i++) {
+			if (context == '') {
+				if (body[i].name == 'BEGIN') {
+					context = body[i].value;
+					var childprops = [];
+				} else {
+					this.addProperty(new dojo.cal.iCalendar.Property(body[i]));
+				}
+			} else if (body[i].name == 'END' && body[i].value == context) {
+				if (context=="VEVENT") {
+					this.addComponent(new dojo.cal.iCalendar.VEvent(childprops));
+				} else if (context=="VTIMEZONE") {
+					this.addComponent(new dojo.cal.iCalendar.VTimeZone(childprops));
+				} else if (context=="VTODO") {
+					this.addComponent(new dojo.cal.iCalendar.VTodo(childprops));
+				} else if (context=="VJOURNAL") {
+					this.addComponent(new dojo.cal.iCalendar.VJournal(childprops));
+				} else if (context=="VFREEBUSY") {
+					this.addComponent(new dojo.cal.iCalendar.VFreeBusy(childprops));
+				} else if (context=="STANDARD") {
+					this.addComponent(new dojo.cal.iCalendar.Standard(childprops));
+				} else if (context=="DAYLIGHT") {
+					this.addComponent(new dojo.cal.iCalendar.Daylight(childprops));
+				} else if (context=="VALARM") {
+					this.addComponent(new dojo.cal.iCalendar.VAlarm(childprops));
+				}else {
+					dojo.unimplemented("dojo.cal.iCalendar." + context);
+				}
+				context = '';
+			} else {
+				childprops.push(body[i]);
+			}
+		}
+
+		if (this._ValidProperties) {
+			this.postCreate();
+		}
+	}
+}
+
+dojo.extend(dojo.cal.iCalendar.Component, {
+
+	addProperty: function (prop) {
+		// summary
+		// push a new property onto a component.
+		this.properties.push(prop);
+		this[prop.name.toLowerCase()] = prop;
+	},
+
+	addComponent: function (prop) {
+		// summary
+		// add a component to this components list of children.
+		this.components.push(prop);
+	},
+
+	postCreate: function() {
+		for (var x=0; x<this._ValidProperties.length; x++) {
+			var evtProperty = this._ValidProperties[x];
+			var found = false;
+	
+			for (var y=0; y<this.properties.length; y++) {	
+				var prop = this.properties[y];
+				var propName = prop.name.toLowerCase();
+				if (dojo.lang.isArray(evtProperty)) {
+
+					var alreadySet = false;
+					for (var z=0; z<evtProperty.length; z++) {
+						var evtPropertyName = evtProperty[z].name.toLowerCase();
+						if((this[evtPropertyName])  && (evtPropertyName != propName )) {
+							alreadySet=true;
+						} 
+					}
+					if (!alreadySet) {
+						this[propName] = prop;
+					}
+				} else {
+					if (propName == evtProperty.name.toLowerCase()) {
+						found = true;
+						if (evtProperty.occurance == 1){
+							this[propName] = prop;
+						} else {
+							found = true;
+							if (!dojo.lang.isArray(this[propName])) {
+							 	this[propName] = [];
+							}
+							this[propName].push(prop);
+						}
+					}
+				}
+			}
+
+			if (evtProperty.required && !found) {	
+				dojo.debug("iCalendar - " + this.name + ": Required Property not found: " + evtProperty.name);
+			}
+		}
+
+		// parse any rrules		
+		if (dojo.lang.isArray(this.rrule)) {
+			for(var x=0; x<this.rrule.length; x++) {
+				var rule = this.rrule[x].value;
+
+				//add a place to cache dates we have checked for recurrance
+				this.rrule[x].cache = function() {};
+				
+				var temp = rule.split(";");
+				for (var y=0; y<temp.length; y++) {
+					var pair = temp[y].split("=");
+					var key = pair[0].toLowerCase();
+					var val = pair[1];
+
+					if ((key == "freq") || (key=="interval") || (key=="until")) {
+						this.rrule[x][key]= val;
+					} else {
+						var valArray = val.split(",");
+						this.rrule[x][key] = valArray; 
+					}
+				}	
+			}
+			this.recurring = true;
+		}
+
+	}, 
+
+	toString: function () {
+		// summary
+		// output a string representation of this component.
+		return "[iCalendar.Component; " + this.name + ", " + this.properties.length +
+			" properties, " + this.components.length + " components]";
+	}
+});
+
+dojo.cal.iCalendar.Property = function (prop) {
+	// summary
+	// A single property of a component.
+
+	// unpack the values
+	this.name = prop.name;
+	this.group = prop.group;
+	this.params = prop.params;
+	this.value = prop.value;
+
+}
+
+dojo.extend(dojo.cal.iCalendar.Property, {
+	toString: function () {	
+		// summary
+		// output a string reprensentation of this component.
+		return "[iCalenday.Property; " + this.name + ": " + this.value + "]";
+	}
+});
+
+// This is just a little helper function for the Component Properties
+var _P = function (n, oc, req) {
+	return {name: n, required: (req) ? true : false,
+		occurance: (oc == '*' || !oc) ? -1 : oc}
+}
+
+/*
+ * VCALENDAR
+ */
+
+dojo.cal.iCalendar.VCalendar = function (/* string */ calbody) {
+	// summary
+	// VCALENDAR Component
+
+	this.name = "VCALENDAR";
+	this.recurring = [];
+	this.nonRecurringEvents = function(){};
+	dojo.cal.iCalendar.Component.call(this, calbody);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VCalendar, dojo.cal.iCalendar.Component);
+
+dojo.extend(dojo.cal.iCalendar.VCalendar, {
+
+	addComponent: function (prop) {
+		// summary
+		// add component to the calenadar that makes it easy to pull them out again later.
+		this.components.push(prop);
+		if (prop.name.toLowerCase() == "vevent") {
+			if (prop.rrule) {
+				this.recurring.push(prop);
+			} else {
+				var startDate = prop.getDate();
+				var month = startDate.getMonth() + 1;
+				var dateString= month + "-" + startDate.getDate() + "-" + startDate.getFullYear();
+				if (!dojo.lang.isArray(this[dateString])) {
+					this.nonRecurringEvents[dateString] = [];
+				}
+				this.nonRecurringEvents[dateString].push(prop);
+			}
+		}
+	},
+
+	preComputeRecurringEvents: function(until) {
+		var calculatedEvents = function(){};
+
+		for(var x=0; x<this.recurring.length; x++) {
+			var dates = this.recurring[x].getDates(until);
+			for (var y=0; y<dates.length;y++) {
+				var month = dates[y].getMonth() + 1;
+				var dateStr = month + "-" + dates[y].getDate() + "-" + dates[y].getFullYear();
+				if (!dojo.lang.isArray(calculatedEvents[dateStr])) {
+					calculatedEvents[dateStr] = [];
+				}
+
+				if (!dojo.lang.inArray(calculatedEvents[dateStr], this.recurring[x])) { 
+					calculatedEvents[dateStr].push(this.recurring[x]);
+				} 
+			}
+		}
+		this.recurringEvents = calculatedEvents;
+	
+	},
+
+	getEvents: function(/* Date */ date) {
+		// summary
+		// Gets all events occuring on a particular date
+		var events = [];
+		var recur = [];
+		var nonRecur = [];
+		var month = date.getMonth() + 1;
+		var dateStr= month + "-" + date.getDate() + "-" + date.getFullYear();
+		if (dojo.lang.isArray(this.nonRecurringEvents[dateStr])) {
+			nonRecur= this.nonRecurringEvents[dateStr];
+			dojo.debug("Number of nonRecurring Events: " + nonRecur.length);
+		} 
+		
+
+		if (dojo.lang.isArray(this.recurringEvents[dateStr])) {
+			recur= this.recurringEvents[dateStr];
+		} 
+
+		events = recur.concat(nonRecur);
+
+		if (events.length > 0) {
+			return events;
+		} 
+
+		return null;			
+	}
+});
+
+/*
+ * STANDARD
+ */
+
+var StandardProperties = [
+	_P("dtstart", 1, true), _P("tzoffsetto", 1, true), _P("tzoffsetfrom", 1, true),
+	_P("comment"), _P("rdate"), _P("rrule"), _P("tzname")
+];
+
+
+dojo.cal.iCalendar.Standard = function (/* string */ body) {
+	// summary
+	// STANDARD Component
+
+	this.name = "STANDARD";
+	this._ValidProperties = StandardProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.Standard, dojo.cal.iCalendar.Component);
+
+/*
+ * DAYLIGHT
+ */
+
+var DaylightProperties = [
+	_P("dtstart", 1, true), _P("tzoffsetto", 1, true), _P("tzoffsetfrom", 1, true),
+	_P("comment"), _P("rdate"), _P("rrule"), _P("tzname")
+];
+
+dojo.cal.iCalendar.Daylight = function (/* string */ body) {
+	// summary
+	// Daylight Component
+	this.name = "DAYLIGHT";
+	this._ValidProperties = DaylightProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.Daylight, dojo.cal.iCalendar.Component);
+
+/*
+ * VEVENT
+ */
+
+var VEventProperties = [
+	// these can occur once only
+	_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1),
+	_P("geo", 1), _P("last-mod", 1), _P("location", 1), _P("organizer", 1),
+	_P("priority", 1), _P("dtstamp", 1), _P("seq", 1), _P("status", 1),
+	_P("summary", 1), _P("transp", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1),
+	// these two are exclusive
+	[_P("dtend", 1), _P("duration", 1)],
+	// these can occur many times over
+	_P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"),
+	_P("exdate"), _P("exrule"), _P("rstatus"), _P("related"), _P("resources"),
+	_P("rdate"), _P("rrule")
+];
+
+dojo.cal.iCalendar.VEvent = function (/* string */ body) {
+	// summary 
+	// VEVENT Component
+	this._ValidProperties = VEventProperties;
+	this.name = "VEVENT";
+	dojo.cal.iCalendar.Component.call(this, body);
+	this.recurring = false;
+	this.startDate = dojo.date.fromIso8601(this.dtstart.value);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VEvent, dojo.cal.iCalendar.Component);
+
+dojo.extend(dojo.cal.iCalendar.VEvent, {
+		getDates: function(until) {
+			var dtstart = this.getDate();
+
+			var recurranceSet = [];
+			var weekdays=["su","mo","tu","we","th","fr","sa"];
+			var order = { 
+				"daily": 1, "weekly": 2, "monthly": 3, "yearly": 4,
+				"byday": 1, "bymonthday": 1, "byweekno": 2, "bymonth": 3, "byyearday": 4};
+
+			// expand rrules into the recurrance 
+			for (var x=0; x<this.rrule.length; x++) {
+				var rrule = this.rrule[x];
+				var freq = rrule.freq.toLowerCase();
+				var interval = 1;
+
+				if (rrule.interval > interval) {
+					interval = rrule.interval;
+				}
+
+				var set = [];
+				var freqInt = order[freq];
+
+				if (rrule.until) {
+					var tmpUntil = dojo.date.fromIso8601(rrule.until);
+				} else {
+					var tmpUntil = until
+				}
+
+				if (tmpUntil > until) {
+					tmpUntil = until
+				}
+
+
+				if (dtstart<tmpUntil) {
+
+					var expandingRules = function(){};
+					var cullingRules = function(){};
+					expandingRules.length=0;
+					cullingRules.length =0;
+
+					switch(freq) {
+						case "yearly":
+							var nextDate = new Date(dtstart);
+							set.push(nextDate);
+							while(nextDate < tmpUntil) {
+								nextDate.setYear(nextDate.getFullYear()+interval);
+								tmpDate = new Date(nextDate);
+								if(tmpDate < tmpUntil) {
+									set.push(tmpDate);
+								}
+							}
+							break;
+						case "monthly":
+							nextDate = new Date(dtstart);
+							set.push(nextDate);
+							while(nextDate < tmpUntil) {
+								nextDate.setMonth(nextDate.getMonth()+interval);
+								var tmpDate = new Date(nextDate);
+								if (tmpDate < tmpUntil) {
+									set.push(tmpDate);
+								}
+							}
+							break;
+						case "weekly":
+							nextDate = new Date(dtstart);
+							set.push(nextDate);
+							while(nextDate < tmpUntil) {
+								nextDate.setDate(nextDate.getDate()+(7*interval));
+								var tmpDate = new Date(nextDate);
+								if (tmpDate < tmpUntil) {
+									set.push(tmpDate);
+								}
+							}
+							break;	
+						case "daily":
+							nextDate = new Date(dtstart);
+							set.push(nextDate);
+							while(nextDate < tmpUntil) {
+								nextDate.setDate(nextDate.getDate()+interval);
+								var tmpDate = new Date(nextDate);
+								if (tmpDate < tmpUntil) {
+									set.push(tmpDate);
+								}
+							}
+							break;
+	
+					}
+
+					if ((rrule["bymonth"]) && (order["bymonth"]<freqInt))	{
+						for (var z=0; z<rrule["bymonth"].length; z++) {
+							if (z==0) {
+								for (var zz=0; zz < set.length; zz++) {
+									set[zz].setMonth(rrule["bymonth"][z]-1);
+								}
+							} else {
+								var subset=[];
+								for (var zz=0; zz < set.length; zz++) {
+									var newDate = new Date(set[zz]);
+									newDate.setMonth(rrule[z]);
+									subset.push(newDate);
+								}
+								tmp = set.concat(subset);
+								set = tmp;
+							}
+						}
+					}
+
+					
+					// while the spec doesn't prohibit it, it makes no sense to have a bymonth and a byweekno at the same time
+					// and if i'm wrong then i don't know how to apply that rule.  This is also documented elsewhere on the web
+					if (rrule["byweekno"] && !rrule["bymonth"]) {	
+						dojo.debug("TODO: no support for byweekno yet");
+					}
+
+
+					// while the spec doesn't prohibit it, it makes no sense to have a bymonth and a byweekno at the same time
+					// and if i'm wrong then i don't know how to apply that rule.  This is also documented elsewhere on the web
+					if (rrule["byyearday"] && !rrule["bymonth"] && !rrule["byweekno"] ) {	
+						if (rrule["byyearday"].length > 1) {
+							var regex = "([+-]?)([0-9]{1,3})";
+							for (var z=1; x<rrule["byyearday"].length; z++) {
+								var regexResult = rrule["byyearday"][z].match(regex);
+								if (z==1) {
+									for (var zz=0; zz < set.length; zz++) {
+										if (regexResult[1] == "-") {
+											dojo.date.setDayOfYear(set[zz],366-regexResult[2]);
+										} else {
+											dojo.date.setDayOfYear(set[zz],regexResult[2]);
+										}
+									}
+								}	else {
+									var subset=[];
+									for (var zz=0; zz < set.length; zz++) {
+										var newDate = new Date(set[zz]);
+										if (regexResult[1] == "-") {
+											dojo.date.setDayOfYear(newDate,366-regexResult[2]);
+										} else {
+											dojo.date.setDayOfYear(newDate,regexResult[2]);
+										}
+										subset.push(newDate);
+									}
+									tmp = set.concat(subset);
+									set = tmp;
+								}
+							}
+						}
+					}
+
+					if (rrule["bymonthday"]  && (order["bymonthday"]<freqInt)) {	
+						if (rrule["bymonthday"].length > 0) {
+							var regex = "([+-]?)([0-9]{1,3})";
+							for (var z=0; z<rrule["bymonthday"].length; z++) {
+								var regexResult = rrule["bymonthday"][z].match(regex);
+								if (z==0) {
+									for (var zz=0; zz < set.length; zz++) {
+										if (regexResult[1] == "-") {
+											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+												set[zz].setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]);
+											}
+										} else {
+											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+												set[zz].setDate(regexResult[2]);
+											}
+										}
+									}
+								}	else {
+									var subset=[];
+									for (var zz=0; zz < set.length; zz++) {
+										var newDate = new Date(set[zz]);
+										if (regexResult[1] == "-") {
+											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+												newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]);
+											}
+										} else {
+											if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+												newDate.setDate(regexResult[2]);
+											}
+										}
+										subset.push(newDate);
+									}
+									tmp = set.concat(subset);
+									set = tmp;
+								}
+							}
+						}
+					}
+
+					if (rrule["byday"]  && (order["byday"]<freqInt)) {	
+						if (rrule["bymonth"]) {
+							if (rrule["byday"].length > 0) {
+								var regex = "([+-]?)([0-9]{0,1}?)([A-Za-z]{1,2})";
+								for (var z=0; z<rrule["byday"].length; z++) {
+									var regexResult = rrule["byday"][z].match(regex);
+									var occurance = regexResult[2];
+									var day = regexResult[3].toLowerCase();
+
+
+									if (z==0) {
+										for (var zz=0; zz < set.length; zz++) {
+											if (regexResult[1] == "-") {
+												//find the nth to last occurance of date 
+												var numDaysFound = 0;
+												var lastDayOfMonth = dojo.date.getDaysInMonth(set[zz]);
+												var daysToSubtract = 1;
+												set[zz].setDate(lastDayOfMonth); 
+												if (weekdays[set[zz].getDay()] == day) {
+													numDaysFound++;
+													daysToSubtract=7;
+												}
+												daysToSubtract = 1;
+												while (numDaysFound < occurance) {
+													set[zz].setDate(set[zz].getDate()-daysToSubtract);	
+													if (weekdays[set[zz].getDay()] == day) {
+														numDaysFound++;
+														daysToSubtract=7;	
+													}
+												}
+											} else {
+												if (occurance) {
+													var numDaysFound=0;
+													set[zz].setDate(1);
+													var daysToAdd=1;
+
+													if(weekdays[set[zz].getDay()] == day) {
+														numDaysFound++;
+														daysToAdd=7;
+													}
+
+													while(numDaysFound < occurance) {
+														set[zz].setDate(set[zz].getDate()+daysToAdd);
+														if(weekdays[set[zz].getDay()] == day) {
+															numDaysFound++;
+															daysToAdd=7;
+														}
+													}
+												} else {
+													//we're gonna expand here to add a date for each of the specified days for each month
+													var numDaysFound=0;
+													var subset = [];
+
+													lastDayOfMonth = new Date(set[zz]);
+													var daysInMonth = dojo.date.getDaysInMonth(set[zz]);
+													lastDayOfMonth.setDate(daysInMonth);
+
+													set[zz].setDate(1);
+												
+													if (weekdays[set[zz].getDay()] == day) {
+														numDaysFound++;
+													}
+													var tmpDate = new Date(set[zz]);
+													daysToAdd = 1;
+													while(tmpDate.getDate() < lastDayOfMonth) {
+														if (weekdays[tmpDate.getDay()] == day) {
+															numDaysFound++;
+															if (numDaysFound==1) {
+																set[zz] = tmpDate;
+															} else {
+																subset.push(tmpDate);
+																tmpDate = new Date(tmpDate);
+																daysToAdd=7;	
+																tmpDate.setDate(tmpDate.getDate() + daysToAdd);
+															}
+														} else {
+															tmpDate.setDate(tmpDate.getDate() + daysToAdd);
+														}
+													}
+													var t = set.concat(subset);
+													set = t; 
+												}
+											}
+										}
+									}	else {
+										var subset=[];
+										for (var zz=0; zz < set.length; zz++) {
+											var newDate = new Date(set[zz]);
+											if (regexResult[1] == "-") {
+												if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+													newDate.setDate(dojo.date.getDaysInMonth(set[zz]) - regexResult[2]);
+												}
+											} else {
+												if (regexResult[2] < dojo.date.getDaysInMonth(set[zz])) {
+													newDate.setDate(regexResult[2]);
+												}
+											}
+											subset.push(newDate);
+										}
+										tmp = set.concat(subset);
+										set = tmp;
+									}
+								}
+							}
+						} else {
+							dojo.debug("TODO: byday within a yearly rule without a bymonth");
+						}
+					}
+
+					dojo.debug("TODO: Process BYrules for units larger than frequency");
+			
+					//add this set of events to the complete recurranceSet	
+					var tmp = recurranceSet.concat(set);
+					recurranceSet = tmp;
+				}
+			}
+
+			// TODO: add rdates to the recurrance set here
+
+			// TODO: subtract exdates from the recurrance set here
+
+			//TODO:  subtract dates generated by exrules from recurranceSet here
+
+			recurranceSet.push(dtstart);
+			return recurranceSet;
+		},
+
+		getDate: function() {
+			return dojo.date.fromIso8601(this.dtstart.value);
+		}
+});
+
+/*
+ * VTIMEZONE
+ */
+
+var VTimeZoneProperties = [
+	_P("tzid", 1, true), _P("last-mod", 1), _P("tzurl", 1)
+
+	// one of 'standardc' or 'daylightc' must occur
+	// and each may occur more than once.
+];
+
+dojo.cal.iCalendar.VTimeZone = function (/* string */ body) {
+	// summary
+	// VTIMEZONE Component
+	this.name = "VTIMEZONE";
+	this._ValidProperties = VTimeZoneProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VTimeZone, dojo.cal.iCalendar.Component);
+
+/*
+ * VTODO
+ */
+
+var VTodoProperties = [
+	// these can occur once only
+	_P("class", 1), _P("completed", 1), _P("created", 1), _P("description", 1),
+	_P("dtstart", 1), _P("geo", 1), _P("last-mod", 1), _P("location", 1),
+	_P("organizer", 1), _P("percent", 1), _P("priority", 1), _P("dtstamp", 1),
+	_P("seq", 1), _P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1),
+	_P("recurid", 1),
+	// these two are exclusive
+	[_P("due", 1), _P("duration", 1)],
+	// these can occur many times over
+	_P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"),
+	_P("exdate"), _P("exrule"), _P("rstatus"), _P("related"), _P("resources"),
+	_P("rdate"), _P("rrule")
+];
+
+dojo.cal.iCalendar.VTodo= function (/* string */ body) {
+	// summary
+	// VTODO Componenet
+	this.name = "VTODO";
+	this._ValidProperties = VTodoProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VTodo, dojo.cal.iCalendar.Component);
+
+/*
+ * VJOURNAL
+ */
+
+var VJournalProperties = [
+	// these can occur once only
+	_P("class", 1), _P("created", 1), _P("description", 1), _P("dtstart", 1),
+	_P("last-mod", 1), _P("organizer", 1), _P("dtstamp", 1), _P("seq", 1),
+	_P("status", 1), _P("summary", 1), _P("uid", 1), _P("url", 1), _P("recurid", 1),
+	// these can occur many times over
+	_P("attach"), _P("attendee"), _P("categories"), _P("comment"), _P("contact"),
+	_P("exdate"), _P("exrule"), _P("related"), _P("rstatus"), _P("rdate"), _P("rrule")
+];
+
+dojo.cal.iCalendar.VJournal= function (/* string */ body) {
+	// summary
+	// VJOURNAL Component
+	this.name = "VJOURNAL";
+	this._ValidProperties = VJournalProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VJournal, dojo.cal.iCalendar.Component);
+
+/*
+ * VFREEBUSY
+ */
+
+var VFreeBusyProperties = [
+	// these can occur once only
+	_P("contact"), _P("dtstart", 1), _P("dtend"), _P("duration"),
+	_P("organizer", 1), _P("dtstamp", 1), _P("uid", 1), _P("url", 1),
+	// these can occur many times over
+	_P("attendee"), _P("comment"), _P("freebusy"), _P("rstatus")
+];
+
+dojo.cal.iCalendar.VFreeBusy= function (/* string */ body) {
+	// summary
+	// VFREEBUSY Component
+	this.name = "VFREEBUSY";
+	this._ValidProperties = VFreeBusyProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VFreeBusy, dojo.cal.iCalendar.Component);
+
+/*
+ * VALARM
+ */
+
+var VAlarmProperties = [
+	[_P("action", 1, true), _P("trigger", 1, true), [_P("duration", 1), _P("repeat", 1)],
+	_P("attach", 1)],
+
+	[_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true),
+	[_P("duration", 1), _P("repeat", 1)]],
+
+	[_P("action", 1, true), _P("description", 1, true), _P("trigger", 1, true),
+	_P("summary", 1, true), _P("attendee", "*", true),
+	[_P("duration", 1), _P("repeat", 1)],
+	_P("attach", 1)],
+
+	[_P("action", 1, true), _P("attach", 1, true), _P("trigger", 1, true),
+	[_P("duration", 1), _P("repeat", 1)],
+	_P("description", 1)],
+];
+
+dojo.cal.iCalendar.VAlarm= function (/* string */ body) {
+	// summary
+	// VALARM Component
+	this.name = "VALARM";
+	this._ValidProperties = VAlarmProperties;
+	dojo.cal.iCalendar.Component.call(this, body);
+}
+
+dojo.inherits(dojo.cal.iCalendar.VAlarm, dojo.cal.iCalendar.Component);
+

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/iCalendar.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/textDirectory.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/textDirectory.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/textDirectory.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/textDirectory.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,65 @@
+dojo.provide("dojo.cal.textDirectory");
+dojo.require("dojo.string");
+
+/*
+ * This class parses a single line from a text/directory file
+ * and returns an object with four named values; name, group, params
+ * and value. name, group and value are strings containing the original
+ * tokens unaltered and values is an array containing name/value pairs
+ * or a single name token packed into arrays.
+ */
+dojo.cal.textDirectory.Property = function (line) {
+	// split into name/value pair
+	var left = dojo.string.trim(line.substring(0, line.indexOf(':')));
+	var right = dojo.string.trim(line.substr(line.indexOf(':') + 1));
+
+	// seperate name and paramters	
+	var parameters = dojo.string.splitEscaped(left,';');
+	this.name = parameters[0]
+	parameters.splice(0, 1);
+
+	// parse paramters
+	this.params = [];
+	for (var i = 0; i < parameters.length; i++) {
+		var arr = parameters[i].split("=");
+		var key = dojo.string.trim(arr[0].toUpperCase());
+		
+		if (arr.length == 1) { this.params.push([key]); continue; }
+		
+		var values = dojo.string.splitEscaped(arr[1],',');
+		for (var j = 0; j < values.length; j++) {
+			if (dojo.string.trim(values[j]) != '') {
+				this.params.push([key, dojo.string.trim(values[j])]);
+			}
+		}
+	}
+
+	// seperate group
+	if (this.name.indexOf('.') > 0) {
+		var arr = this.name.split('.');
+		this.group = arr[0];
+		this.name = arr[1];
+	}
+	
+	// don't do any parsing, leave to implementation
+	this.value = right;
+}
+
+
+// tokeniser, parses into an array of properties.
+dojo.cal.textDirectory.tokenise = function (text) {
+	// normlize to one propterty per line and parse
+	var nText = dojo.string.normalizeNewlines(text,"\n");
+	nText = nText.replace(/\n[ \t]/g, '');
+	nText = nText.replace(/\x00/g, '');
+		
+	var lines = nText.split("\n");
+	var properties = []
+
+	for (var i = 0; i < lines.length; i++) {
+		if (dojo.string.trim(lines[i]) == '') { continue; }
+		var prop = new dojo.cal.textDirectory.Property(lines[i]);
+		properties.push(prop);
+	}
+	return properties;
+}

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/cal/textDirectory.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Axis.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Axis.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Axis.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Axis.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,136 @@
+dojo.provide("dojo.charting.Axis");
+dojo.require("dojo.lang.common");
+
+dojo.charting.Axis = function(/* string? */label, /* string? */scale, /* array? */labels){
+	var id = "dojo-charting-axis-"+dojo.charting.Axis.count++;
+	this.getId=function(){ return id; };
+	this.setId=function(key){ id = key; };
+	this.scale = scale || "linear";		//	linear || log
+	this.label = label || "";
+	this.showLabel = true;		//	show axis label.
+	this.showLabels = true;		//	show interval ticks.
+	this.showLines = false;		//	if you want lines over the range of the plot area
+	this.showTicks = false;		//	if you want tick marks on the axis.
+	this.range = { upper : 0, lower : 0 };	//	range of individual axis.
+	this.origin = "min"; 			//	this can be any number, "min" or "max". min/max is translated on init.
+
+	this.labels = labels || [];
+	this._labels = [];	//	what we really use to draw things.
+	this.nodes={ main: null, axis: null, label: null, labels: null, lines: null, ticks: null };
+};
+dojo.charting.Axis.count = 0;
+
+dojo.extend(dojo.charting.Axis, {
+	//	TODO: implement log scaling.
+	getCoord: function(
+		/* float */val, 
+		/* dojo.charting.PlotArea */plotArea, 
+		/* dojo.charting.Plot */plot
+	){
+		//	summary
+		//	returns the coordinate of val based on this axis range, plot area and plot.
+		val = parseFloat(val, 10);
+		var area = plotArea.getArea();
+		if(plot.axisX == this){
+			var offset = 0 - this.range.lower;
+			var min = this.range.lower + offset;	//	FIXME: check this.
+			var max = this.range.upper + offset;
+			val += offset;
+			return (val*((area.right-area.left)/max))+area.left;	//	float
+		} else {
+			var max = this.range.upper;
+			var min = this.range.lower;
+			var offset = 0;
+			if(min<0){
+				offset += Math.abs(min);
+			}
+			max += offset; min += offset; val += offset;
+			var pmin = area.bottom;
+			var pmax = area.top;
+			return (((pmin-pmax)/(max-min))*(max-val))+pmax;
+		}
+	},
+	initializeOrigin: function(drawAgainst, plane){
+		//	figure out the origin value.
+		if(isNaN(this.origin)){
+			if(this.origin.toLowerCase() == "max"){ 
+				this.origin = drawAgainst.range[(plane=="y")?"upper":"lower"]; 
+			}
+			else if (this.origin.toLowerCase() == "min"){ 
+				this.origin = drawAgainst.range[(plane=="y")?"lower":"upper"]; 
+			}
+			else { this.origin=0; }
+		}
+	},
+	initializeLabels: function(){
+		//	Translate the labels if needed.
+		if(this.labels.length == 0){
+			this.showLabels = false;
+			this.showLines = false;
+			this.showTicks = false;
+		} else {
+			if(this.labels[0].label && this.labels[0].value != null){
+				for(var i=0; i<this.labels.length; i++){
+					this._labels.push(this.labels[i]);
+				}
+			}
+			else if(!isNaN(this.labels[0])){
+				for(var i=0; i<this.labels.length; i++){
+					this._labels.push({ label: this.labels[i], value: this.labels[i] });
+				}
+			}
+			else {
+				// clone me
+				var a = [];
+				for(var i=0; i<this.labels.length; i++){
+					a.push(this.labels[i]);
+				}
+
+				//	do the bottom one.
+				var s=a.shift();
+				this._labels.push({ label: s, value: this.range.lower });
+
+				//	do the top one.
+				if(a.length>0){
+					var s=a.pop();
+					this._labels.push({ label: s, value: this.range.upper });
+				}
+				//	do the rest.
+				if(a.length>0){
+					var range = this.range.upper - this.range.lower;
+					var step = range / (this.labels.length-1);
+					for(var i=1; i<=a.length; i++){
+						this._labels.push({
+							label: a[i-1],
+							value: this.range.lower+(step*i)
+						});
+					}
+				}
+			}
+		}
+	},
+	initialize: function(plotArea, plot, drawAgainst, plane){
+		//	summary
+		//	Initialize the passed axis descriptor.  Note that this should always
+		//	be the result of plotArea.getAxes, and not the axis directly!
+		this.destroy();
+		this.initializeOrigin(drawAgainst, plane);
+		this.initializeLabels();
+		var node = this.render(plotArea, plot, drawAgainst, plane);
+		return node;
+	},
+	destroy: function(){
+		for(var p in this.nodes){
+			while(this.nodes[p] && this.nodes[p].childNodes.length > 0){
+				this.nodes[p].removeChild(this.nodes[p].childNodes[0]);
+			}
+			if(this.nodes[p] && this.nodes[p].parentNode){
+				this.nodes[p].parentNode.removeChild(this.nodes[p]);
+			}
+			this.nodes[p] = null;
+		}
+	}
+});
+
+dojo["requireIf"](dojo.render.svg.capable, "dojo.charting.svg.Axis");
+dojo["requireIf"](!dojo.render.svg.capable && dojo.render.vml.capable, "dojo.charting.vml.Axis");

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Axis.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Chart.js
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Chart.js?view=auto&rev=473755
==============================================================================
--- jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Chart.js (added)
+++ jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Chart.js Sat Nov 11 08:44:22 2006
@@ -0,0 +1,75 @@
+dojo.provide("dojo.charting.Chart");
+dojo.require("dojo.lang.common");
+dojo.require("dojo.charting.PlotArea");
+
+dojo.charting.Chart = function(
+	/* HTMLElement? */node, 
+	/* string? */title, 
+	/* string? */description
+){
+	//	summary
+	//	Create the basic Chart object.
+	this.node = node || null;
+	this.title = title || "Chart";			//	pure string.
+	this.description = description || "";	//	HTML is allowed.
+	this.plotAreas = [];
+};
+
+dojo.extend(dojo.charting.Chart, {
+	//	methods
+	addPlotArea: function(/* object */obj, /* bool? */doRender){
+		//	summary
+		//	Add a PlotArea to this chart; object should be in the
+		//	form of: { plotArea, (x, y) or (top, left) }
+		if(obj.x && !obj.left){ obj.left = obj.x; }
+		if(obj.y && !obj.top){ obj.top = obj.y; }
+		this.plotAreas.push(obj);
+		if(doRender){ this.render(); }
+	},
+	
+	//	events
+	onInitialize:function(chart){ },
+	onRender:function(chart){ },
+	onDestroy:function(chart){ },
+
+	//	standard build methods
+	initialize: function(){
+		//	summary
+		//	Initialize the Chart by rendering it.
+		if(!this.node){ 
+			dojo.raise("dojo.charting.Chart.initialize: there must be a root node defined for the Chart."); 
+		}
+		this.destroy();
+		this.render();
+		this.onInitialize(this);
+	},
+	render:function(){
+		//	summary
+		//	Render the chart in its entirety.
+		if(this.node.style.position != "absolute"){
+			this.node.style.position = "relative";
+		}
+		for(var i=0; i<this.plotAreas.length; i++){
+			var area = this.plotAreas[i].plotArea;
+			var node = area.initialize();
+			node.style.position = "absolute";
+			node.style.top = this.plotAreas[i].top + "px";
+			node.style.left = this.plotAreas[i].left + "px";
+			this.node.appendChild(node);
+			area.render();
+		}
+	},
+	destroy: function(){
+		//	summary
+		//	Destroy any nodes that have maintained references.
+
+		//	kill any existing plotAreas
+		for(var i=0; i<this.plotAreas.length; i++){
+			this.plotAreas[i].plotArea.destroy();
+		};
+		//	clean out any child nodes.
+		while(this.node && this.node.childNodes && this.node.childNodes.length > 0){ 
+			this.node.removeChild(this.node.childNodes[0]); 
+		}
+	}
+});

Propchange: jackrabbit/trunk/contrib/jcr-browser/src/main/webapp/dojo/src/charting/Chart.js
------------------------------------------------------------------------------
    svn:eol-style = native