incubator-esme-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r726084 [4/6] - in /incubator/esme/trunk/server: ./ src/ src/main/ src/main/resources/ src/main/resources/props/ src/main/scala/ src/main/scala/bootstrap/ src/main/scala/bootstrap/liftweb/ src/main/scala/us/ src/main/scala/us/esme/ src/main...
Date Fri, 12 Dec 2008 18:32:22 GMT
Added: incubator/esme/trunk/server/src/main/webapp/scripts/jquery.blockUI.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/jquery.blockUI.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/jquery.blockUI.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/jquery.blockUI.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,361 @@
+/*
+ * jQuery blockUI plugin
+ * Version 1.33  (09/14/2007)
+ * @requires jQuery v1.1.1
+ *
+ * $Id$
+ *
+ * Examples at: http://malsup.com/jquery/block/
+ * Copyright (c) 2007 M. Alsup
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+ (function($) {
+/**
+ * blockUI provides a mechanism for blocking user interaction with a page (or parts of a page).
+ * This can be an effective way to simulate synchronous behavior during ajax operations without
+ * locking the browser.  It will prevent user operations for the current page while it is
+ * active ane will return the page to normal when it is deactivate.  blockUI accepts the following
+ * two optional arguments:
+ *
+ *   message (String|Element|jQuery): The message to be displayed while the UI is blocked. The message
+ *              argument can be a plain text string like "Processing...", an HTML string like
+ *              "<h1><img src="busy.gif" /> Please wait...</h1>", a DOM element, or a jQuery object.
+ *              The default message is "<h1>Please wait...</h1>"
+ *
+ *   css (Object):  Object which contains css property/values to override the default styles of
+ *              the message.  Use this argument if you wish to override the default
+ *              styles.  The css Object should be in a format suitable for the jQuery.css
+ *              function.  For example:
+ *              $.blockUI({
+ *                    backgroundColor: '#ff8',
+ *                    border: '5px solid #f00,
+ *                    fontWeight: 'bold'
+ *              });
+ *
+ * The default blocking message used when blocking the entire page is "<h1>Please wait...</h1>"
+ * but this can be overridden by assigning a value to $.blockUI.defaults.pageMessage in your
+ * own code.  For example:
+ *
+ *      $.blockUI.defaults.pageMessage = "<h1>Bitte Wartezeit</h1>";
+ *
+ * The default message styling can also be overridden.  For example:
+ *
+ *      $.extend($.blockUI.defaults.pageMessageCSS, { color: '#00a', backgroundColor: '#0f0' });
+ *
+ * The default styles work well for simple messages like "Please wait", but for longer messages
+ * style overrides may be necessary.
+ *
+ * @example  $.blockUI();
+ * @desc prevent user interaction with the page (and show the default message of 'Please wait...')
+ *
+ * @example  $.blockUI( { backgroundColor: '#f00', color: '#fff'} );
+ * @desc prevent user interaction and override the default styles of the message to use a white on red color scheme
+ *
+ * @example  $.blockUI('Processing...');
+ * @desc prevent user interaction and display the message "Processing..." instead of the default message
+ *
+ * @name blockUI
+ * @param String|jQuery|Element message Message to display while the UI is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.blockUI = function(msg, css, opts) {
+    $.blockUI.impl.install(window, msg, css, opts);
+};
+
+// expose version number so other plugins can interogate
+$.blockUI.version = 1.33;
+
+/**
+ * unblockUI removes the UI block that was put in place by blockUI
+ *
+ * @example  $.unblockUI();
+ * @desc unblocks the page
+ *
+ * @name unblockUI
+ * @cat Plugins/blockUI
+ */
+$.unblockUI = function(opts) {
+    $.blockUI.impl.remove(window, opts);
+};
+
+/**
+ * Blocks user interaction with the selected elements.  (Hat tip: Much of
+ * this logic comes from Brandon Aaron's bgiframe plugin.  Thanks, Brandon!)
+ * By default, no message is displayed when blocking elements.
+ *
+ * @example  $('div.special').block();
+ * @desc prevent user interaction with all div elements with the 'special' class.
+ *
+ * @example  $('div.special').block('Please wait');
+ * @desc prevent user interaction with all div elements with the 'special' class
+ * and show a message over the blocked content.
+ *
+ * @name block
+ * @type jQuery
+ * @param String|jQuery|Element message Message to display while the element is blocked
+ * @param Object css Style object to control look of the message
+ * @cat Plugins/blockUI
+ */
+$.fn.block = function(msg, css, opts) {
+    return this.each(function() {
+		if (!this.$pos_checked) {
+            if ($.css(this,"position") == 'static')
+                this.style.position = 'relative';
+            if ($.browser.msie) this.style.zoom = 1; // force 'hasLayout' in IE
+            this.$pos_checked = 1;
+        }
+        $.blockUI.impl.install(this, msg, css, opts);
+    });
+};
+
+/**
+ * Unblocks content that was blocked by "block()"
+ *
+ * @example  $('div.special').unblock();
+ * @desc unblocks all div elements with the 'special' class.
+ *
+ * @name unblock
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.unblock = function(opts) {
+    return this.each(function() {
+        $.blockUI.impl.remove(this, opts);
+    });
+};
+
+/**
+ * displays the first matched element in a "display box" above a page overlay.
+ *
+ * @example  $('#myImage').displayBox();
+ * @desc displays "myImage" element in a box
+ *
+ * @name displayBox
+ * @type jQuery
+ * @cat Plugins/blockUI
+ */
+$.fn.displayBox = function(css, fn, isFlash) {
+    var msg = this[0];
+    if (!msg) return;
+    var $msg = $(msg);
+    css = css || {};
+
+    var w = $msg.width()  || $msg.attr('width')  || css.width  || $.blockUI.defaults.displayBoxCSS.width;
+    var h = $msg.height() || $msg.attr('height') || css.height || $.blockUI.defaults.displayBoxCSS.height ;
+    if (w[w.length-1] == '%') {
+        var ww = document.documentElement.clientWidth || document.body.clientWidth;
+        w = parseInt(w) || 100;
+        w = (w * ww) / 100;
+    }
+    if (h[h.length-1] == '%') {
+        var hh = document.documentElement.clientHeight || document.body.clientHeight;
+        h = parseInt(h) || 100;
+        h = (h * hh) / 100;
+    }
+
+    var ml = '-' + parseInt(w)/2 + 'px';
+    var mt = '-' + parseInt(h)/2 + 'px';
+
+    // supress opacity on overlay if displaying flash content on mac/ff platform
+    var ua = navigator.userAgent.toLowerCase();
+    var opts = {
+        displayMode: fn || 1,
+        noalpha: isFlash && /mac/.test(ua) && /firefox/.test(ua)
+    };
+
+    $.blockUI.impl.install(window, msg, { width: w, height: h, marginTop: mt, marginLeft: ml }, opts);
+};
+
+
+// override these in your code to change the default messages and styles
+$.blockUI.defaults = {
+    // the message displayed when blocking the entire page
+    pageMessage:    '<h1>Please wait...</h1>',
+    // the message displayed when blocking an element
+    elementMessage: '', // none
+    // styles for the overlay iframe
+    overlayCSS:  { backgroundColor: '#fff', opacity: '0.5' },
+    // styles for the message when blocking the entire page
+    pageMessageCSS:    { width:'250px', margin:'-50px 0 0 -125px', top:'20%', left:'20%', textAlign:'center', color:'#000', backgroundColor:'#fff', border:'3px solid #aaa' },
+    // styles for the message when blocking an element
+    elementMessageCSS: { width:'250px', padding:'10px', textAlign:'center', backgroundColor:'#fff'},
+    // styles for the displayBox
+    displayBoxCSS: { width: '400px', height: '400px', top:'50%', left:'50%' },
+    // allow body element to be stetched in ie6
+    ie6Stretch: 1,
+    // supress tab nav from leaving blocking content?
+    allowTabToLeave: 0,
+    // Title attribute for overlay when using displayBox
+    closeMessage: 'Click to close',
+    // use fadeOut effect when unblocking (can be overridden on unblock call)
+    fadeOut:  1,
+    // fadeOut transition time in millis
+    fadeTime: 400
+};
+
+// the gory details
+$.blockUI.impl = {
+    box: null,
+    boxCallback: null,
+    pageBlock: null,
+    pageBlockEls: [],
+    op8: window.opera && window.opera.version() < 9,
+    ie6: $.browser.msie && /MSIE 6.0/.test(navigator.userAgent),
+    install: function(el, msg, css, opts) {
+        opts = opts || {};
+        this.boxCallback = typeof opts.displayMode == 'function' ? opts.displayMode : null;
+        this.box = opts.displayMode ? msg : null;
+        var full = (el == window);
+
+        // use logical settings for opacity support based on browser but allow overrides via opts arg
+        var noalpha = this.op8 || $.browser.mozilla && /Linux/.test(navigator.platform);
+        if (typeof opts.alphaOverride != 'undefined')
+            noalpha = opts.alphaOverride == 0 ? 1 : 0;
+
+        if (full && this.pageBlock) this.remove(window, {fadeOut:0});
+        // check to see if we were only passed the css object (a literal)
+        if (msg && typeof msg == 'object' && !msg.jquery && !msg.nodeType) {
+            css = msg;
+            msg = null;
+        }
+        msg = msg ? (msg.nodeType ? $(msg) : msg) : full ? $.blockUI.defaults.pageMessage : $.blockUI.defaults.elementMessage;
+        if (opts.displayMode)
+            var basecss = jQuery.extend({}, $.blockUI.defaults.displayBoxCSS);
+        else
+            var basecss = jQuery.extend({}, full ? $.blockUI.defaults.pageMessageCSS : $.blockUI.defaults.elementMessageCSS);
+        css = jQuery.extend(basecss, css || {});
+        var f = ($.browser.msie) ? $('<iframe class="blockUI" style="z-index:1000;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="javascript:false;"></iframe>')
+                                 : $('<div class="blockUI" style="display:none"></div>');
+        var w = $('<div class="blockUI" style="z-index:1001;cursor:wait;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>');
+        var m = full ? $('<div class="blockUI blockMsg" style="z-index:1002;cursor:wait;padding:0;position:fixed"></div>')
+                     : $('<div class="blockUI" style="display:none;z-index:1002;cursor:wait;position:absolute"></div>');
+        w.css('position', full ? 'fixed' : 'absolute');
+        if (msg) m.css(css);
+        if (!noalpha) w.css($.blockUI.defaults.overlayCSS);
+        if (this.op8) w.css({ width:''+el.clientWidth,height:''+el.clientHeight }); // lame
+        if ($.browser.msie) f.css('opacity','0.0');
+
+        $([f[0],w[0],m[0]]).appendTo(full ? 'body' : el);
+
+        // ie7 must use absolute positioning in quirks mode and to account for activex issues (when scrolling)
+        var expr = $.browser.msie && (!$.boxModel || $('object,embed', full ? null : el).length > 0);
+        if (this.ie6 || expr) {
+            // stretch content area if it's short
+            if (full && $.blockUI.defaults.ie6Stretch && $.boxModel)
+                $('html,body').css('height','100%');
+
+            // fix ie6 problem when blocked element has a border width
+            if ((this.ie6 || !$.boxModel) && !full) {
+                var t = this.sz(el,'borderTopWidth'), l = this.sz(el,'borderLeftWidth');
+                var fixT = t ? '(0 - '+t+')' : 0;
+                var fixL = l ? '(0 - '+l+')' : 0;
+            }
+
+            // simulate fixed position
+            $.each([f,w,m], function(i,o) {
+                var s = o[0].style;
+                s.position = 'absolute';
+                if (i < 2) {
+                    full ? s.setExpression('height','document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + "px"')
+                         : s.setExpression('height','this.parentNode.offsetHeight + "px"');
+                    full ? s.setExpression('width','jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"')
+                         : s.setExpression('width','this.parentNode.offsetWidth + "px"');
+                    if (fixL) s.setExpression('left', fixL);
+                    if (fixT) s.setExpression('top', fixT);
+                }
+                else {
+                    if (full) s.setExpression('top','(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"');
+                    s.marginTop = 0;
+                }
+            });
+        }
+        if (opts.displayMode) {
+            w.css('cursor','default').attr('title', $.blockUI.defaults.closeMessage);
+            m.css('cursor','default');
+            $([f[0],w[0],m[0]]).removeClass('blockUI').addClass('displayBox');
+            $().click($.blockUI.impl.boxHandler).bind('keypress', $.blockUI.impl.boxHandler);
+        }
+        else
+            this.bind(1, el);
+        m.append(msg).show();
+        if (msg.jquery) msg.show();
+        if (opts.displayMode) return;
+        if (full) {
+            this.pageBlock = m[0];
+            this.pageBlockEls = $(':input:enabled:visible',this.pageBlock);
+            setTimeout(this.focus, 20);
+        }
+        else this.center(m[0]);
+    },
+    remove: function(el, opts) {
+        var o = $.extend({}, $.blockUI.defaults, opts);
+        this.bind(0, el);
+        var full = el == window;
+        var els = full ? $('body').children().filter('.blockUI') : $('.blockUI', el);
+        if (full) this.pageBlock = this.pageBlockEls = null;
+
+        if (o.fadeOut) {
+            els.fadeOut(o.fadeTime, function() {
+                if (this.parentNode) this.parentNode.removeChild(this);
+            });
+        }
+        else els.remove();
+    },
+    boxRemove: function(el) {
+        $().unbind('click',$.blockUI.impl.boxHandler).unbind('keypress', $.blockUI.impl.boxHandler);
+        if (this.boxCallback)
+            this.boxCallback(this.box);
+        $('body .displayBox').hide().remove();
+    },
+    // event handler to suppress keyboard/mouse events when blocking
+    handler: function(e) {
+        if (e.keyCode && e.keyCode == 9) {
+            if ($.blockUI.impl.pageBlock && !$.blockUI.defaults.allowTabToLeave) {
+                var els = $.blockUI.impl.pageBlockEls;
+                var fwd = !e.shiftKey && e.target == els[els.length-1];
+                var back = e.shiftKey && e.target == els[0];
+                if (fwd || back) {
+                    setTimeout(function(){$.blockUI.impl.focus(back)},10);
+                    return false;
+                }
+            }
+        }
+        if ($(e.target).parents('div.blockMsg').length > 0)
+            return true;
+        return $(e.target).parents().children().filter('div.blockUI').length == 0;
+    },
+    boxHandler: function(e) {
+        if ((e.keyCode && e.keyCode == 27) || (e.type == 'click' && $(e.target).parents('div.blockMsg').length == 0))
+            $.blockUI.impl.boxRemove();
+        return true;
+    },
+    // bind/unbind the handler
+    bind: function(b, el) {
+        var full = el == window;
+        // don't bother unbinding if there is nothing to unbind
+        if (!b && (full && !this.pageBlock || !full && !el.$blocked)) return;
+        if (!full) el.$blocked = b;
+        var $e = $(el).find('a,:input');
+        $.each(['mousedown','mouseup','keydown','keypress','click'], function(i,o) {
+            $e[b?'bind':'unbind'](o, $.blockUI.impl.handler);
+        });
+    },
+    focus: function(back) {
+        if (!$.blockUI.impl.pageBlockEls) return;
+        var e = $.blockUI.impl.pageBlockEls[back===true ? $.blockUI.impl.pageBlockEls.length-1 : 0];
+        if (e) e.focus();
+    },
+    center: function(el) {
+		var p = el.parentNode, s = el.style;
+        var l = ((p.offsetWidth - el.offsetWidth)/2) - this.sz(p,'borderLeftWidth');
+        var t = ((p.offsetHeight - el.offsetHeight)/2) - this.sz(p,'borderTopWidth');
+        s.left = l > 0 ? (l+'px') : '0';
+        s.top  = t > 0 ? (t+'px') : '0';
+    },
+    sz: function(el, p) { return parseInt($.css(el,p))||0; }
+};
+
+})(jQuery);

Added: incubator/esme/trunk/server/src/main/webapp/scripts/jquery.dimensions.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/jquery.dimensions.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/jquery.dimensions.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/jquery.dimensions.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,119 @@
+/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
+ * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
+ * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
+ *
+ * $LastChangedDate: 2008-01-10 13:07:50 +0000 (Thu, 10 Jan 2008) $
+ * $Rev: 4403 $
+ *
+ * Version: 1.2
+ *
+ * Requires: jQuery 1.2+
+ */
+
+(function($){
+	
+$.dimensions = {
+	version: '1.2'
+};
+
+// Create innerHeight, innerWidth, outerHeight and outerWidth methods
+$.each( [ 'Height', 'Width' ], function(i, name){
+	
+	// innerHeight and innerWidth
+	$.fn[ 'inner' + name ] = function() {
+		if (!this[0]) return;
+		
+		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
+		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
+		
+		return this.is(':visible') ? this[0]['client' + name] : num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
+	};
+	
+	// outerHeight and outerWidth
+	$.fn[ 'outer' + name ] = function(options) {
+		if (!this[0]) return;
+		
+		var torl = name == 'Height' ? 'Top'    : 'Left',  // top or left
+		    borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
+		
+		options = $.extend({ margin: false }, options || {});
+		
+		var val = this.is(':visible') ? 
+				this[0]['offset' + name] : 
+				num( this, name.toLowerCase() )
+					+ num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
+					+ num(this, 'padding' + torl) + num(this, 'padding' + borr);
+		
+		return val + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
+	};
+});
+
+// Create scrollLeft and scrollTop methods
+$.each( ['Left', 'Top'], function(i, name) {
+	$.fn[ 'scroll' + name ] = function(val) {
+		if (!this[0]) return;
+		
+		return val != undefined ?
+		
+			// Set the scroll offset
+			this.each(function() {
+				this == window || this == document ?
+					window.scrollTo( 
+						name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
+						name == 'Top'  ? val : $(window)[ 'scrollTop'  ]()
+					) :
+					this[ 'scroll' + name ] = val;
+			}) :
+			
+			// Return the scroll offset
+			this[0] == window || this[0] == document ?
+				self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
+					$.boxModel && document.documentElement[ 'scroll' + name ] ||
+					document.body[ 'scroll' + name ] :
+				this[0][ 'scroll' + name ];
+	};
+});
+
+$.fn.extend({
+	position: function() {
+		var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
+		
+		if (elem) {
+			// Get *real* offsetParent
+			offsetParent = this.offsetParent();
+			
+			// Get correct offsets
+			offset       = this.offset();
+			parentOffset = offsetParent.offset();
+			
+			// Subtract element margins
+			offset.top  -= num(elem, 'marginTop');
+			offset.left -= num(elem, 'marginLeft');
+			
+			// Add offsetParent borders
+			parentOffset.top  += num(offsetParent, 'borderTopWidth');
+			parentOffset.left += num(offsetParent, 'borderLeftWidth');
+			
+			// Subtract the two offsets
+			results = {
+				top:  offset.top  - parentOffset.top,
+				left: offset.left - parentOffset.left
+			};
+		}
+		
+		return results;
+	},
+	
+	offsetParent: function() {
+		var offsetParent = this[0].offsetParent;
+		while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
+			offsetParent = offsetParent.offsetParent;
+		return $(offsetParent);
+	}
+});
+
+function num(el, prop) {
+	return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;
+};
+
+})(jQuery);
\ No newline at end of file

Added: incubator/esme/trunk/server/src/main/webapp/scripts/jquery.tooltips.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/jquery.tooltips.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/jquery.tooltips.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/jquery.tooltips.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,8 @@
+/*
+ * Interface elements for jQuery - http://interface.eyecon.ro
+ *
+ * Copyright (c) 2006 Stefan Petre
+ * Dual licensed under the MIT (MIT-LICENSE.txt) 
+ * and GPL (GPL-LICENSE.txt) licenses.
+ */
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('4.Y={4k:d(e){6 x=0;6 y=0;6 23=T;6 u=e.1h;8(4(e).C(\'Q\')==\'U\'){22=u.1f;2Q=u.J;u.1f=\'1I\';u.Q=\'2h\';u.J=\'24\';23=1j}6 7=e;2V(7){x+=7.4i+(7.25&&!4.3b.4n?F(7.25.3A)||0:0);y+=7.4f+(7.25&&!4.3b.4n?F(7.25.36)||0:0);7=7.4e}7=e;2V(7&&7.3Z&&7.3Z.3D()!=\'M\'){x-=7.1H||0;y-=7.1F||0;7=7.2E}8(23){u.Q=\'U\';u.J=2Q;u.1f=22}k{x:x,y:y}},5j:d(7){6 x=0,y=0;2V(7){x+=7.4i||0;y+=7.4f||0;7=7.4e}k{x:x,y:y}},2r:d(e){6 w=4.C(e,\'3j\');6 h=4.C(e,\'3q\');6 17=0;6 18=0;6 u=e.1h;8(4(e).C(\'Q\')!=\'U\'){17=e.3v;18=e.3l}q{22=u.1f;2Q=u.J;u.1f=\'1I\';u.Q=\'2h\';u.J=\'24\';17=e.3v;18=e.3l;u.Q=\'U\';u.J=2Q;u.1f=22}k{w:w,h:h,17:17,18:18}},5i:d(7){k{17:7.3v||0,18:7.3l||0}},5h:d(e){6
  h,w,1Z;8(e){w=e.2s;h=e.2v}q{1Z=G.11;w=3g.3r||2C.3r||(1Z&&1Z.2s)||G.M.2s;h=3g.34||2C.34||(1Z&&1Z.2v)||G.M.2v}k{w:w,h:h}},4q:d(e){6 t,l,w,h,21,1Y;8(e&&e.2O.3D()!=\'M\'){t=e.1F;l=e.1H;w=e.3w;h=e.3t;21=0;1Y=0}q{8(G.11&&G.11.1F){t=G.11.1F;l=G.11.1H;w=G.11.3w;h=G.11.3t}q 8(G.M){t=G.M.1F;l=G.M.1H;w=G.M.3w;h=G.M.3t}21=2C.3r||G.11.2s||G.M.2s||0;1Y=2C.34||G.11.2v||G.M.2v||0}k{t:t,l:l,w:w,h:h,21:21,1Y:1Y}},3M:d(e,1Q){6 7=4(e);6 t=7.C(\'2a\')||\'\';6 r=7.C(\'2g\')||\'\';6 b=7.C(\'2b\')||\'\';6 l=7.C(\'2m\')||\'\';8(1Q)k{t:F(t)||0,r:F(r)||0,b:F(b)||0,l:F(l)};q k{t:t,r:r,b:b,l:l}},5g:d(e,1Q){6 7=4(e);6 t=7.C(\'3Y\')||\'\';6 r=7.C(\'3T\')||\'\';6 b=7.C(\'3R\')||\'\';6 l=7.C(\'3S\')||\'\';8(1Q)k{t:F(t)||0,r:F(r)||0,b:F(b)||0,l:F(l)};q k{t:t,r:r,b:b,l:l}},5k:d(e,1Q){6 7=4(e);6 t=7.C(\'36\')||\'\';6 r=7.C(\'3P\')||\'\';6 b=7.C(\'3G\')||\'\';6 l=7.C(\'3A\')||\'\';8(1Q)k{t:F(t)||0,r:F(r)||0,b:F(b)||0,l:F(l)||0};q k{t:t,r:r,b:b,l:l}},3c:d(29){6 x=29.5l||(29.5p+(G.11.1H||G.M.1H))||0;6 y=29.5o||(
 29.5n+(G.11.1F||G.M.1F))||0;k{x:x,y:y}},3o:d(16,3y){3y(16);16=16.3K;2V(16){4.Y.3o(16,3y);16=16.5m}},5f:d(16){4.Y.3o(16,d(7){V(6 X 1y 7){8(2S 7[X]===\'d\'){7[X]=Z}}})},57:d(7,2e){6 1e=$.Y.4q();6 32=$.Y.2r(7);8(!2e||2e==\'56\')$(7).C({N:1e.t+((2d.4B(1e.h,1e.1Y)-1e.t-32.18)/2)+\'R\'});8(!2e||2e==\'51\')$(7).C({O:1e.l+((2d.4B(1e.w,1e.21)-1e.l-32.17)/2)+\'R\'})},54:d(7,4s){6 4z=$(\'3Q[@2R*="2L"]\',7||G),2L;4z.2J(d(){2L=o.2R;o.2R=4s;o.1h.52="53:58.59.5d(2R=\'"+2L+"\')"})}};[].4b||(5c.5b.4b=d(v,n){n=(n==Z)?0:n;6 m=o.1m;V(6 i=n;i<m;i++)8(o[i]==v)k i;k-1});4.3N=d(e){8(/^5a$|^5q$|^5r$|^5H$|^5G$|^5F$|^5E$|^5I$|^5J$|^M$|^5N$|^5M$|^5L$|^5K$|^5D$|^5C$|^5v$/i.2q(e.2O))k T;q k 1j};4.E.5u=d(e,1o){6 c=e.3K;6 1l=c.1h;1l.J=1o.J;1l.2a=1o.1b.t;1l.2m=1o.1b.l;1l.2b=1o.1b.b;1l.2g=1o.1b.r;1l.N=1o.N+\'R\';1l.O=1o.O+\'R\';e.2E.3J(c,e);e.2E.5t(e)};4.E.5s=d(e){8(!4.3N(e))k T;6 t=4(e);6 u=e.1h;6 23=T;6 K={};K.J=t.C(\'J\');8(t.C(\'Q\')==\'U\'){22=t.C(\'1f\');u.1f=\'1I\';u.Q=\'\';23=1j}K.3i=4.Y.2r(e);K.1b=4
 .Y.3M(e);6 3a=e.25?e.25.3F:t.C(\'5w\');K.N=F(t.C(\'N\'))||0;K.O=F(t.C(\'O\'))||0;6 3V=\'5x\'+F(2d.5B()*4p);6 1C=G.5A(/^3Q$|^5z$|^5y$|^5O$|^4E$|^4K$|^3k$|^4M$|^4I$|^4F$|^4H$|^4Y$|^4X$|^4P$/i.2q(e.2O)?\'1z\':e.2O);4.X(1C,\'2D\',3V);1C.1g=\'4R\';6 S=1C.1h;6 N=0;6 O=0;8(K.J==\'30\'||K.J==\'24\'){N=K.N;O=K.O}S.Q=\'U\';S.N=N+\'R\';S.O=O+\'R\';S.J=K.J!=\'30\'&&K.J!=\'24\'?\'30\':K.J;S.2X=\'1I\';S.3q=K.3i.18+\'R\';S.3j=K.3i.17+\'R\';S.2a=K.1b.t;S.2g=K.1b.r;S.2b=K.1b.b;S.2m=K.1b.l;8(4.3b.4O){S.3F=3a}q{S.4J=3a}e.2E.3J(1C,e);u.2a=\'1N\';u.2g=\'1N\';u.2b=\'1N\';u.2m=\'1N\';u.J=\'24\';u.4L=\'U\';u.N=\'1N\';u.O=\'1N\';8(23){u.Q=\'U\';u.1f=22}1C.4T(e);S.Q=\'2h\';k{K:K,4N:4(1C)}};4.E.2w={4Z:[0,B,B],4W:[3X,B,B],4U:[44,44,4S],4Q:[0,0,0],4G:[0,0,B],4V:[3L,42,42],5e:[0,B,B],6d:[0,0,1V],72:[0,1V,1V],71:[37,37,37],70:[0,6Y,0],6Z:[73,74,48],79:[1V,0,1V],78:[77,48,47],76:[B,3W,0],6X:[6W,50,6O],6N:[1V,0,0],6M:[6K,7b,6P],6Q:[6V,0,2N],6U:[B,0,B],6T:[B,6R,0],6S:[0,1x,0],7a:[75,0,7x],7u:[3X,3O,3W],7r:[7
 q,7v,3O],7w:[3E,B,B],7s:[3H,7o,3H],7g:[2N,2N,2N],7f:[B,7p,7e],7c:[B,B,3E],7d:[0,B,0],7h:[B,0,B],7j:[1x,0,0],7k:[0,0,1x],7l:[1x,1x,0],7m:[B,3L,0],7n:[B,2x,7i],7t:[1x,0,1x],6L:[B,0,0],6I:[2x,2x,2x],68:[B,B,B],67:[B,B,0]};4.E.1B=d(1a,3I){8(4.E.2w[1a])k{r:4.E.2w[1a][0],g:4.E.2w[1a][1],b:4.E.2w[1a][2]};q 8(L=/^1P\\(\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*,\\s*([0-9]{1,3})\\s*\\)$/.2T(1a))k{r:F(L[1]),g:F(L[2]),b:F(L[3])};q 8(L=/1P\\(\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*,\\s*([0-9]+(?:\\.[0-9]+)?)\\%\\s*\\)$/.2T(1a))k{r:12(L[1])*2.55,g:12(L[2])*2.55,b:12(L[3])*2.55};q 8(L=/^#([a-1M-1L-9])([a-1M-1L-9])([a-1M-1L-9])$/.2T(1a))k{r:F("1O"+L[1]+L[1]),g:F("1O"+L[2]+L[2]),b:F("1O"+L[3]+L[3])};q 8(L=/^#([a-1M-1L-9]{2})([a-1M-1L-9]{2})([a-1M-1L-9]{2})$/.2T(1a))k{r:F("1O"+L[1]),g:F("1O"+L[2]),b:F("1O"+L[3])};q k 3I==1j?T:{r:B,g:B,b:B}};4.E.4t={3G:1,3A:1,3P:1,36:1,2P:1,66:1,3q:1,O:1,64:1,65:1,2b:1,2m:1,2g:1,2a:1,69:1,6a:1,6f:1,6e:1,1u:1,6J:1,5P:1,3R:1,3S:1,3T:1,3
 Y:1,3f:1,6b:1,N:1,3j:1,2c:1};4.E.4r={6c:1,63:1,62:1,5U:1,5T:1,1a:1,5S:1};4.E.2i=[\'5Q\',\'5R\',\'5V\',\'5W\'];4.E.38={\'39\':[\'2f\',\'4C\'],\'2I\':[\'2f\',\'3z\'],\'2G\':[\'2G\',\'\'],\'2F\':[\'2F\',\'\']};4.4D.3s({61:d(1s,1R,P,2U){k o.28(d(){6 2W=4.1R(1R,P,2U);6 e=2l 4.4x(o,2W,1s)})},3m:d(1R,2U){k o.28(d(){6 2W=4.1R(1R,2U);6 e=2l 4.3m(o,2W)})},60:d(19){k o.2J(d(){8(o.1n)4.3e(o,19)})},5Z:d(19){k o.2J(d(){8(o.1n)4.3e(o,19);8(o.28&&o.28[\'E\'])o.28.E=[]})}});4.3s({3m:d(A,f){6 z=o,4y;z.19=d(){8(4.46(f.2Y))f.2Y.2H(A)};z.2u=41(d(){z.19()},f.1p);A.1n=z},P:{4u:d(p,n,4w,4v,1p){k((-2d.5X(p*2d.5Y)/2)+0.5)*4v+4w}},4x:d(A,f,1s){6 z=o,4y;6 y=A.1h;6 4o=4.C(A,"2X");6 1S=4.C(A,"Q");6 D={};z.2z=(2l 49()).4a();f.P=f.P&&4.P[f.P]?f.P:\'4u\';z.2A=d(I,W){8(4.E.4t[I]){8(W==\'1v\'||W==\'1w\'||W==\'4A\'){8(!A.1A)A.1A={};6 r=12(4.1D(A,I));A.1A[I]=r&&r>-4p?r:(12(4.C(A,I))||0);W=W==\'4A\'?(1S==\'U\'?\'1v\':\'1w\'):W;f[W]=1j;D[I]=W==\'1v\'?[0,A.1A[I]]:[A.1A[I],0];8(I!=\'1u\')y[I]=D[I][0]+(I!=\'2c\'&&I!
 =\'31\'?\'R\':\'\');q 4.X(y,"1u",D[I][0])}q{D[I]=[12(4.1D(A,I)),12(W)||0]}}q 8(4.E.4r[I])D[I]=[4.E.1B(4.1D(A,I)),4.E.1B(W)];q 8(/^2G$|2F$|2f$|2I$|39$/i.2q(I)){6 m=W.1t(/\\s+/g,\' \').1t(/1P\\s*\\(\\s*/g,\'1P(\').1t(/\\s*,\\s*/g,\',\').1t(/\\s*\\)/g,\')\').6g(/([^\\s]+)/g);4l(I){1c\'2G\':1c\'2F\':1c\'39\':1c\'2I\':m[3]=m[3]||m[1]||m[0];m[2]=m[2]||m[0];m[1]=m[1]||m[0];V(6 i=0;i<4.E.2i.1m;i++){6 1r=4.E.38[I][0]+4.E.2i[i]+4.E.38[I][1];D[1r]=I==\'2I\'?[4.E.1B(4.1D(A,1r)),4.E.1B(m[i])]:[12(4.1D(A,1r)),12(m[i])]}1E;1c\'2f\':V(6 i=0;i<m.1m;i++){6 3u=12(m[i]);6 2K=!6h(3u)?\'4C\':(!/6A|U|1I|6z|6y|6w|6x|6B|6C|6H|6G/i.2q(m[i])?\'3z\':T);8(2K){V(6 j=0;j<4.E.2i.1m;j++){1r=\'2f\'+4.E.2i[j]+2K;D[1r]=2K==\'3z\'?[4.E.1B(4.1D(A,1r)),4.E.1B(m[i])]:[12(4.1D(A,1r)),3u]}}q{y[\'6F\']=m[i]}}1E}}q{y[I]=W}k T};V(p 1y 1s){8(p==\'1h\'){6 1d=4.35(1s[p]);V(1J 1y 1d){o.2A(1J,1d[1J])}}q 8(p==\'1g\'){8(G.2y)V(6 i=0;i<G.2y.1m;i++){6 1W=G.2y[i].1W||G.2y[i].6D||Z;8(1W){V(6 j=0;j<1W.1m;j++){8(1W[j].6E==\'.\'+1s[
 p]){6 1K=2l 6v(\'\\.\'+1s[p]+\' {\');6 1k=1W[j].1h.6u;6 1d=4.35(1k.1t(1K,\'\').1t(/}/g,\'\'));V(1J 1y 1d){o.2A(1J,1d[1J])}}}}}}q{o.2A(p,1s[p])}}y.Q=1S==\'U\'?\'2h\':1S;y.2X=\'1I\';z.19=d(){6 t=(2l 49()).4a();8(t>f.1p+z.2z){43(z.2u);z.2u=Z;V(p 1y D){8(p=="1u")4.X(y,"1u",D[p][1]);q 8(2S D[p][1]==\'3k\')y[p]=\'1P(\'+D[p][1].r+\',\'+D[p][1].g+\',\'+D[p][1].b+\')\';q y[p]=D[p][1]+(p!=\'2c\'&&p!=\'31\'?\'R\':\'\')}8(f.1w||f.1v)V(6 p 1y A.1A)8(p=="1u")4.X(y,p,A.1A[p]);q y[p]="";y.Q=f.1w?\'U\':(1S!=\'U\'?1S:\'2h\');y.2X=4o;A.1n=Z;8(4.46(f.2Y))f.2Y.2H(A)}q{6 n=t-o.2z;6 2n=n/f.1p;V(p 1y D){8(2S D[p][1]==\'3k\'){y[p]=\'1P(\'+F(4.P[f.P](2n,n,D[p][0].r,(D[p][1].r-D[p][0].r),f.1p))+\',\'+F(4.P[f.P](2n,n,D[p][0].g,(D[p][1].g-D[p][0].g),f.1p))+\',\'+F(4.P[f.P](2n,n,D[p][0].b,(D[p][1].b-D[p][0].b),f.1p))+\')\'}q{6 2Z=4.P[f.P](2n,n,D[p][0],(D[p][1]-D[p][0]),f.1p);8(p=="1u")4.X(y,"1u",2Z);q y[p]=2Z+(p!=\'2c\'&&p!=\'31\'?\'R\':\'\')}}}};z.2u=41(d(){z.19()},13);A.1n=z},3e:d(A,19){8(19)A.1n.2z-=6
 m;q{3g.43(A.1n.2u);A.1n=Z;4.6l(A,"E")}}});4.35=d(1k){6 1d={};8(2S 1k==\'6k\'){1k=1k.3D().4c(\';\');V(6 i=0;i<1k.1m;i++){1K=1k[i].4c(\':\');8(1K.1m==2){1d[4.4d(1K[0].1t(/\\-(\\w)/g,d(m,c){k c.6i()}))]=4.4d(1K[1])}}}k 1d};4.H={1G:Z,1U:T,2M:Z,3h:d(e){4.H.1U=1j;4.H.1v(e,o,1j)},3n:d(e){8(4.H.1G!=o)k;4.H.1U=T;4.H.1w(e,o)},1v:d(e,7,1U){8(4.H.1G!=Z)k;8(!7){7=o}4.H.1G=7;10=4.3s(4.Y.4k(7),4.Y.2r(7));2p=4(7);1q=2p.X(\'1q\');2B=2p.X(\'2B\');8(1q){4.H.2M=1q;2p.X(\'1q\',\'\');4(\'#4j\').3C(1q);8(2B)4(\'#33\').3C(2B.1t(\'6j://\',\'\'));q 4(\'#33\').3C(\'\');1i=4(\'#2j\');8(7.14.1g){1i.3B(0).1g=7.14.1g}q{1i.3B(0).1g=\'\'}3x=4.Y.2r(1i.3B(0));4m=1U&&7.14.J==\'3p\'?\'2P\':7.14.J;4l(4m){1c\'N\':1X=10.y-3x.18;20=10.x;1E;1c\'O\':1X=10.y;20=10.x-3x.17;1E;1c\'3f\':1X=10.y;20=10.x+10.17;1E;1c\'3p\':4(\'M\').2k(\'2t\',4.H.2t);27=4.Y.3c(e);1X=27.y+15;20=27.x+15;1E;6n:1X=10.y+10.18;20=10.x;1E}1i.C({N:1X+\'R\',O:20+\'R\'});8(7.14.2o==T){1i.1v()}q{1i.6o(7.14.2o)}8(7.14.1T)7.14.1T.2H(7);2p.2k(\'4g\',4.H.1
 w).2k(\'4h\',4.H.3n)}},2t:d(e){8(4.H.1G==Z){4(\'M\').3d(\'2t\',4.H.2t);k}27=4.Y.3c(e);4(\'#2j\').C({N:27.y+15+\'R\',O:27.x+15+\'R\'})},1w:d(e,7){8(!7){7=o}8(4.H.1U!=1j&&4.H.1G==7){4.H.1G=Z;4(\'#2j\').6t(1);4(7).X(\'1q\',4.H.2M).3d(\'4g\',4.H.1w).3d(\'4h\',4.H.3n);8(7.14.26)7.14.26.2H(7);4.H.2M=Z}},3U:d(f){8(!4.H.1i){4(\'M\').6s(\'<1z 2D="2j"><1z 2D="4j"></1z><1z 2D="33"></1z></1z>\');4(\'#2j\').C({J:\'24\',2c:6r,Q:\'U\'});4.H.1i=1j}k o.2J(d(){8(4.X(o,\'1q\')){o.14={J:/N|2P|O|3f|3p/.2q(f.J)?f.J:\'2P\',1g:f.1g?f.1g:T,2o:f.2o?f.2o:T,1T:f.1T&&f.1T.40==45?f.1T:T,26:f.26&&f.26.40==45?f.26:T};6 7=4(o);7.2k(\'6p\',4.H.1v);7.2k(\'3h\',4.H.3h)}})}};4.4D.6q=4.H.3U;',62,468,'||||jQuery||var|el|if|||||function||options|||||return||||this||else||||es||||||elem|255|css|props|fx|parseInt|document|iTooltip|tp|position|oldStyle|result|body|top|left|easing|display|px|wrs|false|none|for|vp|attr|iUtil|null|pos|documentElement|parseFloat||tooltipCFG||nodeEl|wb|hb|step|color|margins|case|newStyles
 |clientScroll|visibility|className|style|helper|true|styles|cs|length|animationHandler|old|duration|title|nmp|prop|replace|opacity|show|hide|128|in|div|orig|parseColor|wr|curCSS|break|scrollTop|current|scrollLeft|hidden|np|rule|F0|fA|0px|0x|rgb|toInteger|speed|oldDisplay|onShow|focused|139|cssRules|ny|ih|de|nx|iw|oldVisibility|restoreStyle|absolute|currentStyle|onHide|pointer|queue|event|marginTop|marginBottom|zIndex|Math|axis|border|marginRight|block|cssSides|tooltipHelper|bind|new|marginLeft|pr|delay|jEl|test|getSize|clientWidth|mousemove|timer|clientHeight|namedColors|192|styleSheets|startTime|getValues|href|self|id|parentNode|padding|margin|apply|borderColor|each|sideEnd|png|oldTitle|211|nodeName|bottom|oldPosition|src|typeof|exec|callback|while|opt|overflow|complete|pValue|relative|fontWeight|windowSize|tooltipURL|innerHeight|parseStyle|borderTopWidth|169|cssSidesEnd|borderWidth|oldFloat|browser|getPointer|unbind|stopAnim|right|window|focus|sizes|width|object|offsetHeig
 ht|pause|hidefocused|traverseDOM|mouse|height|innerWidth|extend|scrollHeight|floatVal|offsetWidth|scrollWidth|helperSize|func|Color|borderLeftWidth|get|html|toLowerCase|224|styleFloat|borderBottomWidth|144|notColor|insertBefore|firstChild|165|getMargins|fxCheckTag|230|borderRightWidth|img|paddingBottom|paddingLeft|paddingRight|build|wid|140|240|paddingTop|tagName|constructor|setInterval||clearInterval|245|Function|isFunction||107|Date|getTime|indexOf|split|trim|offsetParent|offsetTop|mouseout|blur|offsetLeft|tooltipTitle|getPosition|switch|filteredPosition|opera|oldOverflow|10000|getScroll|colorCssProps|emptyGIF|cssProps|linear|delta|firstNum|fxe|values|images|toggle|max|Width|fn|select|form|blue|table|button|cssFloat|textarea|listStyle|iframe|wrapper|msie|ol|black|fxWrapper|220|appendChild|beige|brown|azure|dl|ul|aqua||horizontally|filter|progid|fixPNG||vertically|centerEl|DXImageTransform|Microsoft|tr|prototype|Array|AlphaImageLoader|cyan|purgeEvents|getPadding|getClient|g
 etSizeLite|getPositionLite|getBorder|pageX|nextSibling|clientY|pageY|clientX|td|tbody|buildWrapper|removeChild|destroyWrapper|meta|float|w_|input|br|createElement|random|optgroup|option|col|tfoot|thead|caption|colgroup|th|frameset|frame|script|header|hr|outlineWidth|Top|Right|outlineColor|borderTopColor|borderRightColor|Bottom|Left|cos|PI|stopAll|stop|animate|borderLeftColor|borderBottomColor|letterSpacing|lineHeight|fontSize|yellow|white|maxHeight|maxWidth|textIndent|backgroundColor|darkblue|minWidth|minHeight|match|isNaN|toUpperCase|http|string|dequeue|100000000|default|fadeIn|mouseover|ToolTip|3000|append|fadeOut|cssText|RegExp|solid|double|dashed|dotted|transparent|groove|ridge|rules|selectorText|borderStyle|outset|inset|silver|outlineOffset|233|red|darksalmon|darkred|204|122|darkviolet|215|green|gold|fuchsia|148|153|darkorchid|100|darkkhaki|darkgreen|darkgrey|darkcyan|189|183||darkorange|85|darkolivegreen|darkmagenta|indigo|150|lightyellow|lime|193|lightpink|lightgrey|m
 agenta|203|maroon|navy|olive|orange|pink|238|182|173|lightblue|lightgreen|purple|khaki|216|lightcyan|130'.split('|'),0,{}))

Added: incubator/esme/trunk/server/src/main/webapp/scripts/json2.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/json2.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/json2.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/json2.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,273 @@
+/*
+    json2.js
+    2007-12-02
+
+    Public Domain
+
+    No warranty expressed or implied. Use at your own risk.
+
+    See http://www.JSON.org/js.html
+
+    This file creates a global JSON object containing two methods:
+
+        JSON.stringify(value, whitelist)
+            value       any JavaScript value, usually an object or array.
+
+            whitelist   an optional array prameter that determines how object
+                        values are stringified.
+
+            This method produces a JSON text from a JavaScript value.
+            There are three possible ways to stringify an object, depending
+            on the optional whitelist parameter.
+
+            If an object has a toJSON method, then the toJSON() method will be
+            called. The value returned from the toJSON method will be
+            stringified.
+
+            Otherwise, if the optional whitelist parameter is an array, then
+            the elements of the array will be used to select members of the
+            object for stringification.
+
+            Otherwise, if there is no whitelist parameter, then all of the
+            members of the object will be stringified.
+
+            Values that do not have JSON representaions, such as undefined or
+            functions, will not be serialized. Such values in objects will be
+            dropped; in arrays will be replaced with null.
+            JSON.stringify(undefined) returns undefined. Dates will be
+            stringified as quoted ISO dates.
+
+            Example:
+
+            var text = JSON.stringify(['e', {pluribus: 'unum'}]);
+            // text is '["e",{"pluribus":"unum"}]'
+
+        JSON.parse(text, filter)
+            This method parses a JSON text to produce an object or
+            array. It can throw a SyntaxError exception.
+
+            The optional filter parameter is a function that can filter and
+            transform the results. It receives each of the keys and values, and
+            its return value is used instead of the original value. If it
+            returns what it received, then structure is not modified. If it
+            returns undefined then the member is deleted.
+
+            Example:
+
+            // Parse the text. If a key contains the string 'date' then
+            // convert the value to a date.
+
+            myData = JSON.parse(text, function (key, value) {
+                return key.indexOf('date') >= 0 ? new Date(value) : value;
+            });
+
+    This is a reference implementation. You are free to copy, modify, or
+    redistribute.
+
+    Use your own copy. It is extremely unwise to load third party
+    code into your pages.
+*/
+
+/*jslint evil: true */
+
+/*global JSON */
+
+/*members "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
+    charCodeAt, floor, getUTCDate, getUTCFullYear, getUTCHours,
+    getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, length,
+    parse, propertyIsEnumerable, prototype, push, replace, stringify, test,
+    toJSON, toString
+*/
+
+if (!this.JSON) {
+
+    JSON = function () {
+
+        function f(n) {    // Format integers to have at least two digits.
+            return n < 10 ? '0' + n : n;
+        }
+
+        Date.prototype.toJSON = function () {
+
+// Eventually, this method will be based on the date.toISOString method.
+
+            return this.getUTCFullYear()   + '-' +
+                 f(this.getUTCMonth() + 1) + '-' +
+                 f(this.getUTCDate())      + 'T' +
+                 f(this.getUTCHours())     + ':' +
+                 f(this.getUTCMinutes())   + ':' +
+                 f(this.getUTCSeconds())   + 'Z';
+        };
+
+
+        var m = {    // table of character substitutions
+            '\b': '\\b',
+            '\t': '\\t',
+            '\n': '\\n',
+            '\f': '\\f',
+            '\r': '\\r',
+            '"' : '\\"',
+            '\\': '\\\\'
+        };
+
+        function stringify(value, whitelist) {
+            var a,          // The array holding the partial texts.
+                i,          // The loop counter.
+                k,          // The member key.
+                l,          // Length.
+                r = /["\\\x00-\x1f\x7f-\x9f]/g,
+                v;          // The member value.
+
+            switch (typeof value) {
+            case 'string':
+
+// If the string contains no control characters, no quote characters, and no
+// backslash characters, then we can safely slap some quotes around it.
+// Otherwise we must also replace the offending characters with safe sequences.
+
+                return r.test(value) ?
+                    '"' + value.replace(r, function (a) {
+                        var c = m[a];
+                        if (c) {
+                            return c;
+                        }
+                        c = a.charCodeAt();
+                        return '\\u00' + Math.floor(c / 16).toString(16) +
+                                                   (c % 16).toString(16);
+                    }) + '"' :
+                    '"' + value + '"';
+
+            case 'number':
+
+// JSON numbers must be finite. Encode non-finite numbers as null.
+
+                return isFinite(value) ? String(value) : 'null';
+
+            case 'boolean':
+            case 'null':
+                return String(value);
+
+            case 'object':
+
+// Due to a specification blunder in ECMAScript,
+// typeof null is 'object', so watch out for that case.
+
+                if (!value) {
+                    return 'null';
+                }
+
+// If the object has a toJSON method, call it, and stringify the result.
+
+                if (typeof value.toJSON === 'function') {
+                    return stringify(value.toJSON());
+                }
+                a = [];
+                if (typeof value.length === 'number' &&
+                        !(value.propertyIsEnumerable('length'))) {
+
+// The object is an array. Stringify every element. Use null as a placeholder
+// for non-JSON values.
+
+                    l = value.length;
+                    for (i = 0; i < l; i += 1) {
+                        a.push(stringify(value[i], whitelist) || 'null');
+                    }
+
+// Join all of the elements together and wrap them in brackets.
+
+                    return '[' + a.join(',') + ']';
+                }
+                if (whitelist) {
+
+// If a whitelist (array of keys) is provided, use it to select the components
+// of the object.
+
+                    l = whitelist.length;
+                    for (i = 0; i < l; i += 1) {
+                        k = whitelist[i];
+                        if (typeof k === 'string') {
+                            v = stringify(value[k], whitelist);
+                            if (v) {
+                                a.push(stringify(k) + ':' + v);
+                            }
+                        }
+                    }
+                } else {
+
+// Otherwise, iterate through all of the keys in the object.
+
+                    for (k in value) {
+                        if (typeof k === 'string') {
+                            v = stringify(value[k], whitelist);
+                            if (v) {
+                                a.push(stringify(k) + ':' + v);
+                            }
+                        }
+                    }
+                }
+
+// Join all of the member texts together and wrap them in braces.
+
+                return '{' + a.join(',') + '}';
+            }
+        }
+
+        return {
+            stringify: stringify,
+            parse: function (text, filter) {
+                var j;
+
+                function walk(k, v) {
+                    var i, n;
+                    if (v && typeof v === 'object') {
+                        for (i in v) {
+                            if (Object.prototype.hasOwnProperty.apply(v, [i])) {
+                                n = walk(i, v[i]);
+                                if (n !== undefined) {
+                                    v[i] = n;
+                                }
+                            }
+                        }
+                    }
+                    return filter(k, v);
+                }
+
+
+// Parsing happens in three stages. In the first stage, we run the text against
+// regular expressions that look for non-JSON patterns. We are especially
+// concerned with '()' and 'new' because they can cause invocation, and '='
+// because it can cause mutation. But just to be safe, we want to reject all
+// unexpected forms.
+
+// We split the first stage into 4 regexp operations in order to work around
+// crippling inefficiencies in IE's and Safari's regexp engines. First we
+// replace all backslash pairs with '@' (a non-JSON character). Second, we
+// replace all simple value tokens with ']' characters. Third, we delete all
+// open brackets that follow a colon or comma or that begin the text. Finally,
+// we look to see that the remaining characters are only whitespace or ']' or
+// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
+
+                if (/^[\],:{}\s]*$/.test(text.replace(/\\./g, '@').
+replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, ']').
+replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
+
+// In the second stage we use the eval function to compile the text into a
+// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
+// in JavaScript: it can begin a block or an object literal. We wrap the text
+// in parens to eliminate the ambiguity.
+
+                    j = eval('(' + text + ')');
+
+// In the optional third stage, we recursively walk the new structure, passing
+// each name/value pair to a filter function for possible transformation.
+
+                    return typeof filter === 'function' ? walk('', j) : j;
+                }
+
+// If the text is not JSON parseable, then a SyntaxError is thrown.
+
+                throw new SyntaxError('parseJSON');
+            }
+        };
+    }();
+}

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,197 @@
+/*
+tip_balloon.js  v. 1.2
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 13.7.2007
+
+Extension for the tooltip library wz_tooltip.js.
+Implements balloon tooltips.
+*/
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. Balloon a command BALLOON will automatically be
+// created.
+
+//===================  GLOBAL TOOPTIP CONFIGURATION  =========================//
+config. Balloon = false				// true or false - set to true if you want this to be the default behaviour
+config. BalloonImgPath = "../scripts/tip_balloon/" // Path to images (border, corners, stem), in quotes. Path must be relative to your HTML file.
+// Sizes of balloon images
+config. BalloonEdgeSize = 5			// Integer - sidelength of quadratic corner images
+config. BalloonStemWidth = 15		// Integer
+config. BalloonStemHeight = 19		// Integer
+//=======  END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW  ==============//
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here balloon, is unique amongst the extensions available for wz_tooltips.js):
+var balloon = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+
+balloon.OnLoadConfig = function()
+{
+	if(tt_aV[BALLOON])
+	{
+		// Turn off native style properties which are not appropriate
+		balloon.padding = Math.max(tt_aV[PADDING] - tt_aV[BALLOONEDGESIZE], 0);
+		balloon.width = tt_aV[WIDTH];
+		//if(tt_bBoxOld)
+		//	balloon.width += (balloon.padding << 1);
+		tt_aV[BORDERWIDTH] = 0;
+		tt_aV[WIDTH] = 0;
+		tt_aV[PADDING] = 0;
+		tt_aV[BGCOLOR] = "";
+		tt_aV[BGIMG] = "";
+		tt_aV[SHADOW] = false;
+		// Append slash to img path if missing
+		if(tt_aV[BALLOONIMGPATH].charAt(tt_aV[BALLOONIMGPATH].length - 1) != '/')
+			tt_aV[BALLOONIMGPATH] += "/";
+		return true;
+	}
+	return false;
+};
+balloon.OnCreateContentString = function()
+{
+	if(!tt_aV[BALLOON])
+		return false;
+		
+	var aImg, sImgZ, sCssCrn, sCssImg;
+
+	// Cache balloon images in advance:
+	// Either use the pre-cached default images...
+	if(tt_aV[BALLOONIMGPATH] == config.BalloonImgPath)
+		aImg = balloon.aDefImg;
+	// ...or load images from different directory
+	else
+		aImg = Balloon_CacheImgs(tt_aV[BALLOONIMGPATH]);
+	sCssCrn = ' style="position:relative;width:' + tt_aV[BALLOONEDGESIZE] + 'px;padding:0px;margin:0px;overflow:hidden;line-height:0px;"';
+	sCssImg = 'padding:0px;margin:0px;border:0px;';
+	sImgZ = '" style="' + sCssImg + '" />';
+	
+	tt_sContent = '<table border="0" cellpadding="0" cellspacing="0" style="width:auto;padding:0px;margin:0px;left:0px;top:0px;"><tr>'
+				// Left-top corner
+				+ '<td' + sCssCrn + ' valign="bottom">'
+				+ '<img src="' + aImg[1].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+				+ '</td>'
+				// Top border
+				+ '<td valign="bottom" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+				+ '<img id="bALlOOnT" style="position:relative;top:1px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[9].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+				+ '<div style="position:relative;z-index:0;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[2].src + ');">'
+				+ '</div>'
+				+ '</td>'
+				// Right-top corner
+				+ '<td' + sCssCrn + ' valign="bottom">'
+				+ '<img src="' + aImg[3].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+				+ '</td>'
+				+ '</tr><tr>'
+				// Left border
+				+ '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[8].src + ');">'
+				// Redundant image for bugous old Geckos that won't auto-expand TD height to 100%
+				+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[8].src + sImgZ
+				+ '</td>'
+				// Content
+				+ '<td style="position:relative;line-height:normal;'
+				+ ';background-image:url(' + aImg[0].src + ')'
+				+ ';color:' + tt_aV[FONTCOLOR]
+				+ ';font-family:' + tt_aV[FONTFACE]
+				+ ';font-size:' + tt_aV[FONTSIZE]
+				+ ';font-weight:' + tt_aV[FONTWEIGHT]
+				+ ';text-align:' + tt_aV[TEXTALIGN]
+				+ ';padding:' + balloon.padding
+				+ ';width:' + (balloon.width ? (balloon.width + 'px') : 'auto')
+				+ ';">' + tt_sContent + '</td>'
+				// Right border
+				+ '<td style="position:relative;padding:0px;margin:0px;width:' + tt_aV[BALLOONEDGESIZE] + 'px;overflow:hidden;background-image:url(' + aImg[4].src + ');">'
+				// Image redundancy for bugous old Geckos that won't auto-expand TD height to 100%
+				+ '<img width="' + tt_aV[BALLOONEDGESIZE] + '" height="100%" src="' + aImg[4].src + sImgZ
+				+ '</td>'
+				+ '</tr><tr>'
+				// Left-bottom corner
+				+ '<td valign="top"' + sCssCrn + '>'
+				+ '<img src="' + aImg[7].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+				+ '</td>'
+				// Bottom border
+				+ '<td valign="top" style="position:relative;padding:0px;margin:0px;overflow:hidden;">'
+				+ '<div style="position:relative;left:0px;top:0px;padding:0px;margin:0px;overflow:hidden;width:auto;height:' + tt_aV[BALLOONEDGESIZE] + 'px;background-image:url(' + aImg[6].src + ');"></div>'
+				+ '<img id="bALlOOnB" style="position:relative;top:-1px;left:2px;z-index:1;display:none;' + sCssImg + '" src="' + aImg[10].src + '" width="' + tt_aV[BALLOONSTEMWIDTH] + '" height="' + tt_aV[BALLOONSTEMHEIGHT] + '" />'
+				+ '</td>'
+				// Right-bottom corner
+				+ '<td valign="top"' + sCssCrn + '>'
+				+ '<img src="' + aImg[5].src + '" width="' + tt_aV[BALLOONEDGESIZE] + '" height="' + tt_aV[BALLOONEDGESIZE] + sImgZ
+				+ '</td>'
+				+ '</tr></table>';
+	return true;
+};
+balloon.OnSubDivsCreated = function()
+{
+	if(tt_aV[BALLOON])
+	{
+		balloon.iStem = tt_aV[ABOVE] * 1;
+		balloon.stem = [tt_GetElt("bALlOOnT"), tt_GetElt("bALlOOnB")];
+		balloon.stem[balloon.iStem].style.display = "inline";
+		return true;
+	}
+	return false;
+};
+// Display the stem appropriately
+balloon.OnMoveAfter = function()
+{
+	if(tt_aV[BALLOON])
+	{
+		var iStem = (tt_aV[ABOVE] != tt_bJmpVert) * 1;
+
+		// Tooltip position vertically flipped?
+		if(iStem != balloon.iStem)
+		{
+			// Display opposite stem
+			balloon.stem[balloon.iStem].style.display = "none";
+			balloon.stem[iStem].style.display = "inline";
+			balloon.iStem = iStem;
+		}
+		
+		balloon.stem[iStem].style.left = Balloon_CalcStemX() + "px";
+		return true;
+	}
+	return false;
+};
+function Balloon_CalcStemX()
+{
+	var x = tt_musX - tt_x;
+	return Math.max(Math.min(x, tt_w - tt_aV[BALLOONSTEMWIDTH] - (tt_aV[BALLOONEDGESIZE] << 1) - 2), 2);
+}
+function Balloon_CacheImgs(sPath)
+{
+	var asImg = ["background", "lt", "t", "rt", "r", "rb", "b", "lb", "l", "stemt", "stemb"],
+	n = asImg.length,
+	aImg = new Array(n),
+	img;
+
+	while(n)
+	{--n;
+		img = aImg[n] = new Image();
+		img.src = sPath + asImg[n] + ".gif";
+	}
+	return aImg;
+}
+// This mechanism pre-caches the default images specified by
+// congif.BalloonImgPath, so, whenever a balloon tip using these default images
+// is created, no further server connection is necessary.
+function Balloon_PreCacheDefImgs()
+{
+	// Append slash to img path if missing
+	if(config.BalloonImgPath.charAt(config.BalloonImgPath.length - 1) != '/')
+		config.BalloonImgPath += "/";
+	// Preload default images into array
+	balloon.aDefImg = Balloon_CacheImgs(config.BalloonImgPath);
+}
+Balloon_PreCacheDefImgs();

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/b.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/b.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/b.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/background.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/background.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/background.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/l.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/l.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/l.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lb.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lb.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lb.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lt.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lt.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/lt.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/r.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/r.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/r.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rb.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rb.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rb.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rt.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rt.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/rt.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemb.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemb.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemb.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemt.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemt.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/stemt.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/t.gif
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/t.gif?rev=726084&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/esme/trunk/server/src/main/webapp/scripts/tip_balloon/t.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_centerwindow.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_centerwindow.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/tip_centerwindow.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/tip_centerwindow.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,100 @@
+/*
+tip_centerwindow.js  v. 1.2
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 23.6.2007
+
+Extension for the tooltip library wz_tooltip.js.
+Centers a sticky tooltip in the window's visible clientarea,
+optionally even if the window is being scrolled or resized.
+*/
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. CenterWindow a command CENTERWINDOW will automatically be
+// created.
+
+//===================  GLOBAL TOOPTIP CONFIGURATION  =========================//
+config. CenterWindow = false	// true or false - set to true if you want this to be the default behaviour
+config. CenterAlways = false	// true or false - recenter if window is resized or scrolled
+//=======  END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW  ==============//
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here ctrwnd, is unique amongst the extensions available for
+// wz_tooltips.js):
+var ctrwnd = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+ctrwnd.OnLoadConfig = function()
+{
+	if(tt_aV[CENTERWINDOW])
+	{
+		// Permit CENTERWINDOW only if the tooltip is sticky
+		if(tt_aV[STICKY])
+		{
+			if(tt_aV[CENTERALWAYS])
+			{
+				// IE doesn't support style.position "fixed"
+				if(tt_ie)
+					tt_AddEvtFnc(window, "scroll", Ctrwnd_DoCenter);
+				else
+					tt_aElt[0].style.position = "fixed";
+				tt_AddEvtFnc(window, "resize", Ctrwnd_DoCenter);
+			}
+			return true;
+		}
+		tt_aV[CENTERWINDOW] = false;
+	}
+	return false;
+};
+// We react on the first OnMouseMove event to center the tip on that occasion
+ctrwnd.OnMoveBefore = Ctrwnd_DoCenter;
+ctrwnd.OnKill = function()
+{
+	if(tt_aV[CENTERWINDOW] && tt_aV[CENTERALWAYS])
+	{
+		tt_RemEvtFnc(window, "resize", Ctrwnd_DoCenter);
+		if(tt_ie)
+			tt_RemEvtFnc(window, "scroll", Ctrwnd_DoCenter);
+		else
+			tt_aElt[0].style.position = "absolute";
+	}
+	return false;
+};
+// Helper function
+function Ctrwnd_DoCenter()
+{
+	if(tt_aV[CENTERWINDOW])
+	{
+		var x, y, dx, dy;
+
+		// Here we use some functions and variables (tt_w, tt_h) which the
+		// extension API of wz_tooltip.js provides for us
+		if(tt_ie || !tt_aV[CENTERALWAYS])
+		{
+			dx = tt_GetScrollX();
+			dy = tt_GetScrollY();
+		}
+		else
+		{
+			dx = 0;
+			dy = 0;
+		}
+		// Position the tip, offset from the center by OFFSETX and OFFSETY
+		x = (tt_GetClientW() - tt_w) / 2 + dx + tt_aV[OFFSETX];
+		y = (tt_GetClientH() - tt_h) / 2 + dy + tt_aV[OFFSETY];
+		tt_SetTipPos(x, y);
+		return true;
+	}
+	return false;
+}

Added: incubator/esme/trunk/server/src/main/webapp/scripts/tip_followscroll.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/tip_followscroll.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/tip_followscroll.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/tip_followscroll.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,84 @@
+/*
+tip_followscroll.js	v. 1.1
+
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Initial author: Walter Zorn
+Last modified: 21.6.2007
+
+Extension for the tooltip library wz_tooltip.js.
+Lets a "sticky" tooltip keep its position inside the clientarea if the window
+is scrolled.
+*/
+
+// Here we define new global configuration variable(s) (as members of the
+// predefined "config." class).
+// From each of these config variables, wz_tooltip.js will automatically derive
+// a command which can be passed to Tip() or TagToTip() in order to customize
+// tooltips individually. These command names are just the config variable
+// name(s) translated to uppercase,
+// e.g. from config. FollowScroll a command FOLLOWSCROLL will automatically be
+// created.
+
+//===================	GLOBAL TOOPTIP CONFIGURATION	======================//
+config. FollowScroll = false		// true or false - set to true if you want this to be the default behaviour
+//=======	END OF TOOLTIP CONFIG, DO NOT CHANGE ANYTHING BELOW	==============//
+
+
+// Create a new tt_Extension object (make sure that the name of that object,
+// here fscrl, is unique amongst the extensions available for
+// wz_tooltips.js):
+var fscrl = new tt_Extension();
+
+// Implement extension eventhandlers on which our extension should react
+fscrl.OnShow = function()
+{
+	if(tt_aV[FOLLOWSCROLL])
+	{
+		// Permit FOLLOWSCROLL only if the tooltip is sticky
+		if(tt_aV[STICKY])
+		{
+			var x = tt_x - tt_GetScrollX(), y = tt_y - tt_GetScrollY();
+
+			if(tt_ie)
+			{
+				fscrl.MoveOnScrl.offX = x;
+				fscrl.MoveOnScrl.offY = y;
+				fscrl.AddRemEvtFncs(tt_AddEvtFnc);
+			}
+			else
+			{
+				tt_SetTipPos(x, y);
+				tt_aElt[0].style.position = "fixed";
+			}
+			return true;
+		}
+		tt_aV[FOLLOWSCROLL] = false;
+	}
+	return false;
+};
+fscrl.OnHide = function()
+{
+	if(tt_aV[FOLLOWSCROLL])
+	{
+		if(tt_ie)
+			fscrl.AddRemEvtFncs(tt_RemEvtFnc);
+		else
+			tt_aElt[0].style.position = "absolute";
+	}
+};
+// Helper functions (encapsulate in the class to avoid conflicts with other
+// extensions)
+fscrl.MoveOnScrl = function()
+{
+	tt_SetTipPos(fscrl.MoveOnScrl.offX + tt_GetScrollX(), fscrl.MoveOnScrl.offY + tt_GetScrollY());
+};
+fscrl.AddRemEvtFncs = function(PAddRem)
+{
+	PAddRem(window, "resize", fscrl.MoveOnScrl);
+	PAddRem(window, "scroll", fscrl.MoveOnScrl);
+};
+

Added: incubator/esme/trunk/server/src/main/webapp/scripts/ui.accordion.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/ui.accordion.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/ui.accordion.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/ui.accordion.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,214 @@
+;(function($) {
+
+$.ui = $.ui || {};
+
+$.ui.accordion = {};
+$.extend($.ui.accordion, {
+	defaults: {
+		selectedClass: "selected",
+		alwaysOpen: true,
+		animated: 'slide',
+		event: "click",
+		header: "a",
+		autoheight: true
+	},
+	animations: {
+		slide: function(settings, additions) {
+			settings = $.extend({
+				easing: "swing",
+				duration: 300
+			}, settings, additions);
+			if ( !settings.toHide.size() ) {
+				settings.toShow.animate({height: "show"}, {
+					duration: settings.duration,
+					easing: settings.easing,
+					complete: settings.finished
+				});
+				return;
+			}
+			var hideHeight = settings.toHide.height(),
+				showHeight = settings.toShow.height(),
+				difference = showHeight / hideHeight;
+			settings.toShow.css({ height: 0, overflow: 'hidden' }).show();
+			settings.toHide.filter(":hidden").each(settings.finished).end().filter(":visible").animate({height:"hide"},{
+				step: function(now){
+					settings.toShow.height((hideHeight - (now)) * difference );
+				},
+				duration: settings.duration,
+				easing: settings.easing,
+				complete: settings.finished
+			});
+		},
+		bounceslide: function(settings) {
+			this.slide(settings, {
+				easing: settings.down ? "bounceout" : "swing",
+				duration: settings.down ? 1000 : 200
+			});
+		},
+		easeslide: function(settings) {
+			this.slide(settings, {
+				easing: "easeinout",
+				duration: 700
+			})
+		}
+	}
+});
+
+$.fn.extend({
+	accordion: function(settings) {
+		if ( !this.length )
+			return this;
+	
+		// setup configuration
+		settings = $.extend({}, $.ui.accordion.defaults, settings);
+		
+		if ( settings.navigation ) {
+			var current = this.find("a").filter(function() { return this.href == location.href; });
+			if ( current.length ) {
+				if ( current.filter(settings.header).length ) {
+					settings.active = current;
+				} else {
+					settings.active = current.parent().parent().prev();
+					current.addClass("current");
+				}
+			}
+		}
+		
+		// calculate active if not specified, using the first header
+		var container = this,
+			headers = container.find(settings.header),
+			active = findActive(settings.active),
+			running = 0;
+
+		if ( settings.fillSpace ) {
+			var maxHeight = this.parent().height();
+			headers.each(function() {
+				maxHeight -= $(this).outerHeight();
+			});
+			var maxPadding = 0;
+			headers.next().each(function() {
+				maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
+			}).height(maxHeight - maxPadding);
+		} else if ( settings.autoheight ) {
+			var maxHeight = 0;
+			headers.next().each(function() {
+				maxHeight = Math.max(maxHeight, $(this).outerHeight());
+			}).height(maxHeight);
+		}
+
+		headers
+			.not(active || "")
+			.next()
+			.hide();
+		active.parent().andSelf().addClass(settings.selectedClass);
+		
+		
+		function findActive(selector) {
+			return selector != undefined
+				? typeof selector == "number"
+					? headers.filter(":eq(" + selector + ")")
+					: headers.not(headers.not(selector))
+				: selector === false
+					? $("<div>")
+					: headers.filter(":eq(0)");
+		}
+		
+		function toggle(toShow, toHide, data, clickedActive, down) {
+			var finished = function(cancel) {
+				running = cancel ? 0 : --running;
+				if ( running )
+					return;
+				// trigger custom change event
+				container.trigger("change", data);
+			};
+			
+			// count elements to animate
+			running = toHide.size() == 0 ? toShow.size() : toHide.size();
+			
+			if ( settings.animated ) {
+				if ( !settings.alwaysOpen && clickedActive ) {
+					toShow.slideToggle(settings.animated);
+					finished(true);
+				} else {
+					$.ui.accordion.animations[settings.animated]({
+						toShow: toShow,
+						toHide: toHide,
+						finished: finished,
+						down: down
+					});
+				}
+			} else {
+				if ( !settings.alwaysOpen && clickedActive ) {
+					toShow.toggle();
+				} else {
+					toHide.hide();
+					toShow.show();
+				}
+				finished(true);
+			}
+		}
+		
+		function clickHandler(event) {
+			// called only when using activate(false) to close all parts programmatically
+			if ( !event.target && !settings.alwaysOpen ) {
+				active.parent().andSelf().toggleClass(settings.selectedClass);
+				var toHide = active.next();
+				var toShow = active = $([]);
+				toggle( toShow, toHide );
+				return;
+			}
+			// get the click target
+			var clicked = $(event.target);
+			
+			// due to the event delegation model, we have to check if one
+			// of the parent elements is our actual header, and find that
+			if ( clicked.parents(settings.header).length )
+				while ( !clicked.is(settings.header) )
+					clicked = clicked.parent();
+			
+			var clickedActive = clicked[0] == active[0];
+			
+			// if animations are still active, or the active header is the target, ignore click
+			if(running || (settings.alwaysOpen && clickedActive) || !clicked.is(settings.header))
+				return;
+
+			// switch classes
+			active.parent().andSelf().toggleClass(settings.selectedClass);
+			if ( !clickedActive ) {
+				clicked.parent().andSelf().addClass(settings.selectedClass);
+			}
+
+			// find elements to show and hide
+			var toShow = clicked.next(),
+				toHide = active.next(),
+				data = [clicked, active, toShow, toHide],
+				down = headers.index( active[0] ) > headers.index( clicked[0] );
+			
+			active = clickedActive ? $([]) : clicked;
+			toggle( toShow, toHide, data, clickedActive, down );
+
+			return false;
+		};
+		function activateHandler(event, index) {
+			// IE manages to call activateHandler on normal clicks
+			if ( arguments.length == 1 )
+				return;
+			// call clickHandler with custom event
+			clickHandler({
+				target: findActive(index)[0]
+			});
+		};
+
+		return container
+			.bind(settings.event || "", clickHandler)
+			.bind("activate", activateHandler);
+	},
+	activate: function(index) {
+		return this.trigger('activate', [index]);
+	},
+	unaccordion: function() {
+		return this.find("*").andSelf().unbind().end().end();
+	}
+});
+
+})(jQuery);
\ No newline at end of file

Added: incubator/esme/trunk/server/src/main/webapp/scripts/ui.dialog.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/ui.dialog.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/ui.dialog.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/ui.dialog.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,186 @@
+(function($)
+{
+	//If the UI scope is not available, add it
+	$.ui = $.ui || {};
+
+	$.fn.dialog = function(o) {
+		return this.dialogInit(o).dialogOpen();
+	}
+	$.fn.dialogInit = function(o) {
+		return this.each(function() {
+			if (!$(this).is(".ui-dialog-content")) {
+				new $.ui.dialogInit(this, o);
+			}			
+		});
+	}
+	$.fn.dialogOpen = function() {
+		return this.each(function() {
+			var contentEl;
+			if ($(this).parents(".ui-dialog").length) contentEl = this;
+			if (!contentEl && $(this).is(".ui-dialog")) contentEl = $('.ui-dialog-content', this)[0];
+			$.ui.dialogOpen(contentEl)
+		});
+	}
+	$.fn.dialogClose = function() {
+		return this.each(function() {
+			var contentEl;
+			var closeEl = $(this);
+			if (closeEl.is('.ui-dialog-content')) {
+				var contentEl = closeEl;
+			} else if (closeEl.hasClass('ui-dialog')) {
+				contentEl = closeEl.find('.ui-dialog-content');
+			} else {
+				contentEl = closeEl.parents('.ui-dialog:first').find('.ui-dialog-content');
+			}
+			$.ui.dialogClose(contentEl[0]);
+		});
+	}
+
+	$.ui.dialogInit = function(el, o) {
+		
+		var options = {
+			width: 300,
+			height: 200,
+			minWidth: 150,
+			minHeight: 100,
+			position: 'center',
+			buttons: [],
+			draggable: true,
+			resizable: true
+		};
+		var o = o || {}; $.extend(options, o); //Extend and copy options
+		this.element = el; var self = this; //Do bindings
+		$.data(this.element, "ui-dialog", this);
+
+		var uiDialogContent = $(el).addClass('ui-dialog-content');
+
+		if (!uiDialogContent.parent().length) {
+			uiDialogContent.appendTo('body');
+		}
+		uiDialogContent
+			.wrap(document.createElement('div'))
+			.wrap(document.createElement('div'));
+		var uiDialogContainer = uiDialogContent.parent().addClass('ui-dialog-container').css({position: 'relative'});
+		var uiDialog = uiDialogContainer.parent().hide()
+			.addClass('ui-dialog')
+			.css({position: 'absolute', width: options.width, height: options.height, overflow: 'hidden'});
+
+		var classNames = uiDialogContent.attr('className').split(' ');
+
+		// Add content classes to dialog, to inherit theme at top level of element
+		$.each(classNames, function(i, className) {
+			if (className != 'ui-dialog-content')
+				uiDialog.addClass(className);
+		});
+		
+		if (options.resizable) {
+			uiDialog.append("<div class='ui-resizable-n ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-s ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-e ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-w ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-ne ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-se ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-sw ui-resizable-handle'></div>")
+				.append("<div class='ui-resizable-nw ui-resizable-handle'></div>");
+			uiDialog.resizable({ maxWidth: options.maxWidth, maxHeight: options.maxHeight, minWidth: options.minWidth, minHeight: options.minHeight });
+		}
+
+		uiDialogContainer.prepend('<div class="ui-dialog-titlebar"></div>');
+		var uiDialogTitlebar = $('.ui-dialog-titlebar', uiDialogContainer);
+		var title = (options.title) ? options.title : (uiDialogContent.attr('title')) ? uiDialogContent.attr('title') : '';
+		uiDialogTitlebar.append('<span class="ui-dialog-title">' + title + '</span>');
+		uiDialogTitlebar.append('<div class="ui-dialog-titlebar-close"></div>');
+		$('.ui-dialog-titlebar-close', uiDialogTitlebar)
+			.hover(function() { $(this).addClass('ui-dialog-titlebar-close-hover'); }, 
+			       function() { $(this).removeClass('ui-dialog-titlebar-close-hover'); })
+			.mousedown(function(ev) {
+				ev.stopPropagation();
+			})
+			.click(function() {
+				self.close();
+			});
+
+		var l = 0;
+		$.each(options.buttons, function() { l = 1; return false; });
+		if (l == 1) {
+			uiDialog.append('<div class="ui-dialog-buttonpane"></div>');
+			var uiDialogButtonPane = $('.ui-dialog-buttonpane', uiDialog);
+			$.each(options.buttons, function(name, value) {
+				var btn = $(document.createElement('button')).text(name).click(value);
+				uiDialogButtonPane.append(btn);
+			});
+		}
+	
+		if (options.draggable) {
+			uiDialog.draggable({ handle: '.ui-dialog-titlebar' });
+		}
+	
+		this.open = function() {
+			uiDialog.appendTo('body');
+			var wnd = $(window), doc = $(document), top = doc.scrollTop(), left = doc.scrollLeft();
+			if (options.position.constructor == Array) {
+				// [x, y]
+				top += options.position[1];
+				left += options.position[0];
+			} else {
+				switch (options.position) {
+					case 'center':
+						top += (wnd.height() / 2) - (uiDialog.height() / 2);
+						left += (wnd.width() / 2) - (uiDialog.width() / 2);
+						break;
+					case 'top':
+						top += 0;
+						left += (wnd.width() / 2) - (uiDialog.width() / 2);
+						break;
+					case 'right':
+						top += (wnd.height() / 2) - (uiDialog.height() / 2);
+						left += (wnd.width()) - (uiDialog.width());
+						break;
+					case 'bottom':
+						top += (wnd.height()) - (uiDialog.height());
+						left += (wnd.width() / 2) - (uiDialog.width() / 2);
+						break;
+					case 'left':
+						top += (wnd.height() / 2) - (uiDialog.height() / 2);
+						left += 0;
+						break;
+					default:
+						//center
+						top += (wnd.height() / 2) - (uiDialog.height() / 2);
+						left += (wnd.width() / 2) - (uiDialog.width() / 2);
+				}
+			}
+			top = top < doc.scrollTop() ? doc.scrollTop() : top;
+			uiDialog.css({top: top, left: left});
+			uiDialog.show();
+
+			// CALLBACK: open
+			var openEV = null;
+			var openUI = {
+				options: options
+			};
+			$(this.element).triggerHandler("dialogopen", [openEV, openUI], options.open);
+		};
+
+		this.close = function() {
+			uiDialog.hide();
+
+			// CALLBACK: close
+			var closeEV = null;
+			var closeUI = {
+				options: options
+			};
+			$(this.element).triggerHandler("dialogclose", [closeEV, closeUI], options.close);
+		};
+
+	}
+
+	$.ui.dialogOpen = function(el) {
+		$.data(el, "ui-dialog").open();
+	}
+
+	$.ui.dialogClose = function(el) {
+		$.data(el, "ui-dialog").close();
+	}
+
+})(jQuery);

Added: incubator/esme/trunk/server/src/main/webapp/scripts/ui.draggable.js
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/scripts/ui.draggable.js?rev=726084&view=auto
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/scripts/ui.draggable.js (added)
+++ incubator/esme/trunk/server/src/main/webapp/scripts/ui.draggable.js Fri Dec 12 10:32:17 2008
@@ -0,0 +1,181 @@
+(function($) {
+
+	//Make nodes selectable by expression
+	$.extend($.expr[':'], { draggable: "(' '+a.className+' ').indexOf(' ui-draggable ')" });
+
+
+	//Macros for external methods that support chaining
+	var methods = "destroy,enable,disable".split(",");
+	for(var i=0;i<methods.length;i++) {
+		var cur = methods[i], f;
+		eval('f = function() { var a = arguments; return this.each(function() { if(jQuery(this).is(".ui-draggable")) jQuery.data(this, "ui-draggable")["'+cur+'"](a); }); }');
+		$.fn["draggable"+cur.substr(0,1).toUpperCase()+cur.substr(1)] = f;
+	};
+	
+	//get instance method
+	$.fn.draggableInstance = function() {
+		if($(this[0]).is(".ui-draggable")) return $.data(this[0], "ui-draggable");
+		return false;
+	};
+
+	$.fn.draggable = function(o) {
+		return this.each(function() {
+			if(!$(this).is(".ui-draggable")) new $.ui.draggable(this, o);
+		});
+	}
+	
+	$.ui.ddmanager = {
+		current: null,
+		droppables: [],
+		prepareOffsets: function(t, e) {
+			var dropTop = $.ui.ddmanager.dropTop = [];
+			var dropLeft = $.ui.ddmanager.dropLeft;
+			var m = $.ui.ddmanager.droppables;
+			for (var i = 0; i < m.length; i++) {
+				if(m[i].item.disabled) continue;
+				m[i].offset = $(m[i].item.element).offset();
+				if (t && m[i].item.options.accept(t.element)) //Activate the droppable if used directly from draggables
+					m[i].item.activate.call(m[i].item, e);
+			}
+		},
+		fire: function(oDrag, e) {
+			
+			var oDrops = $.ui.ddmanager.droppables;
+			var oOvers = $.grep(oDrops, function(oDrop) {
+				if (!!oDrop && !oDrop.item.disabled && $.ui.intersect(oDrag, oDrop, oDrop.item.options.tolerance))
+					oDrop.item.drop.call(oDrop.item, e);
+			});
+			$.each(oDrops, function(i, oDrop) {
+				if (!oDrop.item.disabled && oDrop.item.options.accept(oDrag.element)) {
+					oDrop.out = 1; oDrop.over = 0;
+					oDrop.item.deactivate.call(oDrop.item, e);
+				}
+			});
+		},
+		update: function(oDrag, e) {
+			
+			if(oDrag.options.refreshPositions) $.ui.ddmanager.prepareOffsets();
+			
+			var oDrops = $.ui.ddmanager.droppables;
+			var oOvers = $.grep(oDrops, function(oDrop) {
+				if(oDrop.item.disabled) return false; 
+				var isOver = $.ui.intersect(oDrag, oDrop, oDrop.item.options.tolerance)
+				if (!isOver && oDrop.over == 1) {
+					oDrop.out = 1; oDrop.over = 0;
+					oDrop.item.out.call(oDrop.item, e);
+				}
+				return isOver;
+			});
+			$.each(oOvers, function(i, oOver) {
+				if (oOver.over == 0) {
+					oOver.out = 0; oOver.over = 1;
+					oOver.item.over.call(oOver.item, e);
+				}
+			});
+		}
+	};
+	
+	$.ui.draggable = function(el, o) {
+		
+		var options = {};
+		$.extend(options, o);
+		var self = this;
+		$.extend(options, {
+			_start: function(h, p, c, t, e) {
+				self.start.apply(t, [self, e]); // Trigger the start callback				
+			},
+			_beforeStop: function(h, p, c, t, e) {
+				self.stop.apply(t, [self, e]); // Trigger the start callback
+			},
+			_drag: function(h, p, c, t, e) {
+				self.drag.apply(t, [self, e]); // Trigger the start callback
+			},
+			startCondition: function(e) {
+				return !(e.target.className.indexOf("ui-resizable-handle") != -1 || self.disabled);	
+			}			
+		});
+		
+		$.data(el, "ui-draggable", this);
+		
+		if (options.ghosting == true) options.helper = 'clone'; //legacy option check
+		$(el).addClass("ui-draggable");
+		this.interaction = new $.ui.mouseInteraction(el, options);
+		
+	}
+	
+	$.extend($.ui.draggable.prototype, {
+		plugins: {},
+		currentTarget: null,
+		lastTarget: null,
+		destroy: function() {
+			$(this.interaction.element).removeClass("ui-draggable").removeClass("ui-draggable-disabled");
+			this.interaction.destroy();
+		},
+		enable: function() {
+			$(this.interaction.element).removeClass("ui-draggable-disabled");
+			this.disabled = false;
+		},
+		disable: function() {
+			$(this.interaction.element).addClass("ui-draggable-disabled");
+			this.disabled = true;
+		},
+		prepareCallbackObj: function(self) {
+			return {
+				helper: self.helper,
+				position: { left: self.pos[0], top: self.pos[1] },
+				offset: self.options.cursorAt,
+				draggable: self,
+				options: self.options	
+			}			
+		},
+		start: function(that, e) {
+			
+			var o = this.options;
+			$.ui.ddmanager.current = this;
+			
+			$.ui.plugin.call(that, 'start', [e, that.prepareCallbackObj(this)]);
+			$(this.element).triggerHandler("dragstart", [e, that.prepareCallbackObj(this)], o.start);
+			
+			if (this.slowMode && $.ui.droppable && !o.dropBehaviour)
+				$.ui.ddmanager.prepareOffsets(this, e);
+			
+			return false;
+						
+		},
+		stop: function(that, e) {			
+			
+			var o = this.options;
+			
+			$.ui.plugin.call(that, 'stop', [e, that.prepareCallbackObj(this)]);
+			$(this.element).triggerHandler("dragstop", [e, that.prepareCallbackObj(this)], o.stop);
+
+			if (this.slowMode && $.ui.droppable && !o.dropBehaviour) //If cursorAt is within the helper, we must use our drop manager
+				$.ui.ddmanager.fire(this, e);
+
+			$.ui.ddmanager.current = null;
+			$.ui.ddmanager.last = this;
+
+			return false;
+			
+		},
+		drag: function(that, e) {
+
+			var o = this.options;
+
+			$.ui.ddmanager.update(this, e);
+
+			this.pos = [this.pos[0]-o.cursorAt.left, this.pos[1]-o.cursorAt.top];
+
+			$.ui.plugin.call(that, 'drag', [e, that.prepareCallbackObj(this)]);
+			var nv = $(this.element).triggerHandler("drag", [e, that.prepareCallbackObj(this)], o.drag);
+
+			var nl = (nv && nv.left) ? nv.left : this.pos[0];
+			var nt = (nv && nv.top) ? nv.top : this.pos[1];
+			
+			$(this.helper).css('left', nl+'px').css('top', nt+'px'); // Stick the helper to the cursor
+			return false;
+			
+		}
+	});
+
+})(jQuery);



Mime
View raw message