1 /*! jQuery UI - v1.11.1 - 2014-08-13
3 * Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
4 * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
7 if ( typeof define === "function" && define.amd ) {
9 // AMD. Register as an anonymous module.
10 define([ "jquery" ], factory );
18 * jQuery UI Core 1.11.1
21 * Copyright 2014 jQuery Foundation and other contributors
22 * Released under the MIT license.
23 * http://jquery.org/license
25 * http://api.jqueryui.com/category/ui-core/
29 // $.ui might exist from components with no dependencies, e.g., $.ui.position
57 scrollParent: function( includeHidden ) {
58 var position = this.css( "position" ),
59 excludeStaticParent = position === "absolute",
60 overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
61 scrollParent = this.parents().filter( function() {
62 var parent = $( this );
63 if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
66 return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
69 return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
72 uniqueId: (function() {
76 return this.each(function() {
78 this.id = "ui-id-" + ( ++uuid );
84 removeUniqueId: function() {
85 return this.each(function() {
86 if ( /^ui-id-\d+$/.test( this.id ) ) {
87 $( this ).removeAttr( "id" );
94 function focusable( element, isTabIndexNotNaN ) {
95 var map, mapName, img,
96 nodeName = element.nodeName.toLowerCase();
97 if ( "area" === nodeName ) {
98 map = element.parentNode;
100 if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
103 img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
104 return !!img && visible( img );
106 return ( /input|select|textarea|button|object/.test( nodeName ) ?
109 element.href || isTabIndexNotNaN :
111 // the element and all of its ancestors must be visible
115 function visible( element ) {
116 return $.expr.filters.visible( element ) &&
117 !$( element ).parents().addBack().filter(function() {
118 return $.css( this, "visibility" ) === "hidden";
122 $.extend( $.expr[ ":" ], {
123 data: $.expr.createPseudo ?
124 $.expr.createPseudo(function( dataName ) {
125 return function( elem ) {
126 return !!$.data( elem, dataName );
129 // support: jQuery <1.8
130 function( elem, i, match ) {
131 return !!$.data( elem, match[ 3 ] );
134 focusable: function( element ) {
135 return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
138 tabbable: function( element ) {
139 var tabIndex = $.attr( element, "tabindex" ),
140 isTabIndexNaN = isNaN( tabIndex );
141 return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
145 // support: jQuery <1.8
146 if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
147 $.each( [ "Width", "Height" ], function( i, name ) {
148 var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
149 type = name.toLowerCase(),
151 innerWidth: $.fn.innerWidth,
152 innerHeight: $.fn.innerHeight,
153 outerWidth: $.fn.outerWidth,
154 outerHeight: $.fn.outerHeight
157 function reduce( elem, size, border, margin ) {
158 $.each( side, function() {
159 size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
161 size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
164 size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
170 $.fn[ "inner" + name ] = function( size ) {
171 if ( size === undefined ) {
172 return orig[ "inner" + name ].call( this );
175 return this.each(function() {
176 $( this ).css( type, reduce( this, size ) + "px" );
180 $.fn[ "outer" + name] = function( size, margin ) {
181 if ( typeof size !== "number" ) {
182 return orig[ "outer" + name ].call( this, size );
185 return this.each(function() {
186 $( this).css( type, reduce( this, size, true, margin ) + "px" );
192 // support: jQuery <1.8
193 if ( !$.fn.addBack ) {
194 $.fn.addBack = function( selector ) {
195 return this.add( selector == null ?
196 this.prevObject : this.prevObject.filter( selector )
201 // support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
202 if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
203 $.fn.removeData = (function( removeData ) {
204 return function( key ) {
205 if ( arguments.length ) {
206 return removeData.call( this, $.camelCase( key ) );
208 return removeData.call( this );
211 })( $.fn.removeData );
215 $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
218 focus: (function( orig ) {
219 return function( delay, fn ) {
220 return typeof delay === "number" ?
221 this.each(function() {
223 setTimeout(function() {
230 orig.apply( this, arguments );
234 disableSelection: (function() {
235 var eventType = "onselectstart" in document.createElement( "div" ) ?
240 return this.bind( eventType + ".ui-disableSelection", function( event ) {
241 event.preventDefault();
246 enableSelection: function() {
247 return this.unbind( ".ui-disableSelection" );
250 zIndex: function( zIndex ) {
251 if ( zIndex !== undefined ) {
252 return this.css( "zIndex", zIndex );
256 var elem = $( this[ 0 ] ), position, value;
257 while ( elem.length && elem[ 0 ] !== document ) {
258 // Ignore z-index if position is set to a value where z-index is ignored by the browser
259 // This makes behavior of this function consistent across browsers
260 // WebKit always returns auto if the element is positioned
261 position = elem.css( "position" );
262 if ( position === "absolute" || position === "relative" || position === "fixed" ) {
263 // IE returns 0 when zIndex is not specified
264 // other browsers return a string
265 // we ignore the case of nested elements with an explicit value of 0
266 // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
267 value = parseInt( elem.css( "zIndex" ), 10 );
268 if ( !isNaN( value ) && value !== 0 ) {
272 elem = elem.parent();
280 // $.ui.plugin is deprecated. Use $.widget() extensions instead.
282 add: function( module, option, set ) {
284 proto = $.ui[ module ].prototype;
286 proto.plugins[ i ] = proto.plugins[ i ] || [];
287 proto.plugins[ i ].push( [ option, set[ i ] ] );
290 call: function( instance, name, args, allowDisconnected ) {
292 set = instance.plugins[ name ];
298 if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
302 for ( i = 0; i < set.length; i++ ) {
303 if ( instance.options[ set[ i ][ 0 ] ] ) {
304 set[ i ][ 1 ].apply( instance.element, args );
312 * jQuery UI Widget 1.11.1
313 * http://jqueryui.com
315 * Copyright 2014 jQuery Foundation and other contributors
316 * Released under the MIT license.
317 * http://jquery.org/license
319 * http://api.jqueryui.com/jQuery.widget/
324 widget_slice = Array.prototype.slice;
326 $.cleanData = (function( orig ) {
327 return function( elems ) {
329 for ( i = 0; (elem = elems[i]) != null; i++ ) {
332 // Only trigger remove when necessary to save time
333 events = $._data( elem, "events" );
334 if ( events && events.remove ) {
335 $( elem ).triggerHandler( "remove" );
338 // http://bugs.jquery.com/ticket/8235
345 $.widget = function( name, base, prototype ) {
346 var fullName, existingConstructor, constructor, basePrototype,
347 // proxiedPrototype allows the provided prototype to remain unmodified
348 // so that it can be used as a mixin for multiple widgets (#8876)
349 proxiedPrototype = {},
350 namespace = name.split( "." )[ 0 ];
352 name = name.split( "." )[ 1 ];
353 fullName = namespace + "-" + name;
360 // create selector for plugin
361 $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
362 return !!$.data( elem, fullName );
365 $[ namespace ] = $[ namespace ] || {};
366 existingConstructor = $[ namespace ][ name ];
367 constructor = $[ namespace ][ name ] = function( options, element ) {
368 // allow instantiation without "new" keyword
369 if ( !this._createWidget ) {
370 return new constructor( options, element );
373 // allow instantiation without initializing for simple inheritance
374 // must use "new" keyword (the code above always passes args)
375 if ( arguments.length ) {
376 this._createWidget( options, element );
379 // extend with the existing constructor to carry over any static properties
380 $.extend( constructor, existingConstructor, {
381 version: prototype.version,
382 // copy the object used to create the prototype in case we need to
383 // redefine the widget later
384 _proto: $.extend( {}, prototype ),
385 // track widgets that inherit from this widget in case this widget is
386 // redefined after a widget inherits from it
387 _childConstructors: []
390 basePrototype = new base();
391 // we need to make the options hash a property directly on the new instance
392 // otherwise we'll modify the options hash on the prototype that we're
394 basePrototype.options = $.widget.extend( {}, basePrototype.options );
395 $.each( prototype, function( prop, value ) {
396 if ( !$.isFunction( value ) ) {
397 proxiedPrototype[ prop ] = value;
400 proxiedPrototype[ prop ] = (function() {
401 var _super = function() {
402 return base.prototype[ prop ].apply( this, arguments );
404 _superApply = function( args ) {
405 return base.prototype[ prop ].apply( this, args );
408 var __super = this._super,
409 __superApply = this._superApply,
412 this._super = _super;
413 this._superApply = _superApply;
415 returnValue = value.apply( this, arguments );
417 this._super = __super;
418 this._superApply = __superApply;
424 constructor.prototype = $.widget.extend( basePrototype, {
425 // TODO: remove support for widgetEventPrefix
426 // always use the name + a colon as the prefix, e.g., draggable:start
427 // don't prefix for widgets that aren't DOM-based
428 widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
429 }, proxiedPrototype, {
430 constructor: constructor,
431 namespace: namespace,
433 widgetFullName: fullName
436 // If this widget is being redefined then we need to find all widgets that
437 // are inheriting from it and redefine all of them so that they inherit from
438 // the new version of this widget. We're essentially trying to replace one
439 // level in the prototype chain.
440 if ( existingConstructor ) {
441 $.each( existingConstructor._childConstructors, function( i, child ) {
442 var childPrototype = child.prototype;
444 // redefine the child widget using the same prototype that was
445 // originally used, but inherit from the new version of the base
446 $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
448 // remove the list of existing child constructors from the old constructor
449 // so the old child constructors can be garbage collected
450 delete existingConstructor._childConstructors;
452 base._childConstructors.push( constructor );
455 $.widget.bridge( name, constructor );
460 $.widget.extend = function( target ) {
461 var input = widget_slice.call( arguments, 1 ),
463 inputLength = input.length,
466 for ( ; inputIndex < inputLength; inputIndex++ ) {
467 for ( key in input[ inputIndex ] ) {
468 value = input[ inputIndex ][ key ];
469 if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
471 if ( $.isPlainObject( value ) ) {
472 target[ key ] = $.isPlainObject( target[ key ] ) ?
473 $.widget.extend( {}, target[ key ], value ) :
474 // Don't extend strings, arrays, etc. with objects
475 $.widget.extend( {}, value );
476 // Copy everything else by reference
478 target[ key ] = value;
486 $.widget.bridge = function( name, object ) {
487 var fullName = object.prototype.widgetFullName || name;
488 $.fn[ name ] = function( options ) {
489 var isMethodCall = typeof options === "string",
490 args = widget_slice.call( arguments, 1 ),
493 // allow multiple hashes to be passed on init
494 options = !isMethodCall && args.length ?
495 $.widget.extend.apply( null, [ options ].concat(args) ) :
498 if ( isMethodCall ) {
499 this.each(function() {
501 instance = $.data( this, fullName );
502 if ( options === "instance" ) {
503 returnValue = instance;
507 return $.error( "cannot call methods on " + name + " prior to initialization; " +
508 "attempted to call method '" + options + "'" );
510 if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
511 return $.error( "no such method '" + options + "' for " + name + " widget instance" );
513 methodValue = instance[ options ].apply( instance, args );
514 if ( methodValue !== instance && methodValue !== undefined ) {
515 returnValue = methodValue && methodValue.jquery ?
516 returnValue.pushStack( methodValue.get() ) :
522 this.each(function() {
523 var instance = $.data( this, fullName );
525 instance.option( options || {} );
526 if ( instance._init ) {
530 $.data( this, fullName, new object( options, this ) );
539 $.Widget = function( /* options, element */ ) {};
540 $.Widget._childConstructors = [];
542 $.Widget.prototype = {
543 widgetName: "widget",
544 widgetEventPrefix: "",
545 defaultElement: "<div>",
552 _createWidget: function( options, element ) {
553 element = $( element || this.defaultElement || this )[ 0 ];
554 this.element = $( element );
555 this.uuid = widget_uuid++;
556 this.eventNamespace = "." + this.widgetName + this.uuid;
557 this.options = $.widget.extend( {},
559 this._getCreateOptions(),
563 this.hoverable = $();
564 this.focusable = $();
566 if ( element !== this ) {
567 $.data( element, this.widgetFullName, this );
568 this._on( true, this.element, {
569 remove: function( event ) {
570 if ( event.target === element ) {
575 this.document = $( element.style ?
576 // element within the document
577 element.ownerDocument :
578 // element is window or document
579 element.document || element );
580 this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
584 this._trigger( "create", null, this._getCreateEventData() );
587 _getCreateOptions: $.noop,
588 _getCreateEventData: $.noop,
592 destroy: function() {
594 // we can probably remove the unbind calls in 2.0
595 // all event bindings should go through this._on()
597 .unbind( this.eventNamespace )
598 .removeData( this.widgetFullName )
599 // support: jquery <1.6.3
600 // http://bugs.jquery.com/ticket/9413
601 .removeData( $.camelCase( this.widgetFullName ) );
603 .unbind( this.eventNamespace )
604 .removeAttr( "aria-disabled" )
606 this.widgetFullName + "-disabled " +
607 "ui-state-disabled" );
609 // clean up events and states
610 this.bindings.unbind( this.eventNamespace );
611 this.hoverable.removeClass( "ui-state-hover" );
612 this.focusable.removeClass( "ui-state-focus" );
620 option: function( key, value ) {
626 if ( arguments.length === 0 ) {
627 // don't return a reference to the internal hash
628 return $.widget.extend( {}, this.options );
631 if ( typeof key === "string" ) {
632 // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
634 parts = key.split( "." );
636 if ( parts.length ) {
637 curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
638 for ( i = 0; i < parts.length - 1; i++ ) {
639 curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
640 curOption = curOption[ parts[ i ] ];
643 if ( arguments.length === 1 ) {
644 return curOption[ key ] === undefined ? null : curOption[ key ];
646 curOption[ key ] = value;
648 if ( arguments.length === 1 ) {
649 return this.options[ key ] === undefined ? null : this.options[ key ];
651 options[ key ] = value;
655 this._setOptions( options );
659 _setOptions: function( options ) {
662 for ( key in options ) {
663 this._setOption( key, options[ key ] );
668 _setOption: function( key, value ) {
669 this.options[ key ] = value;
671 if ( key === "disabled" ) {
673 .toggleClass( this.widgetFullName + "-disabled", !!value );
675 // If the widget is becoming disabled, then nothing is interactive
677 this.hoverable.removeClass( "ui-state-hover" );
678 this.focusable.removeClass( "ui-state-focus" );
686 return this._setOptions({ disabled: false });
688 disable: function() {
689 return this._setOptions({ disabled: true });
692 _on: function( suppressDisabledCheck, element, handlers ) {
696 // no suppressDisabledCheck flag, shuffle arguments
697 if ( typeof suppressDisabledCheck !== "boolean" ) {
699 element = suppressDisabledCheck;
700 suppressDisabledCheck = false;
703 // no element argument, shuffle and use this.element
706 element = this.element;
707 delegateElement = this.widget();
709 element = delegateElement = $( element );
710 this.bindings = this.bindings.add( element );
713 $.each( handlers, function( event, handler ) {
714 function handlerProxy() {
715 // allow widgets to customize the disabled handling
716 // - disabled as an array instead of boolean
717 // - disabled class as method for disabling individual parts
718 if ( !suppressDisabledCheck &&
719 ( instance.options.disabled === true ||
720 $( this ).hasClass( "ui-state-disabled" ) ) ) {
723 return ( typeof handler === "string" ? instance[ handler ] : handler )
724 .apply( instance, arguments );
727 // copy the guid so direct unbinding works
728 if ( typeof handler !== "string" ) {
729 handlerProxy.guid = handler.guid =
730 handler.guid || handlerProxy.guid || $.guid++;
733 var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
734 eventName = match[1] + instance.eventNamespace,
737 delegateElement.delegate( selector, eventName, handlerProxy );
739 element.bind( eventName, handlerProxy );
744 _off: function( element, eventName ) {
745 eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
746 element.unbind( eventName ).undelegate( eventName );
749 _delay: function( handler, delay ) {
750 function handlerProxy() {
751 return ( typeof handler === "string" ? instance[ handler ] : handler )
752 .apply( instance, arguments );
755 return setTimeout( handlerProxy, delay || 0 );
758 _hoverable: function( element ) {
759 this.hoverable = this.hoverable.add( element );
761 mouseenter: function( event ) {
762 $( event.currentTarget ).addClass( "ui-state-hover" );
764 mouseleave: function( event ) {
765 $( event.currentTarget ).removeClass( "ui-state-hover" );
770 _focusable: function( element ) {
771 this.focusable = this.focusable.add( element );
773 focusin: function( event ) {
774 $( event.currentTarget ).addClass( "ui-state-focus" );
776 focusout: function( event ) {
777 $( event.currentTarget ).removeClass( "ui-state-focus" );
782 _trigger: function( type, event, data ) {
784 callback = this.options[ type ];
787 event = $.Event( event );
788 event.type = ( type === this.widgetEventPrefix ?
790 this.widgetEventPrefix + type ).toLowerCase();
791 // the original event may come from any element
792 // so we need to reset the target on the new event
793 event.target = this.element[ 0 ];
795 // copy original event properties over to the new event
796 orig = event.originalEvent;
798 for ( prop in orig ) {
799 if ( !( prop in event ) ) {
800 event[ prop ] = orig[ prop ];
805 this.element.trigger( event, data );
806 return !( $.isFunction( callback ) &&
807 callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
808 event.isDefaultPrevented() );
812 $.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
813 $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
814 if ( typeof options === "string" ) {
815 options = { effect: options };
818 effectName = !options ?
820 options === true || typeof options === "number" ?
822 options.effect || defaultEffect;
823 options = options || {};
824 if ( typeof options === "number" ) {
825 options = { duration: options };
827 hasOptions = !$.isEmptyObject( options );
828 options.complete = callback;
829 if ( options.delay ) {
830 element.delay( options.delay );
832 if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
833 element[ method ]( options );
834 } else if ( effectName !== method && element[ effectName ] ) {
835 element[ effectName ]( options.duration, options.easing, callback );
837 element.queue(function( next ) {
838 $( this )[ method ]();
840 callback.call( element[ 0 ] );
848 var widget = $.widget;
852 * jQuery UI Mouse 1.11.1
853 * http://jqueryui.com
855 * Copyright 2014 jQuery Foundation and other contributors
856 * Released under the MIT license.
857 * http://jquery.org/license
859 * http://api.jqueryui.com/mouse/
863 var mouseHandled = false;
864 $( document ).mouseup( function() {
865 mouseHandled = false;
868 var mouse = $.widget("ui.mouse", {
871 cancel: "input,textarea,button,select,option",
875 _mouseInit: function() {
879 .bind("mousedown." + this.widgetName, function(event) {
880 return that._mouseDown(event);
882 .bind("click." + this.widgetName, function(event) {
883 if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
884 $.removeData(event.target, that.widgetName + ".preventClickEvent");
885 event.stopImmediatePropagation();
890 this.started = false;
893 // TODO: make sure destroying one instance of mouse doesn't mess with
894 // other instances of mouse
895 _mouseDestroy: function() {
896 this.element.unbind("." + this.widgetName);
897 if ( this._mouseMoveDelegate ) {
899 .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
900 .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
904 _mouseDown: function(event) {
905 // don't let more than one widget handle mouseStart
906 if ( mouseHandled ) {
910 // we may have missed mouseup (out of window)
911 (this._mouseStarted && this._mouseUp(event));
913 this._mouseDownEvent = event;
916 btnIsLeft = (event.which === 1),
917 // event.target.nodeName works around a bug in IE 8 with
918 // disabled inputs (#7620)
919 elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
920 if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
924 this.mouseDelayMet = !this.options.delay;
925 if (!this.mouseDelayMet) {
926 this._mouseDelayTimer = setTimeout(function() {
927 that.mouseDelayMet = true;
928 }, this.options.delay);
931 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
932 this._mouseStarted = (this._mouseStart(event) !== false);
933 if (!this._mouseStarted) {
934 event.preventDefault();
939 // Click event may never have fired (Gecko & Opera)
940 if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
941 $.removeData(event.target, this.widgetName + ".preventClickEvent");
944 // these delegates are required to keep context
945 this._mouseMoveDelegate = function(event) {
946 return that._mouseMove(event);
948 this._mouseUpDelegate = function(event) {
949 return that._mouseUp(event);
953 .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
954 .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
956 event.preventDefault();
962 _mouseMove: function(event) {
963 // IE mouseup check - mouseup happened when mouse was out of window
964 if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
965 return this._mouseUp(event);
967 // Iframe mouseup check - mouseup occurred in another document
968 } else if ( !event.which ) {
969 return this._mouseUp( event );
972 if (this._mouseStarted) {
973 this._mouseDrag(event);
974 return event.preventDefault();
977 if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
979 (this._mouseStart(this._mouseDownEvent, event) !== false);
980 (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
983 return !this._mouseStarted;
986 _mouseUp: function(event) {
988 .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
989 .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
991 if (this._mouseStarted) {
992 this._mouseStarted = false;
994 if (event.target === this._mouseDownEvent.target) {
995 $.data(event.target, this.widgetName + ".preventClickEvent", true);
998 this._mouseStop(event);
1001 mouseHandled = false;
1005 _mouseDistanceMet: function(event) {
1007 Math.abs(this._mouseDownEvent.pageX - event.pageX),
1008 Math.abs(this._mouseDownEvent.pageY - event.pageY)
1009 ) >= this.options.distance
1013 _mouseDelayMet: function(/* event */) {
1014 return this.mouseDelayMet;
1017 // These are placeholder methods, to be overriden by extending plugin
1018 _mouseStart: function(/* event */) {},
1019 _mouseDrag: function(/* event */) {},
1020 _mouseStop: function(/* event */) {},
1021 _mouseCapture: function(/* event */) { return true; }
1026 * jQuery UI Position 1.11.1
1027 * http://jqueryui.com
1029 * Copyright 2014 jQuery Foundation and other contributors
1030 * Released under the MIT license.
1031 * http://jquery.org/license
1033 * http://api.jqueryui.com/position/
1040 var cachedScrollbarWidth, supportsOffsetFractions,
1044 rhorizontal = /left|center|right/,
1045 rvertical = /top|center|bottom/,
1046 roffset = /[\+\-]\d+(\.[\d]+)?%?/,
1049 _position = $.fn.position;
1051 function getOffsets( offsets, width, height ) {
1053 parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
1054 parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
1058 function parseCss( element, property ) {
1059 return parseInt( $.css( element, property ), 10 ) || 0;
1062 function getDimensions( elem ) {
1064 if ( raw.nodeType === 9 ) {
1066 width: elem.width(),
1067 height: elem.height(),
1068 offset: { top: 0, left: 0 }
1071 if ( $.isWindow( raw ) ) {
1073 width: elem.width(),
1074 height: elem.height(),
1075 offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
1078 if ( raw.preventDefault ) {
1082 offset: { top: raw.pageY, left: raw.pageX }
1086 width: elem.outerWidth(),
1087 height: elem.outerHeight(),
1088 offset: elem.offset()
1093 scrollbarWidth: function() {
1094 if ( cachedScrollbarWidth !== undefined ) {
1095 return cachedScrollbarWidth;
1098 div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
1099 innerDiv = div.children()[0];
1101 $( "body" ).append( div );
1102 w1 = innerDiv.offsetWidth;
1103 div.css( "overflow", "scroll" );
1105 w2 = innerDiv.offsetWidth;
1108 w2 = div[0].clientWidth;
1113 return (cachedScrollbarWidth = w1 - w2);
1115 getScrollInfo: function( within ) {
1116 var overflowX = within.isWindow || within.isDocument ? "" :
1117 within.element.css( "overflow-x" ),
1118 overflowY = within.isWindow || within.isDocument ? "" :
1119 within.element.css( "overflow-y" ),
1120 hasOverflowX = overflowX === "scroll" ||
1121 ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
1122 hasOverflowY = overflowY === "scroll" ||
1123 ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
1125 width: hasOverflowY ? $.position.scrollbarWidth() : 0,
1126 height: hasOverflowX ? $.position.scrollbarWidth() : 0
1129 getWithinInfo: function( element ) {
1130 var withinElement = $( element || window ),
1131 isWindow = $.isWindow( withinElement[0] ),
1132 isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
1134 element: withinElement,
1136 isDocument: isDocument,
1137 offset: withinElement.offset() || { left: 0, top: 0 },
1138 scrollLeft: withinElement.scrollLeft(),
1139 scrollTop: withinElement.scrollTop(),
1141 // support: jQuery 1.6.x
1142 // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
1143 width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
1144 height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
1149 $.fn.position = function( options ) {
1150 if ( !options || !options.of ) {
1151 return _position.apply( this, arguments );
1154 // make a copy, we don't want to modify arguments
1155 options = $.extend( {}, options );
1157 var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
1158 target = $( options.of ),
1159 within = $.position.getWithinInfo( options.within ),
1160 scrollInfo = $.position.getScrollInfo( within ),
1161 collision = ( options.collision || "flip" ).split( " " ),
1164 dimensions = getDimensions( target );
1165 if ( target[0].preventDefault ) {
1166 // force left top to allow flipping
1167 options.at = "left top";
1169 targetWidth = dimensions.width;
1170 targetHeight = dimensions.height;
1171 targetOffset = dimensions.offset;
1172 // clone to reuse original targetOffset later
1173 basePosition = $.extend( {}, targetOffset );
1175 // force my and at to have valid horizontal and vertical positions
1176 // if a value is missing or invalid, it will be converted to center
1177 $.each( [ "my", "at" ], function() {
1178 var pos = ( options[ this ] || "" ).split( " " ),
1182 if ( pos.length === 1) {
1183 pos = rhorizontal.test( pos[ 0 ] ) ?
1184 pos.concat( [ "center" ] ) :
1185 rvertical.test( pos[ 0 ] ) ?
1186 [ "center" ].concat( pos ) :
1187 [ "center", "center" ];
1189 pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
1190 pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
1192 // calculate offsets
1193 horizontalOffset = roffset.exec( pos[ 0 ] );
1194 verticalOffset = roffset.exec( pos[ 1 ] );
1196 horizontalOffset ? horizontalOffset[ 0 ] : 0,
1197 verticalOffset ? verticalOffset[ 0 ] : 0
1200 // reduce to just the positions without the offsets
1202 rposition.exec( pos[ 0 ] )[ 0 ],
1203 rposition.exec( pos[ 1 ] )[ 0 ]
1207 // normalize collision option
1208 if ( collision.length === 1 ) {
1209 collision[ 1 ] = collision[ 0 ];
1212 if ( options.at[ 0 ] === "right" ) {
1213 basePosition.left += targetWidth;
1214 } else if ( options.at[ 0 ] === "center" ) {
1215 basePosition.left += targetWidth / 2;
1218 if ( options.at[ 1 ] === "bottom" ) {
1219 basePosition.top += targetHeight;
1220 } else if ( options.at[ 1 ] === "center" ) {
1221 basePosition.top += targetHeight / 2;
1224 atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
1225 basePosition.left += atOffset[ 0 ];
1226 basePosition.top += atOffset[ 1 ];
1228 return this.each(function() {
1229 var collisionPosition, using,
1231 elemWidth = elem.outerWidth(),
1232 elemHeight = elem.outerHeight(),
1233 marginLeft = parseCss( this, "marginLeft" ),
1234 marginTop = parseCss( this, "marginTop" ),
1235 collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
1236 collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
1237 position = $.extend( {}, basePosition ),
1238 myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
1240 if ( options.my[ 0 ] === "right" ) {
1241 position.left -= elemWidth;
1242 } else if ( options.my[ 0 ] === "center" ) {
1243 position.left -= elemWidth / 2;
1246 if ( options.my[ 1 ] === "bottom" ) {
1247 position.top -= elemHeight;
1248 } else if ( options.my[ 1 ] === "center" ) {
1249 position.top -= elemHeight / 2;
1252 position.left += myOffset[ 0 ];
1253 position.top += myOffset[ 1 ];
1255 // if the browser doesn't support fractions, then round for consistent results
1256 if ( !supportsOffsetFractions ) {
1257 position.left = round( position.left );
1258 position.top = round( position.top );
1261 collisionPosition = {
1262 marginLeft: marginLeft,
1263 marginTop: marginTop
1266 $.each( [ "left", "top" ], function( i, dir ) {
1267 if ( $.ui.position[ collision[ i ] ] ) {
1268 $.ui.position[ collision[ i ] ][ dir ]( position, {
1269 targetWidth: targetWidth,
1270 targetHeight: targetHeight,
1271 elemWidth: elemWidth,
1272 elemHeight: elemHeight,
1273 collisionPosition: collisionPosition,
1274 collisionWidth: collisionWidth,
1275 collisionHeight: collisionHeight,
1276 offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1285 if ( options.using ) {
1286 // adds feedback as second argument to using callback, if present
1287 using = function( props ) {
1288 var left = targetOffset.left - position.left,
1289 right = left + targetWidth - elemWidth,
1290 top = targetOffset.top - position.top,
1291 bottom = top + targetHeight - elemHeight,
1295 left: targetOffset.left,
1296 top: targetOffset.top,
1298 height: targetHeight
1302 left: position.left,
1307 horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1308 vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1310 if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1311 feedback.horizontal = "center";
1313 if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1314 feedback.vertical = "middle";
1316 if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1317 feedback.important = "horizontal";
1319 feedback.important = "vertical";
1321 options.using.call( this, props, feedback );
1325 elem.offset( $.extend( position, { using: using } ) );
1331 left: function( position, data ) {
1332 var within = data.within,
1333 withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1334 outerWidth = within.width,
1335 collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1336 overLeft = withinOffset - collisionPosLeft,
1337 overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1340 // element is wider than within
1341 if ( data.collisionWidth > outerWidth ) {
1342 // element is initially over the left side of within
1343 if ( overLeft > 0 && overRight <= 0 ) {
1344 newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
1345 position.left += overLeft - newOverRight;
1346 // element is initially over right side of within
1347 } else if ( overRight > 0 && overLeft <= 0 ) {
1348 position.left = withinOffset;
1349 // element is initially over both left and right sides of within
1351 if ( overLeft > overRight ) {
1352 position.left = withinOffset + outerWidth - data.collisionWidth;
1354 position.left = withinOffset;
1357 // too far left -> align with left edge
1358 } else if ( overLeft > 0 ) {
1359 position.left += overLeft;
1360 // too far right -> align with right edge
1361 } else if ( overRight > 0 ) {
1362 position.left -= overRight;
1363 // adjust based on position and margin
1365 position.left = max( position.left - collisionPosLeft, position.left );
1368 top: function( position, data ) {
1369 var within = data.within,
1370 withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1371 outerHeight = data.within.height,
1372 collisionPosTop = position.top - data.collisionPosition.marginTop,
1373 overTop = withinOffset - collisionPosTop,
1374 overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1377 // element is taller than within
1378 if ( data.collisionHeight > outerHeight ) {
1379 // element is initially over the top of within
1380 if ( overTop > 0 && overBottom <= 0 ) {
1381 newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
1382 position.top += overTop - newOverBottom;
1383 // element is initially over bottom of within
1384 } else if ( overBottom > 0 && overTop <= 0 ) {
1385 position.top = withinOffset;
1386 // element is initially over both top and bottom of within
1388 if ( overTop > overBottom ) {
1389 position.top = withinOffset + outerHeight - data.collisionHeight;
1391 position.top = withinOffset;
1394 // too far up -> align with top
1395 } else if ( overTop > 0 ) {
1396 position.top += overTop;
1397 // too far down -> align with bottom edge
1398 } else if ( overBottom > 0 ) {
1399 position.top -= overBottom;
1400 // adjust based on position and margin
1402 position.top = max( position.top - collisionPosTop, position.top );
1407 left: function( position, data ) {
1408 var within = data.within,
1409 withinOffset = within.offset.left + within.scrollLeft,
1410 outerWidth = within.width,
1411 offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1412 collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1413 overLeft = collisionPosLeft - offsetLeft,
1414 overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1415 myOffset = data.my[ 0 ] === "left" ?
1417 data.my[ 0 ] === "right" ?
1420 atOffset = data.at[ 0 ] === "left" ?
1422 data.at[ 0 ] === "right" ?
1425 offset = -2 * data.offset[ 0 ],
1429 if ( overLeft < 0 ) {
1430 newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
1431 if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1432 position.left += myOffset + atOffset + offset;
1434 } else if ( overRight > 0 ) {
1435 newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
1436 if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1437 position.left += myOffset + atOffset + offset;
1441 top: function( position, data ) {
1442 var within = data.within,
1443 withinOffset = within.offset.top + within.scrollTop,
1444 outerHeight = within.height,
1445 offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1446 collisionPosTop = position.top - data.collisionPosition.marginTop,
1447 overTop = collisionPosTop - offsetTop,
1448 overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1449 top = data.my[ 1 ] === "top",
1452 data.my[ 1 ] === "bottom" ?
1455 atOffset = data.at[ 1 ] === "top" ?
1457 data.at[ 1 ] === "bottom" ?
1458 -data.targetHeight :
1460 offset = -2 * data.offset[ 1 ],
1463 if ( overTop < 0 ) {
1464 newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
1465 if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
1466 position.top += myOffset + atOffset + offset;
1468 } else if ( overBottom > 0 ) {
1469 newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
1470 if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
1471 position.top += myOffset + atOffset + offset;
1478 $.ui.position.flip.left.apply( this, arguments );
1479 $.ui.position.fit.left.apply( this, arguments );
1482 $.ui.position.flip.top.apply( this, arguments );
1483 $.ui.position.fit.top.apply( this, arguments );
1488 // fraction support test
1490 var testElement, testElementParent, testElementStyle, offsetLeft, i,
1491 body = document.getElementsByTagName( "body" )[ 0 ],
1492 div = document.createElement( "div" );
1494 //Create a "fake body" for testing based on method used in jQuery.support
1495 testElement = document.createElement( body ? "div" : "body" );
1496 testElementStyle = {
1497 visibility: "hidden",
1505 $.extend( testElementStyle, {
1506 position: "absolute",
1511 for ( i in testElementStyle ) {
1512 testElement.style[ i ] = testElementStyle[ i ];
1514 testElement.appendChild( div );
1515 testElementParent = body || document.documentElement;
1516 testElementParent.insertBefore( testElement, testElementParent.firstChild );
1518 div.style.cssText = "position: absolute; left: 10.7432222px;";
1520 offsetLeft = $( div ).offset().left;
1521 supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
1523 testElement.innerHTML = "";
1524 testElementParent.removeChild( testElement );
1529 var position = $.ui.position;
1533 * jQuery UI Accordion 1.11.1
1534 * http://jqueryui.com
1536 * Copyright 2014 jQuery Foundation and other contributors
1537 * Released under the MIT license.
1538 * http://jquery.org/license
1540 * http://api.jqueryui.com/accordion/
1544 var accordion = $.widget( "ui.accordion", {
1551 header: "> li > :first-child,> :not(li):even",
1552 heightStyle: "auto",
1554 activeHeader: "ui-icon-triangle-1-s",
1555 header: "ui-icon-triangle-1-e"
1560 beforeActivate: null
1564 borderTopWidth: "hide",
1565 borderBottomWidth: "hide",
1567 paddingBottom: "hide",
1572 borderTopWidth: "show",
1573 borderBottomWidth: "show",
1575 paddingBottom: "show",
1579 _create: function() {
1580 var options = this.options;
1581 this.prevShow = this.prevHide = $();
1582 this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
1584 .attr( "role", "tablist" );
1586 // don't allow collapsible: false and active: false / null
1587 if ( !options.collapsible && (options.active === false || options.active == null) ) {
1591 this._processPanels();
1592 // handle negative values
1593 if ( options.active < 0 ) {
1594 options.active += this.headers.length;
1599 _getCreateEventData: function() {
1601 header: this.active,
1602 panel: !this.active.length ? $() : this.active.next()
1606 _createIcons: function() {
1607 var icons = this.options.icons;
1610 .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
1611 .prependTo( this.headers );
1612 this.active.children( ".ui-accordion-header-icon" )
1613 .removeClass( icons.header )
1614 .addClass( icons.activeHeader );
1615 this.headers.addClass( "ui-accordion-icons" );
1619 _destroyIcons: function() {
1621 .removeClass( "ui-accordion-icons" )
1622 .children( ".ui-accordion-header-icon" )
1626 _destroy: function() {
1629 // clean up main element
1631 .removeClass( "ui-accordion ui-widget ui-helper-reset" )
1632 .removeAttr( "role" );
1636 .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
1637 "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
1638 .removeAttr( "role" )
1639 .removeAttr( "aria-expanded" )
1640 .removeAttr( "aria-selected" )
1641 .removeAttr( "aria-controls" )
1642 .removeAttr( "tabIndex" )
1645 this._destroyIcons();
1647 // clean up content panels
1648 contents = this.headers.next()
1649 .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
1650 "ui-accordion-content ui-accordion-content-active ui-state-disabled" )
1651 .css( "display", "" )
1652 .removeAttr( "role" )
1653 .removeAttr( "aria-hidden" )
1654 .removeAttr( "aria-labelledby" )
1657 if ( this.options.heightStyle !== "content" ) {
1658 contents.css( "height", "" );
1662 _setOption: function( key, value ) {
1663 if ( key === "active" ) {
1664 // _activate() will handle invalid values and update this.options
1665 this._activate( value );
1669 if ( key === "event" ) {
1670 if ( this.options.event ) {
1671 this._off( this.headers, this.options.event );
1673 this._setupEvents( value );
1676 this._super( key, value );
1678 // setting collapsible: false while collapsed; open first panel
1679 if ( key === "collapsible" && !value && this.options.active === false ) {
1680 this._activate( 0 );
1683 if ( key === "icons" ) {
1684 this._destroyIcons();
1686 this._createIcons();
1690 // #5332 - opacity doesn't cascade to positioned elements in IE
1691 // so we need to add the disabled class to the headers and panels
1692 if ( key === "disabled" ) {
1694 .toggleClass( "ui-state-disabled", !!value )
1695 .attr( "aria-disabled", value );
1696 this.headers.add( this.headers.next() )
1697 .toggleClass( "ui-state-disabled", !!value );
1701 _keydown: function( event ) {
1702 if ( event.altKey || event.ctrlKey ) {
1706 var keyCode = $.ui.keyCode,
1707 length = this.headers.length,
1708 currentIndex = this.headers.index( event.target ),
1711 switch ( event.keyCode ) {
1714 toFocus = this.headers[ ( currentIndex + 1 ) % length ];
1718 toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
1722 this._eventHandler( event );
1725 toFocus = this.headers[ 0 ];
1728 toFocus = this.headers[ length - 1 ];
1733 $( event.target ).attr( "tabIndex", -1 );
1734 $( toFocus ).attr( "tabIndex", 0 );
1736 event.preventDefault();
1740 _panelKeyDown: function( event ) {
1741 if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
1742 $( event.currentTarget ).prev().focus();
1746 refresh: function() {
1747 var options = this.options;
1748 this._processPanels();
1750 // was collapsed or no panel
1751 if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
1752 options.active = false;
1754 // active false only when collapsible is true
1755 } else if ( options.active === false ) {
1756 this._activate( 0 );
1757 // was active, but active panel is gone
1758 } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
1759 // all remaining panel are disabled
1760 if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
1761 options.active = false;
1763 // activate previous panel
1765 this._activate( Math.max( 0, options.active - 1 ) );
1767 // was active, active panel still exists
1769 // make sure active index is correct
1770 options.active = this.headers.index( this.active );
1773 this._destroyIcons();
1778 _processPanels: function() {
1779 this.headers = this.element.find( this.options.header )
1780 .addClass( "ui-accordion-header ui-state-default ui-corner-all" );
1783 .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
1784 .filter( ":not(.ui-accordion-content-active)" )
1788 _refresh: function() {
1790 options = this.options,
1791 heightStyle = options.heightStyle,
1792 parent = this.element.parent();
1794 this.active = this._findActive( options.active )
1795 .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
1796 .removeClass( "ui-corner-all" );
1798 .addClass( "ui-accordion-content-active" )
1802 .attr( "role", "tab" )
1804 var header = $( this ),
1805 headerId = header.uniqueId().attr( "id" ),
1806 panel = header.next(),
1807 panelId = panel.uniqueId().attr( "id" );
1808 header.attr( "aria-controls", panelId );
1809 panel.attr( "aria-labelledby", headerId );
1812 .attr( "role", "tabpanel" );
1817 "aria-selected": "false",
1818 "aria-expanded": "false",
1823 "aria-hidden": "true"
1827 // make sure at least one header is in the tab order
1828 if ( !this.active.length ) {
1829 this.headers.eq( 0 ).attr( "tabIndex", 0 );
1832 "aria-selected": "true",
1833 "aria-expanded": "true",
1838 "aria-hidden": "false"
1842 this._createIcons();
1844 this._setupEvents( options.event );
1846 if ( heightStyle === "fill" ) {
1847 maxHeight = parent.height();
1848 this.element.siblings( ":visible" ).each(function() {
1849 var elem = $( this ),
1850 position = elem.css( "position" );
1852 if ( position === "absolute" || position === "fixed" ) {
1855 maxHeight -= elem.outerHeight( true );
1858 this.headers.each(function() {
1859 maxHeight -= $( this ).outerHeight( true );
1864 $( this ).height( Math.max( 0, maxHeight -
1865 $( this ).innerHeight() + $( this ).height() ) );
1867 .css( "overflow", "auto" );
1868 } else if ( heightStyle === "auto" ) {
1872 maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
1874 .height( maxHeight );
1878 _activate: function( index ) {
1879 var active = this._findActive( index )[ 0 ];
1881 // trying to activate the already active panel
1882 if ( active === this.active[ 0 ] ) {
1886 // trying to collapse, simulate a click on the currently active header
1887 active = active || this.active[ 0 ];
1889 this._eventHandler({
1891 currentTarget: active,
1892 preventDefault: $.noop
1896 _findActive: function( selector ) {
1897 return typeof selector === "number" ? this.headers.eq( selector ) : $();
1900 _setupEvents: function( event ) {
1905 $.each( event.split( " " ), function( index, eventName ) {
1906 events[ eventName ] = "_eventHandler";
1910 this._off( this.headers.add( this.headers.next() ) );
1911 this._on( this.headers, events );
1912 this._on( this.headers.next(), { keydown: "_panelKeyDown" });
1913 this._hoverable( this.headers );
1914 this._focusable( this.headers );
1917 _eventHandler: function( event ) {
1918 var options = this.options,
1919 active = this.active,
1920 clicked = $( event.currentTarget ),
1921 clickedIsActive = clicked[ 0 ] === active[ 0 ],
1922 collapsing = clickedIsActive && options.collapsible,
1923 toShow = collapsing ? $() : clicked.next(),
1924 toHide = active.next(),
1928 newHeader: collapsing ? $() : clicked,
1932 event.preventDefault();
1935 // click on active header, but not collapsible
1936 ( clickedIsActive && !options.collapsible ) ||
1937 // allow canceling activation
1938 ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
1942 options.active = collapsing ? false : this.headers.index( clicked );
1944 // when the call to ._toggle() comes after the class changes
1945 // it causes a very odd bug in IE 8 (see #6720)
1946 this.active = clickedIsActive ? $() : clicked;
1947 this._toggle( eventData );
1950 // corner classes on the previously active header stay after the animation
1951 active.removeClass( "ui-accordion-header-active ui-state-active" );
1952 if ( options.icons ) {
1953 active.children( ".ui-accordion-header-icon" )
1954 .removeClass( options.icons.activeHeader )
1955 .addClass( options.icons.header );
1958 if ( !clickedIsActive ) {
1960 .removeClass( "ui-corner-all" )
1961 .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
1962 if ( options.icons ) {
1963 clicked.children( ".ui-accordion-header-icon" )
1964 .removeClass( options.icons.header )
1965 .addClass( options.icons.activeHeader );
1970 .addClass( "ui-accordion-content-active" );
1974 _toggle: function( data ) {
1975 var toShow = data.newPanel,
1976 toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
1978 // handle activating a panel during the animation for another activation
1979 this.prevShow.add( this.prevHide ).stop( true, true );
1980 this.prevShow = toShow;
1981 this.prevHide = toHide;
1983 if ( this.options.animate ) {
1984 this._animate( toShow, toHide, data );
1988 this._toggleComplete( data );
1992 "aria-hidden": "true"
1994 toHide.prev().attr( "aria-selected", "false" );
1995 // if we're switching panels, remove the old header from the tab order
1996 // if we're opening from collapsed state, remove the previous header from the tab order
1997 // if we're collapsing, then keep the collapsing header in the tab order
1998 if ( toShow.length && toHide.length ) {
1999 toHide.prev().attr({
2001 "aria-expanded": "false"
2003 } else if ( toShow.length ) {
2004 this.headers.filter(function() {
2005 return $( this ).attr( "tabIndex" ) === 0;
2007 .attr( "tabIndex", -1 );
2011 .attr( "aria-hidden", "false" )
2014 "aria-selected": "true",
2016 "aria-expanded": "true"
2020 _animate: function( toShow, toHide, data ) {
2021 var total, easing, duration,
2024 down = toShow.length &&
2025 ( !toHide.length || ( toShow.index() < toHide.index() ) ),
2026 animate = this.options.animate || {},
2027 options = down && animate.down || animate,
2028 complete = function() {
2029 that._toggleComplete( data );
2032 if ( typeof options === "number" ) {
2035 if ( typeof options === "string" ) {
2038 // fall back from options to animation in case of partial down settings
2039 easing = easing || options.easing || animate.easing;
2040 duration = duration || options.duration || animate.duration;
2042 if ( !toHide.length ) {
2043 return toShow.animate( this.showProps, duration, easing, complete );
2045 if ( !toShow.length ) {
2046 return toHide.animate( this.hideProps, duration, easing, complete );
2049 total = toShow.show().outerHeight();
2050 toHide.animate( this.hideProps, {
2053 step: function( now, fx ) {
2054 fx.now = Math.round( now );
2059 .animate( this.showProps, {
2063 step: function( now, fx ) {
2064 fx.now = Math.round( now );
2065 if ( fx.prop !== "height" ) {
2067 } else if ( that.options.heightStyle !== "content" ) {
2068 fx.now = Math.round( total - toHide.outerHeight() - adjust );
2075 _toggleComplete: function( data ) {
2076 var toHide = data.oldPanel;
2079 .removeClass( "ui-accordion-content-active" )
2081 .removeClass( "ui-corner-top" )
2082 .addClass( "ui-corner-all" );
2084 // Work around for rendering bug in IE (#5421)
2085 if ( toHide.length ) {
2086 toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
2088 this._trigger( "activate", null, data );
2094 * jQuery UI Menu 1.11.1
2095 * http://jqueryui.com
2097 * Copyright 2014 jQuery Foundation and other contributors
2098 * Released under the MIT license.
2099 * http://jquery.org/license
2101 * http://api.jqueryui.com/menu/
2105 var menu = $.widget( "ui.menu", {
2107 defaultElement: "<ul>",
2111 submenu: "ui-icon-carat-1-e"
2127 _create: function() {
2128 this.activeMenu = this.element;
2130 // Flag used to prevent firing of the click handler
2131 // as the event bubbles up through nested menus
2132 this.mouseHandled = false;
2135 .addClass( "ui-menu ui-widget ui-widget-content" )
2136 .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
2138 role: this.options.role,
2142 if ( this.options.disabled ) {
2144 .addClass( "ui-state-disabled" )
2145 .attr( "aria-disabled", "true" );
2149 // Prevent focus from sticking to links inside menu after clicking
2150 // them (focus should always stay on UL during navigation).
2151 "mousedown .ui-menu-item": function( event ) {
2152 event.preventDefault();
2154 "click .ui-menu-item": function( event ) {
2155 var target = $( event.target );
2156 if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
2157 this.select( event );
2159 // Only set the mouseHandled flag if the event will bubble, see #9469.
2160 if ( !event.isPropagationStopped() ) {
2161 this.mouseHandled = true;
2164 // Open submenu on click
2165 if ( target.has( ".ui-menu" ).length ) {
2166 this.expand( event );
2167 } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
2169 // Redirect focus to the menu
2170 this.element.trigger( "focus", [ true ] );
2172 // If the active item is on the top level, let it stay active.
2173 // Otherwise, blur the active item since it is no longer visible.
2174 if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
2175 clearTimeout( this.timer );
2180 "mouseenter .ui-menu-item": function( event ) {
2181 var target = $( event.currentTarget );
2182 // Remove ui-state-active class from siblings of the newly focused menu item
2183 // to avoid a jump caused by adjacent elements both having a class with a border
2184 target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
2185 this.focus( event, target );
2187 mouseleave: "collapseAll",
2188 "mouseleave .ui-menu": "collapseAll",
2189 focus: function( event, keepActiveItem ) {
2190 // If there's already an active item, keep it active
2191 // If not, activate the first item
2192 var item = this.active || this.element.find( this.options.items ).eq( 0 );
2194 if ( !keepActiveItem ) {
2195 this.focus( event, item );
2198 blur: function( event ) {
2199 this._delay(function() {
2200 if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
2201 this.collapseAll( event );
2210 // Clicks outside of a menu collapse any open menus
2211 this._on( this.document, {
2212 click: function( event ) {
2213 if ( this._closeOnDocumentClick( event ) ) {
2214 this.collapseAll( event );
2217 // Reset the mouseHandled flag
2218 this.mouseHandled = false;
2223 _destroy: function() {
2224 // Destroy (sub)menus
2226 .removeAttr( "aria-activedescendant" )
2227 .find( ".ui-menu" ).addBack()
2228 .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
2229 .removeAttr( "role" )
2230 .removeAttr( "tabIndex" )
2231 .removeAttr( "aria-labelledby" )
2232 .removeAttr( "aria-expanded" )
2233 .removeAttr( "aria-hidden" )
2234 .removeAttr( "aria-disabled" )
2238 // Destroy menu items
2239 this.element.find( ".ui-menu-item" )
2240 .removeClass( "ui-menu-item" )
2241 .removeAttr( "role" )
2242 .removeAttr( "aria-disabled" )
2244 .removeClass( "ui-state-hover" )
2245 .removeAttr( "tabIndex" )
2246 .removeAttr( "role" )
2247 .removeAttr( "aria-haspopup" )
2248 .children().each( function() {
2249 var elem = $( this );
2250 if ( elem.data( "ui-menu-submenu-carat" ) ) {
2255 // Destroy menu dividers
2256 this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
2259 _keydown: function( event ) {
2260 var match, prev, character, skip, regex,
2261 preventDefault = true;
2263 function escape( value ) {
2264 return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
2267 switch ( event.keyCode ) {
2268 case $.ui.keyCode.PAGE_UP:
2269 this.previousPage( event );
2271 case $.ui.keyCode.PAGE_DOWN:
2272 this.nextPage( event );
2274 case $.ui.keyCode.HOME:
2275 this._move( "first", "first", event );
2277 case $.ui.keyCode.END:
2278 this._move( "last", "last", event );
2280 case $.ui.keyCode.UP:
2281 this.previous( event );
2283 case $.ui.keyCode.DOWN:
2286 case $.ui.keyCode.LEFT:
2287 this.collapse( event );
2289 case $.ui.keyCode.RIGHT:
2290 if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
2291 this.expand( event );
2294 case $.ui.keyCode.ENTER:
2295 case $.ui.keyCode.SPACE:
2296 this._activate( event );
2298 case $.ui.keyCode.ESCAPE:
2299 this.collapse( event );
2302 preventDefault = false;
2303 prev = this.previousFilter || "";
2304 character = String.fromCharCode( event.keyCode );
2307 clearTimeout( this.filterTimer );
2309 if ( character === prev ) {
2312 character = prev + character;
2315 regex = new RegExp( "^" + escape( character ), "i" );
2316 match = this.activeMenu.find( this.options.items ).filter(function() {
2317 return regex.test( $( this ).text() );
2319 match = skip && match.index( this.active.next() ) !== -1 ?
2320 this.active.nextAll( ".ui-menu-item" ) :
2323 // If no matches on the current filter, reset to the last character pressed
2324 // to move down the menu to the first item that starts with that character
2325 if ( !match.length ) {
2326 character = String.fromCharCode( event.keyCode );
2327 regex = new RegExp( "^" + escape( character ), "i" );
2328 match = this.activeMenu.find( this.options.items ).filter(function() {
2329 return regex.test( $( this ).text() );
2333 if ( match.length ) {
2334 this.focus( event, match );
2335 if ( match.length > 1 ) {
2336 this.previousFilter = character;
2337 this.filterTimer = this._delay(function() {
2338 delete this.previousFilter;
2341 delete this.previousFilter;
2344 delete this.previousFilter;
2348 if ( preventDefault ) {
2349 event.preventDefault();
2353 _activate: function( event ) {
2354 if ( !this.active.is( ".ui-state-disabled" ) ) {
2355 if ( this.active.is( "[aria-haspopup='true']" ) ) {
2356 this.expand( event );
2358 this.select( event );
2363 refresh: function() {
2366 icon = this.options.icons.submenu,
2367 submenus = this.element.find( this.options.menus );
2369 this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
2371 // Initialize nested menus
2372 submenus.filter( ":not(.ui-menu)" )
2373 .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
2376 role: this.options.role,
2377 "aria-hidden": "true",
2378 "aria-expanded": "false"
2381 var menu = $( this ),
2382 item = menu.parent(),
2383 submenuCarat = $( "<span>" )
2384 .addClass( "ui-menu-icon ui-icon " + icon )
2385 .data( "ui-menu-submenu-carat", true );
2388 .attr( "aria-haspopup", "true" )
2389 .prepend( submenuCarat );
2390 menu.attr( "aria-labelledby", item.attr( "id" ) );
2393 menus = submenus.add( this.element );
2394 items = menus.find( this.options.items );
2396 // Initialize menu-items containing spaces and/or dashes only as dividers
2397 items.not( ".ui-menu-item" ).each(function() {
2398 var item = $( this );
2399 if ( that._isDivider( item ) ) {
2400 item.addClass( "ui-widget-content ui-menu-divider" );
2404 // Don't refresh list items that are already adapted
2405 items.not( ".ui-menu-item, .ui-menu-divider" )
2406 .addClass( "ui-menu-item" )
2410 role: this._itemRole()
2413 // Add aria-disabled attribute to any disabled menu item
2414 items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
2416 // If the active item has been removed, blur the menu
2417 if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
2422 _itemRole: function() {
2426 }[ this.options.role ];
2429 _setOption: function( key, value ) {
2430 if ( key === "icons" ) {
2431 this.element.find( ".ui-menu-icon" )
2432 .removeClass( this.options.icons.submenu )
2433 .addClass( value.submenu );
2435 if ( key === "disabled" ) {
2437 .toggleClass( "ui-state-disabled", !!value )
2438 .attr( "aria-disabled", value );
2440 this._super( key, value );
2443 focus: function( event, item ) {
2444 var nested, focused;
2445 this.blur( event, event && event.type === "focus" );
2447 this._scrollIntoView( item );
2449 this.active = item.first();
2450 focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
2451 // Only update aria-activedescendant if there's a role
2452 // otherwise we assume focus is managed elsewhere
2453 if ( this.options.role ) {
2454 this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
2457 // Highlight active parent menu item, if any
2460 .closest( ".ui-menu-item" )
2461 .addClass( "ui-state-active" );
2463 if ( event && event.type === "keydown" ) {
2466 this.timer = this._delay(function() {
2471 nested = item.children( ".ui-menu" );
2472 if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
2473 this._startOpening(nested);
2475 this.activeMenu = item.parent();
2477 this._trigger( "focus", event, { item: item } );
2480 _scrollIntoView: function( item ) {
2481 var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
2482 if ( this._hasScroll() ) {
2483 borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
2484 paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
2485 offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
2486 scroll = this.activeMenu.scrollTop();
2487 elementHeight = this.activeMenu.height();
2488 itemHeight = item.outerHeight();
2491 this.activeMenu.scrollTop( scroll + offset );
2492 } else if ( offset + itemHeight > elementHeight ) {
2493 this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
2498 blur: function( event, fromFocus ) {
2500 clearTimeout( this.timer );
2503 if ( !this.active ) {
2507 this.active.removeClass( "ui-state-focus" );
2510 this._trigger( "blur", event, { item: this.active } );
2513 _startOpening: function( submenu ) {
2514 clearTimeout( this.timer );
2516 // Don't open if already open fixes a Firefox bug that caused a .5 pixel
2517 // shift in the submenu position when mousing over the carat icon
2518 if ( submenu.attr( "aria-hidden" ) !== "true" ) {
2522 this.timer = this._delay(function() {
2524 this._open( submenu );
2528 _open: function( submenu ) {
2529 var position = $.extend({
2531 }, this.options.position );
2533 clearTimeout( this.timer );
2534 this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
2536 .attr( "aria-hidden", "true" );
2540 .removeAttr( "aria-hidden" )
2541 .attr( "aria-expanded", "true" )
2542 .position( position );
2545 collapseAll: function( event, all ) {
2546 clearTimeout( this.timer );
2547 this.timer = this._delay(function() {
2548 // If we were passed an event, look for the submenu that contains the event
2549 var currentMenu = all ? this.element :
2550 $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
2552 // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
2553 if ( !currentMenu.length ) {
2554 currentMenu = this.element;
2557 this._close( currentMenu );
2560 this.activeMenu = currentMenu;
2564 // With no arguments, closes the currently active menu - if nothing is active
2565 // it closes all menus. If passed an argument, it will search for menus BELOW
2566 _close: function( startMenu ) {
2568 startMenu = this.active ? this.active.parent() : this.element;
2574 .attr( "aria-hidden", "true" )
2575 .attr( "aria-expanded", "false" )
2577 .find( ".ui-state-active" ).not( ".ui-state-focus" )
2578 .removeClass( "ui-state-active" );
2581 _closeOnDocumentClick: function( event ) {
2582 return !$( event.target ).closest( ".ui-menu" ).length;
2585 _isDivider: function( item ) {
2587 // Match hyphen, em dash, en dash
2588 return !/[^\-\u2014\u2013\s]/.test( item.text() );
2591 collapse: function( event ) {
2592 var newItem = this.active &&
2593 this.active.parent().closest( ".ui-menu-item", this.element );
2594 if ( newItem && newItem.length ) {
2596 this.focus( event, newItem );
2600 expand: function( event ) {
2601 var newItem = this.active &&
2603 .children( ".ui-menu " )
2604 .find( this.options.items )
2607 if ( newItem && newItem.length ) {
2608 this._open( newItem.parent() );
2610 // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
2611 this._delay(function() {
2612 this.focus( event, newItem );
2617 next: function( event ) {
2618 this._move( "next", "first", event );
2621 previous: function( event ) {
2622 this._move( "prev", "last", event );
2625 isFirstItem: function() {
2626 return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
2629 isLastItem: function() {
2630 return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
2633 _move: function( direction, filter, event ) {
2635 if ( this.active ) {
2636 if ( direction === "first" || direction === "last" ) {
2638 [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
2642 [ direction + "All" ]( ".ui-menu-item" )
2646 if ( !next || !next.length || !this.active ) {
2647 next = this.activeMenu.find( this.options.items )[ filter ]();
2650 this.focus( event, next );
2653 nextPage: function( event ) {
2654 var item, base, height;
2656 if ( !this.active ) {
2660 if ( this.isLastItem() ) {
2663 if ( this._hasScroll() ) {
2664 base = this.active.offset().top;
2665 height = this.element.height();
2666 this.active.nextAll( ".ui-menu-item" ).each(function() {
2668 return item.offset().top - base - height < 0;
2671 this.focus( event, item );
2673 this.focus( event, this.activeMenu.find( this.options.items )
2674 [ !this.active ? "first" : "last" ]() );
2678 previousPage: function( event ) {
2679 var item, base, height;
2680 if ( !this.active ) {
2684 if ( this.isFirstItem() ) {
2687 if ( this._hasScroll() ) {
2688 base = this.active.offset().top;
2689 height = this.element.height();
2690 this.active.prevAll( ".ui-menu-item" ).each(function() {
2692 return item.offset().top - base + height > 0;
2695 this.focus( event, item );
2697 this.focus( event, this.activeMenu.find( this.options.items ).first() );
2701 _hasScroll: function() {
2702 return this.element.outerHeight() < this.element.prop( "scrollHeight" );
2705 select: function( event ) {
2706 // TODO: It should never be possible to not have an active item at this
2707 // point, but the tests don't trigger mouseenter before click.
2708 this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
2709 var ui = { item: this.active };
2710 if ( !this.active.has( ".ui-menu" ).length ) {
2711 this.collapseAll( event, true );
2713 this._trigger( "select", event, ui );
2719 * jQuery UI Autocomplete 1.11.1
2720 * http://jqueryui.com
2722 * Copyright 2014 jQuery Foundation and other contributors
2723 * Released under the MIT license.
2724 * http://jquery.org/license
2726 * http://api.jqueryui.com/autocomplete/
2730 $.widget( "ui.autocomplete", {
2732 defaultElement: "<input>",
2758 _create: function() {
2759 // Some browsers only repeat keydown events, not keypress events,
2760 // so we use the suppressKeyPress flag to determine if we've already
2761 // handled the keydown event. #7269
2762 // Unfortunately the code for & in keypress is the same as the up arrow,
2763 // so we use the suppressKeyPressRepeat flag to avoid handling keypress
2764 // events when we know the keydown event was used to modify the
2765 // search term. #7799
2766 var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
2767 nodeName = this.element[ 0 ].nodeName.toLowerCase(),
2768 isTextarea = nodeName === "textarea",
2769 isInput = nodeName === "input";
2772 // Textareas are always multi-line
2774 // Inputs are always single-line, even if inside a contentEditable element
2775 // IE also treats inputs as contentEditable
2777 // All other element types are determined by whether or not they're contentEditable
2778 this.element.prop( "isContentEditable" );
2780 this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
2781 this.isNewMenu = true;
2784 .addClass( "ui-autocomplete-input" )
2785 .attr( "autocomplete", "off" );
2787 this._on( this.element, {
2788 keydown: function( event ) {
2789 if ( this.element.prop( "readOnly" ) ) {
2790 suppressKeyPress = true;
2791 suppressInput = true;
2792 suppressKeyPressRepeat = true;
2796 suppressKeyPress = false;
2797 suppressInput = false;
2798 suppressKeyPressRepeat = false;
2799 var keyCode = $.ui.keyCode;
2800 switch ( event.keyCode ) {
2801 case keyCode.PAGE_UP:
2802 suppressKeyPress = true;
2803 this._move( "previousPage", event );
2805 case keyCode.PAGE_DOWN:
2806 suppressKeyPress = true;
2807 this._move( "nextPage", event );
2810 suppressKeyPress = true;