From 574522727c2659cec5f681c6a72f5a001f6532c6 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 3 Nov 2014 16:54:18 +0200 Subject: update jquery-ui.js to v1.11.2 --- scripts/external/jquery-ui.js | 1510 ++++++++++++++++++++++++++--------------- 1 file changed, 971 insertions(+), 539 deletions(-) (limited to 'scripts') diff --git a/scripts/external/jquery-ui.js b/scripts/external/jquery-ui.js index c26c4be7..ce8731b0 100644 --- a/scripts/external/jquery-ui.js +++ b/scripts/external/jquery-ui.js @@ -1,4 +1,4 @@ -/*! jQuery UI - v1.11.0 - 2014-06-26 +/*! jQuery UI - v1.11.2 - 2014-10-16 * http://jqueryui.com * 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 * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ @@ -6,8 +6,8 @@ (function( factory ) { if ( typeof define === "function" && define.amd ) { - // AMD. Register as a named module. - define('jquery-ui', [ "jquery" ], factory ); + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); } else { // Browser globals @@ -15,7 +15,7 @@ } }(function( $ ) { /*! - * jQuery UI Core 1.11.0 + * jQuery UI Core 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -30,7 +30,7 @@ $.ui = $.ui || {}; $.extend( $.ui, { - version: "1.11.0", + version: "1.11.2", keyCode: { BACKSPACE: 8, @@ -54,15 +54,16 @@ $.extend( $.ui, { // plugins $.fn.extend({ - scrollParent: function() { + scrollParent: function( includeHidden ) { var position = this.css( "position" ), excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, scrollParent = this.parents().filter( function() { var parent = $( this ); if ( excludeStaticParent && parent.css( "position" ) === "static" ) { return false; } - return (/(auto|scroll)/).test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); }).eq( 0 ); return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; @@ -99,7 +100,7 @@ function focusable( element, isTabIndexNotNaN ) { if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { return false; } - img = $( "img[usemap=#" + mapName + "]" )[0]; + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; return !!img && visible( img ); } return ( /input|select|textarea|button|object/.test( nodeName ) ? @@ -308,7 +309,7 @@ $.ui.plugin = { /*! - * jQuery UI Widget 1.11.0 + * jQuery UI Widget 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -324,11 +325,18 @@ var widget_uuid = 0, $.cleanData = (function( orig ) { return function( elems ) { - for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { try { - $( elem ).triggerHandler( "remove" ); + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} + } catch ( e ) {} } orig( elems ); }; @@ -546,10 +554,6 @@ $.Widget.prototype = { this.element = $( element ); this.uuid = widget_uuid++; this.eventNamespace = "." + this.widgetName + this.uuid; - this.options = $.widget.extend( {}, - this.options, - this._getCreateOptions(), - options ); this.bindings = $(); this.hoverable = $(); @@ -572,6 +576,11 @@ $.Widget.prototype = { this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); } + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + this._create(); this._trigger( "create", null, this._getCreateEventData() ); this._init(); @@ -734,8 +743,14 @@ $.Widget.prototype = { }, _off: function( element, eventName ) { - eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace; + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; element.unbind( eventName ).undelegate( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); }, _delay: function( handler, delay ) { @@ -841,7 +856,7 @@ var widget = $.widget; /*! - * jQuery UI Mouse 1.11.0 + * jQuery UI Mouse 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -858,7 +873,7 @@ $( document ).mouseup( function() { }); var mouse = $.widget("ui.mouse", { - version: "1.11.0", + version: "1.11.2", options: { cancel: "input,textarea,button,select,option", distance: 1, @@ -899,6 +914,8 @@ var mouse = $.widget("ui.mouse", { return; } + this._mouseMoved = false; + // we may have missed mouseup (out of window) (this._mouseStarted && this._mouseUp(event)); @@ -952,13 +969,23 @@ var mouse = $.widget("ui.mouse", { }, _mouseMove: function(event) { - // IE mouseup check - mouseup happened when mouse was out of window - if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { - return this._mouseUp(event); + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + return this._mouseUp( event ); + } + } - // Iframe mouseup check - mouseup occurred in another document - } else if ( !event.which ) { - return this._mouseUp( event ); + if ( event.which || event.button ) { + this._mouseMoved = true; } if (this._mouseStarted) { @@ -1015,7 +1042,7 @@ var mouse = $.widget("ui.mouse", { /*! - * jQuery UI Position 1.11.0 + * jQuery UI Position 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -1129,8 +1156,11 @@ $.position = { offset: withinElement.offset() || { left: 0, top: 0 }, scrollLeft: withinElement.scrollLeft(), scrollTop: withinElement.scrollTop(), - width: isWindow ? withinElement.width() : withinElement.outerWidth(), - height: isWindow ? withinElement.height() : withinElement.outerHeight() + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() }; } }; @@ -1519,7 +1549,7 @@ var position = $.ui.position; /*! - * jQuery UI Accordion 1.11.0 + * jQuery UI Accordion 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -1531,7 +1561,7 @@ var position = $.ui.position; var accordion = $.widget( "ui.accordion", { - version: "1.11.0", + version: "1.11.2", options: { active: 0, animate: {}, @@ -1765,13 +1795,22 @@ var accordion = $.widget( "ui.accordion", { }, _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + this.headers = this.element.find( this.options.header ) .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); - this.headers.next() + this.panels = this.headers.next() .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) .filter( ":not(.ui-accordion-content-active)" ) .hide(); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } }, _refresh: function() { @@ -2080,7 +2119,7 @@ var accordion = $.widget( "ui.accordion", { /*! - * jQuery UI Menu 1.11.0 + * jQuery UI Menu 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -2092,7 +2131,7 @@ var accordion = $.widget( "ui.accordion", { var menu = $.widget( "ui.menu", { - version: "1.11.0", + version: "1.11.2", defaultElement: "