Added: 
labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.autocomplete.js
URL: 
http://svn.apache.org/viewvc/labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.autocomplete.js?rev=1031625&view=auto
==============================================================================
--- 
labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.autocomplete.js
 (added)
+++ 
labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.autocomplete.js
 Fri Nov  5 15:25:30 2010
@@ -0,0 +1,555 @@
+/*
+ * jQuery UI Autocomplete 1.8.5
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.widget.js
+ *     jquery.ui.position.js
+ */
+(function( $, undefined ) {
+
+$.widget( "ui.autocomplete", {
+       options: {
+               appendTo: "body",
+               delay: 300,
+               minLength: 1,
+               position: {
+                       my: "left top",
+                       at: "left bottom",
+                       collision: "none"
+               },
+               source: null
+       },
+       _create: function() {
+               var self = this,
+                       doc = this.element[ 0 ].ownerDocument;
+               this.element
+                       .addClass( "ui-autocomplete-input" )
+                       .attr( "autocomplete", "off" )
+                       // TODO verify these actually work as intended
+                       .attr({
+                               role: "textbox",
+                               "aria-autocomplete": "list",
+                               "aria-haspopup": "true"
+                       })
+                       .bind( "keydown.autocomplete", function( event ) {
+                               if ( self.options.disabled ) {
+                                       return;
+                               }
+
+                               var keyCode = $.ui.keyCode;
+                               switch( event.keyCode ) {
+                               case keyCode.PAGE_UP:
+                                       self._move( "previousPage", event );
+                                       break;
+                               case keyCode.PAGE_DOWN:
+                                       self._move( "nextPage", event );
+                                       break;
+                               case keyCode.UP:
+                                       self._move( "previous", event );
+                                       // prevent moving cursor to beginning 
of text field in some browsers
+                                       event.preventDefault();
+                                       break;
+                               case keyCode.DOWN:
+                                       self._move( "next", event );
+                                       // prevent moving cursor to end of text 
field in some browsers
+                                       event.preventDefault();
+                                       break;
+                               case keyCode.ENTER:
+                               case keyCode.NUMPAD_ENTER:
+                                       // when menu is open or has focus
+                                       if ( self.menu.element.is( ":visible" ) 
) {
+                                               event.preventDefault();
+                                       }
+                                       //passthrough - ENTER and TAB both 
select the current element
+                               case keyCode.TAB:
+                                       if ( !self.menu.active ) {
+                                               return;
+                                       }
+                                       self.menu.select( event );
+                                       break;
+                               case keyCode.ESCAPE:
+                                       self.element.val( self.term );
+                                       self.close( event );
+                                       break;
+                               default:
+                                       // keypress is triggered before the 
input value is changed
+                                       clearTimeout( self.searching );
+                                       self.searching = setTimeout(function() {
+                                               // only search if the value has 
changed
+                                               if ( self.term != 
self.element.val() ) {
+                                                       self.selectedItem = 
null;
+                                                       self.search( null, 
event );
+                                               }
+                                       }, self.options.delay );
+                                       break;
+                               }
+                       })
+                       .bind( "focus.autocomplete", function() {
+                               if ( self.options.disabled ) {
+                                       return;
+                               }
+
+                               self.selectedItem = null;
+                               self.previous = self.element.val();
+                       })
+                       .bind( "blur.autocomplete", function( event ) {
+                               if ( self.options.disabled ) {
+                                       return;
+                               }
+
+                               clearTimeout( self.searching );
+                               // clicks on the menu (or a button to trigger a 
search) will cause a blur event
+                               self.closing = setTimeout(function() {
+                                       self.close( event );
+                                       self._change( event );
+                               }, 150 );
+                       });
+               this._initSource();
+               this.response = function() {
+                       return self._response.apply( self, arguments );
+               };
+               this.menu = $( "<ul></ul>" )
+                       .addClass( "ui-autocomplete" )
+                       .appendTo( $( this.options.appendTo || "body", doc )[0] 
)
+                       // prevent the close-on-blur in case of a "slow" click 
on the menu (long mousedown)
+                       .mousedown(function( event ) {
+                               // clicking on the scrollbar causes focus to 
shift to the body
+                               // but we can't detect a mouseup or a click 
immediately afterward
+                               // so we have to track the next mousedown and 
close the menu if
+                               // the user clicks somewhere outside of the 
autocomplete
+                               var menuElement = self.menu.element[ 0 ];
+                               if ( event.target === menuElement ) {
+                                       setTimeout(function() {
+                                               $( document ).one( 'mousedown', 
function( event ) {
+                                                       if ( event.target !== 
self.element[ 0 ] &&
+                                                               event.target 
!== menuElement &&
+                                                               !$.ui.contains( 
menuElement, event.target ) ) {
+                                                               self.close();
+                                                       }
+                                               });
+                                       }, 1 );
+                               }
+
+                               // use another timeout to make sure the 
blur-event-handler on the input was already triggered
+                               setTimeout(function() {
+                                       clearTimeout( self.closing );
+                               }, 13);
+                       })
+                       .menu({
+                               focus: function( event, ui ) {
+                                       var item = ui.item.data( 
"item.autocomplete" );
+                                       if ( false !== self._trigger( "focus", 
null, { item: item } ) ) {
+                                               // use value to match what will 
end up in the input, if it was a key event
+                                               if ( 
/^key/.test(event.originalEvent.type) ) {
+                                                       self.element.val( 
item.value );
+                                               }
+                                       }
+                               },
+                               selected: function( event, ui ) {
+                                       var item = ui.item.data( 
"item.autocomplete" ),
+                                               previous = self.previous;
+
+                                       // only trigger when focus was lost 
(click on menu)
+                                       if ( self.element[0] !== 
doc.activeElement ) {
+                                               self.element.focus();
+                                               self.previous = previous;
+                                       }
+
+                                       if ( false !== self._trigger( "select", 
event, { item: item } ) ) {
+                                               self.term = item.value;
+                                               self.element.val( item.value );
+                                       }
+
+                                       self.close( event );
+                                       self.selectedItem = item;
+                               },
+                               blur: function( event, ui ) {
+                                       // don't set the value of the text 
field if it's already correct
+                                       // this prevents moving the cursor 
unnecessarily
+                                       if ( self.menu.element.is(":visible") &&
+                                               ( self.element.val() !== 
self.term ) ) {
+                                               self.element.val( self.term );
+                                       }
+                               }
+                       })
+                       .zIndex( this.element.zIndex() + 1 )
+                       // workaround for jQuery bug #5781 
http://dev.jquery.com/ticket/5781
+                       .css({ top: 0, left: 0 })
+                       .hide()
+                       .data( "menu" );
+               if ( $.fn.bgiframe ) {
+                        this.menu.element.bgiframe();
+               }
+       },
+
+       destroy: function() {
+               this.element
+                       .removeClass( "ui-autocomplete-input" )
+                       .removeAttr( "autocomplete" )
+                       .removeAttr( "role" )
+                       .removeAttr( "aria-autocomplete" )
+                       .removeAttr( "aria-haspopup" );
+               this.menu.element.remove();
+               $.Widget.prototype.destroy.call( this );
+       },
+
+       _setOption: function( key, value ) {
+               $.Widget.prototype._setOption.apply( this, arguments );
+               if ( key === "source" ) {
+                       this._initSource();
+               }
+               if ( key === "appendTo" ) {
+                       this.menu.element.appendTo( $( value || "body", 
this.element[0].ownerDocument )[0] )
+               }
+       },
+
+       _initSource: function() {
+               var self = this,
+                       array,
+                       url;
+               if ( $.isArray(this.options.source) ) {
+                       array = this.options.source;
+                       this.source = function( request, response ) {
+                               response( $.ui.autocomplete.filter(array, 
request.term) );
+                       };
+               } else if ( typeof this.options.source === "string" ) {
+                       url = this.options.source;
+                       this.source = function( request, response ) {
+                               if (self.xhr) {
+                                       self.xhr.abort();
+                               }
+                               self.xhr = $.getJSON( url, request, function( 
data, status, xhr ) {
+                                       if ( xhr === self.xhr ) {
+                                               response( data );
+                                       }
+                                       self.xhr = null;
+                               });
+                       };
+               } else {
+                       this.source = this.options.source;
+               }
+       },
+
+       search: function( value, event ) {
+               value = value != null ? value : this.element.val();
+
+               // always save the actual value, not the one passed as an 
argument
+               this.term = this.element.val();
+
+               if ( value.length < this.options.minLength ) {
+                       return this.close( event );
+               }
+
+               clearTimeout( this.closing );
+               if ( this._trigger("search") === false ) {
+                       return;
+               }
+
+               return this._search( value );
+       },
+
+       _search: function( value ) {
+               this.element.addClass( "ui-autocomplete-loading" );
+
+               this.source( { term: value }, this.response );
+       },
+
+       _response: function( content ) {
+               if ( content.length ) {
+                       content = this._normalize( content );
+                       this._suggest( content );
+                       this._trigger( "open" );
+               } else {
+                       this.close();
+               }
+               this.element.removeClass( "ui-autocomplete-loading" );
+       },
+
+       close: function( event ) {
+               clearTimeout( this.closing );
+               if ( this.menu.element.is(":visible") ) {
+                       this._trigger( "close", event );
+                       this.menu.element.hide();
+                       this.menu.deactivate();
+               }
+       },
+       
+       _change: function( event ) {
+               if ( this.previous !== this.element.val() ) {
+                       this._trigger( "change", event, { item: 
this.selectedItem } );
+               }
+       },
+
+       _normalize: function( items ) {
+               // assume all items have the right format when the first item 
is complete
+               if ( items.length && items[0].label && items[0].value ) {
+                       return items;
+               }
+               return $.map( items, function(item) {
+                       if ( typeof item === "string" ) {
+                               return {
+                                       label: item,
+                                       value: item
+                               };
+                       }
+                       return $.extend({
+                               label: item.label || item.value,
+                               value: item.value || item.label
+                       }, item );
+               });
+       },
+
+       _suggest: function( items ) {
+               var ul = this.menu.element
+                               .empty()
+                               .zIndex( this.element.zIndex() + 1 ),
+                       menuWidth,
+                       textWidth;
+               this._renderMenu( ul, items );
+               // TODO refresh should check if the active item is still in the 
dom, removing the need for a manual deactivate
+               this.menu.deactivate();
+               this.menu.refresh();
+               this.menu.element.show().position( $.extend({
+                       of: this.element
+               }, this.options.position ));
+
+               menuWidth = ul.width( "" ).outerWidth();
+               textWidth = this.element.outerWidth();
+               ul.outerWidth( Math.max( menuWidth, textWidth ) );
+       },
+
+       _renderMenu: function( ul, items ) {
+               var self = this;
+               $.each( items, function( index, item ) {
+                       self._renderItem( ul, item );
+               });
+       },
+
+       _renderItem: function( ul, item) {
+               return $( "<li></li>" )
+                       .data( "item.autocomplete", item )
+                       .append( $( "<a></a>" ).text( item.label ) )
+                       .appendTo( ul );
+       },
+
+       _move: function( direction, event ) {
+               if ( !this.menu.element.is(":visible") ) {
+                       this.search( null, event );
+                       return;
+               }
+               if ( this.menu.first() && /^previous/.test(direction) ||
+                               this.menu.last() && /^next/.test(direction) ) {
+                       this.element.val( this.term );
+                       this.menu.deactivate();
+                       return;
+               }
+               this.menu[ direction ]( event );
+       },
+
+       widget: function() {
+               return this.menu.element;
+       }
+});
+
+$.extend( $.ui.autocomplete, {
+       escapeRegex: function( value ) {
+               return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
+       },
+       filter: function(array, term) {
+               var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), 
"i" );
+               return $.grep( array, function(value) {
+                       return matcher.test( value.label || value.value || 
value );
+               });
+       }
+});
+
+}( jQuery ));
+
+/*
+ * jQuery UI Menu (not officially released)
+ * 
+ * This widget isn't yet finished and the API is subject to change. We plan to 
finish
+ * it for the next release. You're welcome to give it a try anyway and give us 
feedback,
+ * as long as you're okay with migrating your code later on. We can help with 
that, too.
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *  jquery.ui.widget.js
+ */
+(function($) {
+
+$.widget("ui.menu", {
+       _create: function() {
+               var self = this;
+               this.element
+                       .addClass("ui-menu ui-widget ui-widget-content 
ui-corner-all")
+                       .attr({
+                               role: "listbox",
+                               "aria-activedescendant": "ui-active-menuitem"
+                       })
+                       .click(function( event ) {
+                               if ( !$( event.target ).closest( ".ui-menu-item 
a" ).length ) {
+                                       return;
+                               }
+                               // temporary
+                               event.preventDefault();
+                               self.select( event );
+                       });
+               this.refresh();
+       },
+       
+       refresh: function() {
+               var self = this;
+
+               // don't refresh list items that are already adapted
+               var items = 
this.element.children("li:not(.ui-menu-item):has(a)")
+                       .addClass("ui-menu-item")
+                       .attr("role", "menuitem");
+               
+               items.children("a")
+                       .addClass("ui-corner-all")
+                       .attr("tabindex", -1)
+                       // mouseenter doesn't work with event delegation
+                       .mouseenter(function( event ) {
+                               self.activate( event, $(this).parent() );
+                       })
+                       .mouseleave(function() {
+                               self.deactivate();
+                       });
+       },
+
+       activate: function( event, item ) {
+               this.deactivate();
+               if (this.hasScroll()) {
+                       var offset = item.offset().top - 
this.element.offset().top,
+                               scroll = this.element.attr("scrollTop"),
+                               elementHeight = this.element.height();
+                       if (offset < 0) {
+                               this.element.attr("scrollTop", scroll + offset);
+                       } else if (offset >= elementHeight) {
+                               this.element.attr("scrollTop", scroll + offset 
- elementHeight + item.height());
+                       }
+               }
+               this.active = item.eq(0)
+                       .children("a")
+                               .addClass("ui-state-hover")
+                               .attr("id", "ui-active-menuitem")
+                       .end();
+               this._trigger("focus", event, { item: item });
+       },
+
+       deactivate: function() {
+               if (!this.active) { return; }
+
+               this.active.children("a")
+                       .removeClass("ui-state-hover")
+                       .removeAttr("id");
+               this._trigger("blur");
+               this.active = null;
+       },
+
+       next: function(event) {
+               this.move("next", ".ui-menu-item:first", event);
+       },
+
+       previous: function(event) {
+               this.move("prev", ".ui-menu-item:last", event);
+       },
+
+       first: function() {
+               return this.active && 
!this.active.prevAll(".ui-menu-item").length;
+       },
+
+       last: function() {
+               return this.active && 
!this.active.nextAll(".ui-menu-item").length;
+       },
+
+       move: function(direction, edge, event) {
+               if (!this.active) {
+                       this.activate(event, this.element.children(edge));
+                       return;
+               }
+               var next = this.active[direction + 
"All"](".ui-menu-item").eq(0);
+               if (next.length) {
+                       this.activate(event, next);
+               } else {
+                       this.activate(event, this.element.children(edge));
+               }
+       },
+
+       // TODO merge with previousPage
+       nextPage: function(event) {
+               if (this.hasScroll()) {
+                       // TODO merge with no-scroll-else
+                       if (!this.active || this.last()) {
+                               this.activate(event, 
this.element.children(":first"));
+                               return;
+                       }
+                       var base = this.active.offset().top,
+                               height = this.element.height(),
+                               result = 
this.element.children("li").filter(function() {
+                                       var close = $(this).offset().top - base 
- height + $(this).height();
+                                       // TODO improve approximation
+                                       return close < 10 && close > -10;
+                               });
+
+                       // TODO try to catch this earlier when scrollTop 
indicates the last page anyway
+                       if (!result.length) {
+                               result = this.element.children(":last");
+                       }
+                       this.activate(event, result);
+               } else {
+                       this.activate(event, this.element.children(!this.active 
|| this.last() ? ":first" : ":last"));
+               }
+       },
+
+       // TODO merge with nextPage
+       previousPage: function(event) {
+               if (this.hasScroll()) {
+                       // TODO merge with no-scroll-else
+                       if (!this.active || this.first()) {
+                               this.activate(event, 
this.element.children(":last"));
+                               return;
+                       }
+
+                       var base = this.active.offset().top,
+                               height = this.element.height();
+                               result = 
this.element.children("li").filter(function() {
+                                       var close = $(this).offset().top - base 
+ height - $(this).height();
+                                       // TODO improve approximation
+                                       return close < 10 && close > -10;
+                               });
+
+                       // TODO try to catch this earlier when scrollTop 
indicates the last page anyway
+                       if (!result.length) {
+                               result = this.element.children(":first");
+                       }
+                       this.activate(event, result);
+               } else {
+                       this.activate(event, this.element.children(!this.active 
|| this.first() ? ":last" : ":first"));
+               }
+       },
+
+       hasScroll: function() {
+               return this.element.height() < 
this.element.attr("scrollHeight");
+       },
+
+       select: function( event ) {
+               this._trigger("selected", event, { item: this.active });
+       }
+});
+
+}(jQuery));

Added: 
labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.button.js
URL: 
http://svn.apache.org/viewvc/labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.button.js?rev=1031625&view=auto
==============================================================================
--- labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.button.js 
(added)
+++ labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.button.js 
Fri Nov  5 15:25:30 2010
@@ -0,0 +1,372 @@
+/*
+ * jQuery UI Button 1.8.5
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button
+ *
+ * Depends:
+ *     jquery.ui.core.js
+ *     jquery.ui.widget.js
+ */
+(function( $, undefined ) {
+
+var lastActive,
+       baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
+       stateClasses = "ui-state-hover ui-state-active ",
+       typeClasses = "ui-button-icons-only ui-button-icon-only 
ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary 
ui-button-text-only",
+       formResetHandler = function( event ) {
+               $( ":ui-button", event.target.form ).each(function() {
+                       var inst = $( this ).data( "button" );
+                       setTimeout(function() {
+                               inst.refresh();
+                       }, 1 );
+               });
+       },
+       radioGroup = function( radio ) {
+               var name = radio.name,
+                       form = radio.form,
+                       radios = $( [] );
+               if ( name ) {
+                       if ( form ) {
+                               radios = $( form ).find( "[name='" + name + 
"']" );
+                       } else {
+                               radios = $( "[name='" + name + "']", 
radio.ownerDocument )
+                                       .filter(function() {
+                                               return !this.form;
+                                       });
+                       }
+               }
+               return radios;
+       };
+
+$.widget( "ui.button", {
+       options: {
+               disabled: null,
+               text: true,
+               label: null,
+               icons: {
+                       primary: null,
+                       secondary: null
+               }
+       },
+       _create: function() {
+               this.element.closest( "form" )
+                       .unbind( "reset.button" )
+                       .bind( "reset.button", formResetHandler );
+
+               if ( typeof this.options.disabled !== "boolean" ) {
+                       this.options.disabled = this.element.attr( "disabled" );
+               }
+
+               this._determineButtonType();
+               this.hasTitle = !!this.buttonElement.attr( "title" );
+
+               var self = this,
+                       options = this.options,
+                       toggleButton = this.type === "checkbox" || this.type 
=== "radio",
+                       hoverClass = "ui-state-hover" + ( !toggleButton ? " 
ui-state-active" : "" ),
+                       focusClass = "ui-state-focus";
+
+               if ( options.label === null ) {
+                       options.label = this.buttonElement.html();
+               }
+
+               if ( this.element.is( ":disabled" ) ) {
+                       options.disabled = true;
+               }
+
+               this.buttonElement
+                       .addClass( baseClasses )
+                       .attr( "role", "button" )
+                       .bind( "mouseenter.button", function() {
+                               if ( options.disabled ) {
+                                       return;
+                               }
+                               $( this ).addClass( "ui-state-hover" );
+                               if ( this === lastActive ) {
+                                       $( this ).addClass( "ui-state-active" );
+                               }
+                       })
+                       .bind( "mouseleave.button", function() {
+                               if ( options.disabled ) {
+                                       return;
+                               }
+                               $( this ).removeClass( hoverClass );
+                       })
+                       .bind( "focus.button", function() {
+                               // no need to check disabled, focus won't be 
triggered anyway
+                               $( this ).addClass( focusClass );
+                       })
+                       .bind( "blur.button", function() {
+                               $( this ).removeClass( focusClass );
+                       });
+
+               if ( toggleButton ) {
+                       this.element.bind( "change.button", function() {
+                               self.refresh();
+                       });
+               }
+
+               if ( this.type === "checkbox" ) {
+                       this.buttonElement.bind( "click.button", function() {
+                               if ( options.disabled ) {
+                                       return false;
+                               }
+                               $( this ).toggleClass( "ui-state-active" );
+                               self.buttonElement.attr( "aria-pressed", 
self.element[0].checked );
+                       });
+               } else if ( this.type === "radio" ) {
+                       this.buttonElement.bind( "click.button", function() {
+                               if ( options.disabled ) {
+                                       return false;
+                               }
+                               $( this ).addClass( "ui-state-active" );
+                               self.buttonElement.attr( "aria-pressed", true );
+
+                               var radio = self.element[ 0 ];
+                               radioGroup( radio )
+                                       .not( radio )
+                                       .map(function() {
+                                               return $( this ).button( 
"widget" )[ 0 ];
+                                       })
+                                       .removeClass( "ui-state-active" )
+                                       .attr( "aria-pressed", false );
+                       });
+               } else {
+                       this.buttonElement
+                               .bind( "mousedown.button", function() {
+                                       if ( options.disabled ) {
+                                               return false;
+                                       }
+                                       $( this ).addClass( "ui-state-active" );
+                                       lastActive = this;
+                                       $( document ).one( "mouseup", 
function() {
+                                               lastActive = null;
+                                       });
+                               })
+                               .bind( "mouseup.button", function() {
+                                       if ( options.disabled ) {
+                                               return false;
+                                       }
+                                       $( this ).removeClass( 
"ui-state-active" );
+                               })
+                               .bind( "keydown.button", function(event) {
+                                       if ( options.disabled ) {
+                                               return false;
+                                       }
+                                       if ( event.keyCode == 
$.ui.keyCode.SPACE || event.keyCode == $.ui.keyCode.ENTER ) {
+                                               $( this ).addClass( 
"ui-state-active" );
+                                       }
+                               })
+                               .bind( "keyup.button", function() {
+                                       $( this ).removeClass( 
"ui-state-active" );
+                               });
+
+                       if ( this.buttonElement.is("a") ) {
+                               this.buttonElement.keyup(function(event) {
+                                       if ( event.keyCode === 
$.ui.keyCode.SPACE ) {
+                                               // TODO pass through original 
event correctly (just as 2nd argument doesn't work)
+                                               $( this ).click();
+                                       }
+                               });
+                       }
+               }
+
+               // TODO: pull out $.Widget's handling for the disabled option 
into
+               // $.Widget.prototype._setOptionDisabled so it's easy to proxy 
and can
+               // be overridden by individual plugins
+               this._setOption( "disabled", options.disabled );
+       },
+
+       _determineButtonType: function() {
+               
+               if ( this.element.is(":checkbox") ) {
+                       this.type = "checkbox";
+               } else {
+                       if ( this.element.is(":radio") ) {
+                               this.type = "radio";
+                       } else {
+                               if ( this.element.is("input") ) {
+                                       this.type = "input";
+                               } else {
+                                       this.type = "button";
+                               }
+                       }
+               }
+               
+               if ( this.type === "checkbox" || this.type === "radio" ) {
+                       // we don't search against the document in case the 
element
+                       // is disconnected from the DOM
+                       this.buttonElement = this.element.parents().last()
+                               .find( "label[for=" + this.element.attr("id") + 
"]" );
+                       this.element.addClass( "ui-helper-hidden-accessible" );
+
+                       var checked = this.element.is( ":checked" );
+                       if ( checked ) {
+                               this.buttonElement.addClass( "ui-state-active" 
);
+                       }
+                       this.buttonElement.attr( "aria-pressed", checked );
+               } else {
+                       this.buttonElement = this.element;
+               }
+       },
+
+       widget: function() {
+               return this.buttonElement;
+       },
+
+       destroy: function() {
+               this.element
+                       .removeClass( "ui-helper-hidden-accessible" );
+               this.buttonElement
+                       .removeClass( baseClasses + " " + stateClasses + " " + 
typeClasses )
+                       .removeAttr( "role" )
+                       .removeAttr( "aria-pressed" )
+                       .html( 
this.buttonElement.find(".ui-button-text").html() );
+
+               if ( !this.hasTitle ) {
+                       this.buttonElement.removeAttr( "title" );
+               }
+
+               $.Widget.prototype.destroy.call( this );
+       },
+
+       _setOption: function( key, value ) {
+               $.Widget.prototype._setOption.apply( this, arguments );
+               if ( key === "disabled" ) {
+                       if ( value ) {
+                               this.element.attr( "disabled", true );
+                       } else {
+                               this.element.removeAttr( "disabled" );
+                       }
+               }
+               this._resetButton();
+       },
+
+       refresh: function() {
+               var isDisabled = this.element.is( ":disabled" );
+               if ( isDisabled !== this.options.disabled ) {
+                       this._setOption( "disabled", isDisabled );
+               }
+               if ( this.type === "radio" ) {
+                       radioGroup( this.element[0] ).each(function() {
+                               if ( $( this ).is( ":checked" ) ) {
+                                       $( this ).button( "widget" )
+                                               .addClass( "ui-state-active" )
+                                               .attr( "aria-pressed", true );
+                               } else {
+                                       $( this ).button( "widget" )
+                                               .removeClass( "ui-state-active" 
)
+                                               .attr( "aria-pressed", false );
+                               }
+                       });
+               } else if ( this.type === "checkbox" ) {
+                       if ( this.element.is( ":checked" ) ) {
+                               this.buttonElement
+                                       .addClass( "ui-state-active" )
+                                       .attr( "aria-pressed", true );
+                       } else {
+                               this.buttonElement
+                                       .removeClass( "ui-state-active" )
+                                       .attr( "aria-pressed", false );
+                       }
+               }
+       },
+
+       _resetButton: function() {
+               if ( this.type === "input" ) {
+                       if ( this.options.label ) {
+                               this.element.val( this.options.label );
+                       }
+                       return;
+               }
+               var buttonElement = this.buttonElement.removeClass( typeClasses 
),
+                       buttonText = $( "<span></span>" )
+                               .addClass( "ui-button-text" )
+                               .html( this.options.label )
+                               .appendTo( buttonElement.empty() )
+                               .text(),
+                       icons = this.options.icons,
+                       multipleIcons = icons.primary && icons.secondary;
+               if ( icons.primary || icons.secondary ) {
+                       buttonElement.addClass( "ui-button-text-icon" +
+                               ( multipleIcons ? "s" : ( icons.primary ? 
"-primary" : "-secondary" ) ) );
+                       if ( icons.primary ) {
+                               buttonElement.prepend( "<span 
class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
+                       }
+                       if ( icons.secondary ) {
+                               buttonElement.append( "<span 
class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
+                       }
+                       if ( !this.options.text ) {
+                               buttonElement
+                                       .addClass( multipleIcons ? 
"ui-button-icons-only" : "ui-button-icon-only" )
+                                       .removeClass( "ui-button-text-icons 
ui-button-text-icon-primary ui-button-text-icon-secondary" );
+                               if ( !this.hasTitle ) {
+                                       buttonElement.attr( "title", buttonText 
);
+                               }
+                       }
+               } else {
+                       buttonElement.addClass( "ui-button-text-only" );
+               }
+       }
+});
+
+$.widget( "ui.buttonset", {
+       _create: function() {
+               this.element.addClass( "ui-buttonset" );
+               this._init();
+       },
+       
+       _init: function() {
+               this.refresh();
+       },
+
+       _setOption: function( key, value ) {
+               if ( key === "disabled" ) {
+                       this.buttons.button( "option", key, value );
+               }
+
+               $.Widget.prototype._setOption.apply( this, arguments );
+       },
+       
+       refresh: function() {
+               this.buttons = this.element.find( ":button, :submit, :reset, 
:checkbox, :radio, a, :data(button)" )
+                       .filter( ":ui-button" )
+                               .button( "refresh" )
+                       .end()
+                       .not( ":ui-button" )
+                               .button()
+                       .end()
+                       .map(function() {
+                               return $( this ).button( "widget" )[ 0 ];
+                       })
+                               .removeClass( "ui-corner-all ui-corner-left 
ui-corner-right" )
+                               .filter( ":visible" )
+                                       .filter( ":first" )
+                                               .addClass( "ui-corner-left" )
+                                       .end()
+                                       .filter( ":last" )
+                                               .addClass( "ui-corner-right" )
+                                       .end()
+                               .end()
+                       .end();
+       },
+
+       destroy: function() {
+               this.element.removeClass( "ui-buttonset" );
+               this.buttons
+                       .map(function() {
+                               return $( this ).button( "widget" )[ 0 ];
+                       })
+                               .removeClass( "ui-corner-left ui-corner-right" )
+                       .end()
+                       .button( "destroy" );
+
+               $.Widget.prototype.destroy.call( this );
+       }
+});
+
+}( jQuery ) );

Added: labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.core.js
URL: 
http://svn.apache.org/viewvc/labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.core.js?rev=1031625&view=auto
==============================================================================
--- labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.core.js 
(added)
+++ labs/pulse/web-reports/jquery/ui/development-bundle/ui/jquery.ui.core.js 
Fri Nov  5 15:25:30 2010
@@ -0,0 +1,307 @@
+/*!
+ * jQuery UI 1.8.5
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */
+(function( $, undefined ) {
+
+// prevent duplicate loading
+// this is only a problem because we proxy existing functions
+// and we don't want to double proxy them
+$.ui = $.ui || {};
+if ( $.ui.version ) {
+       return;
+}
+
+$.extend( $.ui, {
+       version: "1.8.5",
+
+       keyCode: {
+               ALT: 18,
+               BACKSPACE: 8,
+               CAPS_LOCK: 20,
+               COMMA: 188,
+               COMMAND: 91,
+               COMMAND_LEFT: 91, // COMMAND
+               COMMAND_RIGHT: 93,
+               CONTROL: 17,
+               DELETE: 46,
+               DOWN: 40,
+               END: 35,
+               ENTER: 13,
+               ESCAPE: 27,
+               HOME: 36,
+               INSERT: 45,
+               LEFT: 37,
+               MENU: 93, // COMMAND_RIGHT
+               NUMPAD_ADD: 107,
+               NUMPAD_DECIMAL: 110,
+               NUMPAD_DIVIDE: 111,
+               NUMPAD_ENTER: 108,
+               NUMPAD_MULTIPLY: 106,
+               NUMPAD_SUBTRACT: 109,
+               PAGE_DOWN: 34,
+               PAGE_UP: 33,
+               PERIOD: 190,
+               RIGHT: 39,
+               SHIFT: 16,
+               SPACE: 32,
+               TAB: 9,
+               UP: 38,
+               WINDOWS: 91 // COMMAND
+       }
+});
+
+// plugins
+$.fn.extend({
+       _focus: $.fn.focus,
+       focus: function( delay, fn ) {
+               return typeof delay === "number" ?
+                       this.each(function() {
+                               var elem = this;
+                               setTimeout(function() {
+                                       $( elem ).focus();
+                                       if ( fn ) {
+                                               fn.call( elem );
+                                       }
+                               }, delay );
+                       }) :
+                       this._focus.apply( this, arguments );
+       },
+
+       scrollParent: function() {
+               var scrollParent;
+               if (($.browser.msie && 
(/(static|relative)/).test(this.css('position'))) || 
(/absolute/).test(this.css('position'))) {
+                       scrollParent = this.parents().filter(function() {
+                               return 
(/(relative|absolute|fixed)/).test($.curCSS(this,'position',1)) && 
(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                       }).eq(0);
+               } else {
+                       scrollParent = this.parents().filter(function() {
+                               return 
(/(auto|scroll)/).test($.curCSS(this,'overflow',1)+$.curCSS(this,'overflow-y',1)+$.curCSS(this,'overflow-x',1));
+                       }).eq(0);
+               }
+
+               return (/fixed/).test(this.css('position')) || 
!scrollParent.length ? $(document) : scrollParent;
+       },
+
+       zIndex: function( zIndex ) {
+               if ( zIndex !== undefined ) {
+                       return this.css( "zIndex", zIndex );
+               }
+
+               if ( this.length ) {
+                       var elem = $( this[ 0 ] ), position, value;
+                       while ( elem.length && elem[ 0 ] !== document ) {
+                               // Ignore z-index if position is set to a value 
where z-index is ignored by the browser
+                               // This makes behavior of this function 
consistent across browsers
+                               // WebKit always returns auto if the element is 
positioned
+                               position = elem.css( "position" );
+                               if ( position === "absolute" || position === 
"relative" || position === "fixed" ) {
+                                       // IE returns 0 when zIndex is not 
specified
+                                       // other browsers return a string
+                                       // we ignore the case of nested 
elements with an explicit value of 0
+                                       // <div style="z-index: -10;"><div 
style="z-index: 0;"></div></div>
+                                       value = parseInt( elem.css( "zIndex" ) 
);
+                                       if ( !isNaN( value ) && value != 0 ) {
+                                               return value;
+                                       }
+                               }
+                               elem = elem.parent();
+                       }
+               }
+
+               return 0;
+       },
+       
+       disableSelection: function() {
+               return this.bind(
+                       "mousedown.ui-disableSelection 
selectstart.ui-disableSelection",
+                       function( event ) {
+                               event.preventDefault();
+                       });
+       },
+
+       enableSelection: function() {
+               return this.unbind( ".ui-disableSelection" );
+       }
+});
+
+$.each( [ "Width", "Height" ], function( i, name ) {
+       var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+               type = name.toLowerCase(),
+               orig = {
+                       innerWidth: $.fn.innerWidth,
+                       innerHeight: $.fn.innerHeight,
+                       outerWidth: $.fn.outerWidth,
+                       outerHeight: $.fn.outerHeight
+               };
+
+       function reduce( elem, size, border, margin ) {
+               $.each( side, function() {
+                       size -= parseFloat( $.curCSS( elem, "padding" + this, 
true) ) || 0;
+                       if ( border ) {
+                               size -= parseFloat( $.curCSS( elem, "border" + 
this + "Width", true) ) || 0;
+                       }
+                       if ( margin ) {
+                               size -= parseFloat( $.curCSS( elem, "margin" + 
this, true) ) || 0;
+                       }
+               });
+               return size;
+       }
+
+       $.fn[ "inner" + name ] = function( size ) {
+               if ( size === undefined ) {
+                       return orig[ "inner" + name ].call( this );
+               }
+
+               return this.each(function() {
+                       $.style( this, type, reduce( this, size ) + "px" );
+               });
+       };
+
+       $.fn[ "outer" + name] = function( size, margin ) {
+               if ( typeof size !== "number" ) {
+                       return orig[ "outer" + name ].call( this, size );
+               }
+
+               return this.each(function() {
+                       $.style( this, type, reduce( this, size, true, margin ) 
+ "px" );
+               });
+       };
+});
+
+// selectors
+function visible( element ) {
+       return !$( element ).parents().andSelf().filter(function() {
+               return $.curCSS( this, "visibility" ) === "hidden" ||
+                       $.expr.filters.hidden( this );
+       }).length;
+}
+
+$.extend( $.expr[ ":" ], {
+       data: function( elem, i, match ) {
+               return !!$.data( elem, match[ 3 ] );
+       },
+
+       focusable: function( element ) {
+               var nodeName = element.nodeName.toLowerCase(),
+                       tabIndex = $.attr( element, "tabindex" );
+               if ( "area" === nodeName ) {
+                       var map = element.parentNode,
+                               mapName = map.name,
+                               img;
+                       if ( !element.href || !mapName || 
map.nodeName.toLowerCase() !== "map" ) {
+                               return false;
+                       }
+                       img = $( "img[usemap=#" + mapName + "]" )[0];
+                       return !!img && visible( img );
+               }
+               return ( /input|select|textarea|button|object/.test( nodeName )
+                       ? !element.disabled
+                       : "a" == nodeName
+                               ? element.href || !isNaN( tabIndex )
+                               : !isNaN( tabIndex ))
+                       // the element and all of its ancestors must be visible
+                       && visible( element );
+       },
+
+       tabbable: function( element ) {
+               var tabIndex = $.attr( element, "tabindex" );
+               return ( isNaN( tabIndex ) || tabIndex >= 0 ) && $( element 
).is( ":focusable" );
+       }
+});
+
+// support
+$(function() {
+       var div = document.createElement( "div" ),
+               body = document.body;
+
+       $.extend( div.style, {
+               minHeight: "100px",
+               height: "auto",
+               padding: 0,
+               borderWidth: 0
+       });
+
+       $.support.minHeight = body.appendChild( div ).offsetHeight === 100;
+       // set display to none to avoid a layout bug in IE
+       // http://dev.jquery.com/ticket/4014
+       body.removeChild( div ).style.display = "none";
+});
+
+
+
+
+
+// deprecated
+$.extend( $.ui, {
+       // $.ui.plugin is deprecated.  Use the proxy pattern instead.
+       plugin: {
+               add: function( module, option, set ) {
+                       var proto = $.ui[ module ].prototype;
+                       for ( var i in set ) {
+                               proto.plugins[ i ] = proto.plugins[ i ] || [];
+                               proto.plugins[ i ].push( [ option, set[ i ] ] );
+                       }
+               },
+               call: function( instance, name, args ) {
+                       var set = instance.plugins[ name ];
+                       if ( !set || !instance.element[ 0 ].parentNode ) {
+                               return;
+                       }
+       
+                       for ( var i = 0; i < set.length; i++ ) {
+                               if ( instance.options[ set[ i ][ 0 ] ] ) {
+                                       set[ i ][ 1 ].apply( instance.element, 
args );
+                               }
+                       }
+               }
+       },
+       
+       // will be deprecated when we switch to jQuery 1.4 - use 
jQuery.contains()
+       contains: function( a, b ) {
+               return document.compareDocumentPosition ?
+                       a.compareDocumentPosition( b ) & 16 :
+                       a !== b && a.contains( b );
+       },
+       
+       // only used by resizable
+       hasScroll: function( el, a ) {
+       
+               //If overflow is hidden, the element might have extra content, 
but the user wants to hide it
+               if ( $( el ).css( "overflow" ) === "hidden") {
+                       return false;
+               }
+       
+               var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+                       has = false;
+       
+               if ( el[ scroll ] > 0 ) {
+                       return true;
+               }
+       
+               // TODO: determine which cases actually cause this to happen
+               // if the element doesn't have the scroll set, see if it's 
possible to
+               // set the scroll
+               el[ scroll ] = 1;
+               has = ( el[ scroll ] > 0 );
+               el[ scroll ] = 0;
+               return has;
+       },
+       
+       // these are odd functions, fix the API or move into individual plugins
+       isOverAxis: function( x, reference, size ) {
+               //Determines when x coordinate is over "b" element axis
+               return ( x > reference ) && ( x < ( reference + size ) );
+       },
+       isOver: function( y, x, top, left, height, width ) {
+               //Determines when x, y coordinates is over "b" element
+               return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, 
left, width );
+       }
+});
+
+})( jQuery );



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to