diff --git a/AUTHORS.txt b/AUTHORS.txt index b1b977f..372a747 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -88,7 +88,7 @@ Mario Visic Xavi Ramirez Max Schnur Saji Nediyanchath -Corey Frang +Corey Frang Aaron Peterson Ivan Peters Mohamed Cherif Bouchelaghem @@ -172,7 +172,7 @@ Justin Domnitz Douglas Cerna Bert ter Heide Jasvir Nagra -Petr Hromadko +Yuriy Khabarov <13real008@gmail.com> Harri Kilpiö Lado Lomidze Amir E. Aharoni @@ -227,11 +227,11 @@ Fabrício Matté Viktor Kojouharov Pawel Maruszczyk (http://hrabstwo.net) Pavel Selitskas -Bjørn Johansen +Bjørn Johansen Matthieu Penant Dominic Barnes David Sullivan -Thomas Jaggi +Thomas Jaggi Vahid Sohrabloo Travis Carden Bruno M. Custódio @@ -243,18 +243,42 @@ Woody Gilk Zbigniew Motyka Suhail Alkowaileet Toshi MARUYAMA +David Hansen +Brian Grinstead Christian Klammer Steven Luscher Gan Eng Chin +Gabriel Schulhof +Alexander Schmitz Vilhjálmur Skúlason Siebrand Mazeland Mohsen Ekhtiari +Pere Orga Jasper de Groot +Stephane Deschamps Jyoti Deka Andrei Picus Ondrej Novy Jacob McCutcheon -Monika Piotrowicz +Monika Piotrowicz Imants Horsts Eric Dahl +Dave Stein +Dylan Barrell +Daniel DeGroff +Michael Wiencek Thomas Meyer +Ruslan Yakhyaev +Brian J. Dowling +Ben Higgins +Yermo Lamers +Patrick Stapleton +Trisha Crowley +Usman Akeju +Rodrigo Menezes +Jacques Perrault +Frederik Elvhage +Will Holley +Uri Gilad +Richard Gibson +Simen Bekkhus \ No newline at end of file diff --git a/MIT-LICENSE.txt b/LICENSE.txt similarity index 59% rename from MIT-LICENSE.txt rename to LICENSE.txt index 1c693e3..c36fa56 100644 --- a/MIT-LICENSE.txt +++ b/LICENSE.txt @@ -1,10 +1,14 @@ -Copyright 2013 jQuery Foundation and other contributors, -http://jqueryui.com/ +Copyright 2007, 2014 jQuery Foundation and other contributors, +https://jquery.org/ This software consists of voluntary contributions made by many -individuals (AUTHORS.txt, http://jqueryui.com/about) For exact -contribution history, see the revision history and logs, available -at http://jquery-ui.googlecode.com/svn/ +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -24,3 +28,17 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. \ No newline at end of file diff --git a/bower.json b/bower.json index 6b48d92..afeb7ff 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jquery-ui", - "version": "1.11.1", + "version": "1.11.2", "main": [ "jquery-ui.js" ], diff --git a/component.json b/component.json index 0c53442..ed7bb77 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "name": "jquery-ui", "repo": "components/jqueryui", - "version": "1.11.1", + "version": "1.11.2", "license": "MIT", "scripts": [ "jquery-ui.js" diff --git a/composer.json b/composer.json index 8d1f89b..cea9ab6 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library. Whether you're building highly interactive web applications or you just need to add a date picker to a form control, jQuery UI is the perfect choice.", "license": "MIT", "require": { - "components/jquery": ">=1.8" + "components/jquery": ">=1.6" }, "authors": [ { @@ -40,6 +40,11 @@ "name": "TJ VanToll", "email": "tj.vantoll@gmail.com", "homepage": "http://tjvantoll.com" + }, + { + "name": "Felix Nagel", + "email": "info@felixnagel.com", + "homepage": "http://www.felixnagel.com" } ], "extra": { diff --git a/jquery-ui.js b/jquery-ui.js index c7552b7..ce8731b 100644 --- a/jquery-ui.js +++ b/jquery-ui.js @@ -1,4 +1,4 @@ -/*! jQuery UI - v1.11.1 - 2014-08-13 +/*! 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 */ @@ -15,7 +15,7 @@ } }(function( $ ) { /*! - * jQuery UI Core 1.11.1 + * 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.1", + version: "1.11.2", keyCode: { BACKSPACE: 8, @@ -309,7 +309,7 @@ $.ui.plugin = { /*! - * jQuery UI Widget 1.11.1 + * jQuery UI Widget 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -336,7 +336,7 @@ $.cleanData = (function( orig ) { } // http://bugs.jquery.com/ticket/8235 - } catch( e ) {} + } catch ( e ) {} } orig( elems ); }; @@ -554,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 = $(); @@ -580,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(); @@ -742,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 ) { @@ -849,7 +856,7 @@ var widget = $.widget; /*! - * jQuery UI Mouse 1.11.1 + * jQuery UI Mouse 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -866,7 +873,7 @@ $( document ).mouseup( function() { }); var mouse = $.widget("ui.mouse", { - version: "1.11.1", + version: "1.11.2", options: { cancel: "input,textarea,button,select,option", distance: 1, @@ -907,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)); @@ -960,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) { @@ -1023,7 +1042,7 @@ var mouse = $.widget("ui.mouse", { /*! - * jQuery UI Position 1.11.1 + * jQuery UI Position 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -1530,7 +1549,7 @@ var position = $.ui.position; /*! - * jQuery UI Accordion 1.11.1 + * jQuery UI Accordion 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -1542,7 +1561,7 @@ var position = $.ui.position; var accordion = $.widget( "ui.accordion", { - version: "1.11.1", + version: "1.11.2", options: { active: 0, animate: {}, @@ -1776,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() { @@ -2091,7 +2119,7 @@ var accordion = $.widget( "ui.accordion", { /*! - * jQuery UI Menu 1.11.1 + * jQuery UI Menu 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -2103,7 +2131,7 @@ var accordion = $.widget( "ui.accordion", { var menu = $.widget( "ui.menu", { - version: "1.11.1", + version: "1.11.2", defaultElement: "
    ", delay: 300, options: { @@ -2178,6 +2206,12 @@ var menu = $.widget( "ui.menu", { } }, "mouseenter .ui-menu-item": function( event ) { + // Ignore mouse events while typeahead is active, see #10458. + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse + // is over an item in the menu + if ( this.previousFilter ) { + return; + } var target = $( event.currentTarget ); // Remove ui-state-active class from siblings of the newly focused menu item // to avoid a jump caused by adjacent elements both having a class with a border @@ -2257,13 +2291,9 @@ var menu = $.widget( "ui.menu", { }, _keydown: function( event ) { - var match, prev, character, skip, regex, + var match, prev, character, skip, preventDefault = true; - function escape( value ) { - return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); - } - switch ( event.keyCode ) { case $.ui.keyCode.PAGE_UP: this.previousPage( event ); @@ -2312,10 +2342,7 @@ var menu = $.widget( "ui.menu", { character = prev + character; } - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.find( this.options.items ).filter(function() { - return regex.test( $( this ).text() ); - }); + match = this._filterMenuItems( character ); match = skip && match.index( this.active.next() ) !== -1 ? this.active.nextAll( ".ui-menu-item" ) : match; @@ -2324,22 +2351,15 @@ var menu = $.widget( "ui.menu", { // to move down the menu to the first item that starts with that character if ( !match.length ) { character = String.fromCharCode( event.keyCode ); - regex = new RegExp( "^" + escape( character ), "i" ); - match = this.activeMenu.find( this.options.items ).filter(function() { - return regex.test( $( this ).text() ); - }); + match = this._filterMenuItems( character ); } if ( match.length ) { this.focus( event, match ); - if ( match.length > 1 ) { - this.previousFilter = character; - this.filterTimer = this._delay(function() { - delete this.previousFilter; - }, 1000 ); - } else { + this.previousFilter = character; + this.filterTimer = this._delay(function() { delete this.previousFilter; - } + }, 1000 ); } else { delete this.previousFilter; } @@ -2711,12 +2731,26 @@ var menu = $.widget( "ui.menu", { this.collapseAll( event, true ); } this._trigger( "select", event, ui ); + }, + + _filterMenuItems: function(character) { + var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), + regex = new RegExp( "^" + escapedCharacter, "i" ); + + return this.activeMenu + .find( this.options.items ) + + // Only match on items, not dividers or other content (#10571) + .filter( ".ui-menu-item" ) + .filter(function() { + return regex.test( $.trim( $( this ).text() ) ); + }); } }); /*! - * jQuery UI Autocomplete 1.11.1 + * jQuery UI Autocomplete 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -2728,7 +2762,7 @@ var menu = $.widget( "ui.menu", { $.widget( "ui.autocomplete", { - version: "1.11.1", + version: "1.11.2", defaultElement: "", options: { appendTo: null, @@ -3328,7 +3362,7 @@ var autocomplete = $.ui.autocomplete; /*! - * jQuery UI Button 1.11.1 + * jQuery UI Button 1.11.2 * http://jqueryui.com * * Copyright 2014 jQuery Foundation and other contributors @@ -3367,7 +3401,7 @@ var lastActive, }; $.widget( "ui.button", { - version: "1.11.1", + version: "1.11.2", defaultElement: "