16D0F From 23d0c9386fe77fea85b52e5080c5d63564ec81de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 25 Oct 2012 09:43:56 -0400 Subject: [PATCH 01/43] Release: Use 1-9-stable. --- build/release/release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/release/release.js b/build/release/release.js index 2227bf0e6d5..ba8817f3161 100644 --- a/build/release/release.js +++ b/build/release/release.js @@ -10,7 +10,7 @@ var baseDir, repoDir, prevVersion, newVersion, nextVersion, tagTime, existsSync = fs.existsSync || path.existsSync, rnewline = /\r?\n/, repo = "git@github.com:jquery/jquery-ui.git", - branch = "master"; + branch = "1-9-stable"; walk([ bootstrap, From 29fb520fa6ba5f4d643d5aa1a8f6d6a076bfd076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 25 Oct 2012 09:47:35 -0400 Subject: [PATCH 02/43] Updated AUTHORS.txt. --- AUTHORS.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AUTHORS.txt b/AUTHORS.txt index a53bc9dc2d7..2af7a705068 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -208,3 +208,8 @@ Sindre Sorhus Bernhard Sirlinger Jared A. Scheel Rafael Xavier de Souza +John Chen +Dale Kocian +Mike Sherov +Andrew Couch +Marc-Andre Lafortune From 0850efbf753655ef4e812c332bc73331fa8b65a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 25 Oct 2012 09:55:15 -0400 Subject: [PATCH 03/43] Updating the 1-9-stable version to 1.9.2pre. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cb5037da9f1..762b1542713 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "jquery-ui", "title": "jQuery UI", "description": "A curated set of user interface interactions, effects, widgets, and themes built on top of the jQuery JavaScript Library.", - "version": "1.9.1pre", + "version": "1.9.2pre", "homepage": "http://jqueryui.com", "author": { "name": "jQuery Foundation and other contributors", From 096b763a71d4a3206a2e92473eb9020c2ef7346d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 25 Oct 2012 14:15:46 -0400 Subject: [PATCH 04/43] Build: Update the changelog shell to include more newlines, makes it easier to edit it later (cherry picked from commit fb40f1f6baaf77864f2aed0422e30ac7bee5c7fd) --- build/release/changelog-shell | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/build/release/changelog-shell b/build/release/changelog-shell index 9c9df935086..9f0f9b43601 100644 --- a/build/release/changelog-shell +++ b/build/release/changelog-shell @@ -24,54 +24,86 @@ DELETE EVERYTHING ABOVE THE FOLLOWING LINE ## Build + ## Core & Utilities ### UI Core + ### Mouse + ### Widget Factory + ### Position + ## Interactions ### Draggable + ### Droppable + ### Resizable + ### Selectable + ### Sortable + ## Widgets ### Accordion + ### Autocomplete + ### Button + ### Datepicker + ### Dialog + +### Menu + + ### Progressbar + ### Slider + +### Spinner + + ### Tabs + +### Tooltip + + ## Effects + ### Individual effects + ## CSS Framework + ## Demos + ## Website + ### Download Builder From fcde033ed459745ccf95e055aed9f90e3c147a5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Thu, 25 Oct 2012 14:49:14 -0400 Subject: [PATCH 05/43] Build: Remove generateQuickDownload step, will happen later during a release (cherry picked from commit 666014e8e5272f75e37a1b2987542fe552b1a082) --- build/release/release.js | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/build/release/release.js b/build/release/release.js index ba8817f3161..4dcfe16dbb3 100644 --- a/build/release/release.js +++ b/build/release/release.js @@ -43,9 +43,6 @@ walk([ section( "gathering contributors" ), gatherContributors, - section( "generating quick download" ), - generateQuickDownload, - section( "updating trac" ), updateTrac, confirm @@ -263,34 +260,6 @@ function gatherContributors() { echo( "Stored contributors in " + contributorsPath.cyan + "." ); } -function generateQuickDownload() { - var config, - downloadDir = repoDir + "/node_modules/download.jqueryui.com", - filename = "jquery-ui-" + newVersion + ".custom.zip", - destination = baseDir + "/" + filename; - - cd( downloadDir ); - - // Update jQuery UI version for download builder - config = JSON.parse( cat( "config.json" ) ); - config.jqueryUi = newVersion; - JSON.stringify( config ).to( "config.json" ); - - // Generate quick download - // TODO: Find a way to avoid having to clone jquery-ui inside download builder - if ( exec( "grunt prepare build" ).code !== 0 ) { - abort( "Error generating quick download." ); - } - cp( downloadDir + "/release/" + filename, destination ); - // cp() doesn't have error handling, so check for the file - if ( ls( destination ).length !== 1 ) { - abort( "Error copying quick download." ); - } - - // Go back to repo directory for consistency - cd( repoDir ); -} - function updateTrac() { echo( newVersion.cyan + " was tagged at " + tagTime.cyan + "." ); echo( "Close the " + newVersion.cyan + " Milestone with the above date and time." ); From 2e9fb43e38642d6ff31c95b46bcb581524a5cba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Fri, 26 Oct 2012 10:54:29 -0400 Subject: [PATCH 06/43] Release: Updated list of globals. (cherry picked from commit 549ffe36da56deb0a1079c98e2241849ebd2ecc4) --- build/release/release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/release/release.js b/build/release/release.js index 4dcfe16dbb3..4b7875479a2 100644 --- a/build/release/release.js +++ b/build/release/release.js @@ -1,5 +1,5 @@ #!/usr/bin/env node -/*global cat:true cd:true cp:true echo:true exec:true exit:true ls:true*/ +/*global cat:true cd:true echo:true exec:true exit:true*/ "use strict"; From 48398bc58c05d82232a0198f968794443414f231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sun, 28 Oct 2012 20:28:55 -0400 Subject: [PATCH 07/43] Tooltip: Use attributes, not properties, when checking for parent tooltips. Fixes #8742 - Tooltip shows incorrect message in chrome if there is input with name='title' in a form. (cherry picked from commit d074efe5289db4f5182a685046e9b9ad6186ac26) --- tests/unit/tooltip/tooltip.html | 4 ++++ tests/unit/tooltip/tooltip_core.js | 21 +++++++++++++++++++++ ui/jquery.ui.tooltip.js | 15 ++++++++------- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/tests/unit/tooltip/tooltip.html b/tests/unit/tooltip/tooltip.html index ca5a1239ae2..ec616be13ef 100644 --- a/tests/unit/tooltip/tooltip.html +++ b/tests/unit/tooltip/tooltip.html @@ -46,6 +46,10 @@

baz +
+ +
+ diff --git a/tests/unit/tooltip/tooltip_core.js b/tests/unit/tooltip/tooltip_core.js index 6e9bee2082f..f0aed72aada 100644 --- a/tests/unit/tooltip/tooltip_core.js +++ b/tests/unit/tooltip/tooltip_core.js @@ -73,4 +73,25 @@ test( "nested tooltips", function() { equal( $( ".ui-tooltip" ).text(), "child" ); }); +// #8742 +test( "form containing an input with name title", function() { + expect( 4 ); + + var form = $( "#tooltip-form" ).tooltip({ + show: null, + hide: null + }), + input = form.find( "[name=title]" ); + + equal( $( ".ui-tooltip" ).length, 0, "no tooltips on init" ); + + input.trigger( "mouseover" ); + equal( $( ".ui-tooltip" ).length, 1, "tooltip for input" ); + input.trigger( "mouseleave" ); + equal( $( ".ui-tooltip" ).length, 0, "tooltip for input closed" ); + + form.trigger( "mouseover" ); + equal( $( ".ui-tooltip" ).length, 0, "no tooltip for form" ); +}); + }( jQuery ) ); diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index f93dd7a2f84..e2df1092e0b 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -164,19 +164,20 @@ $.widget( "ui.tooltip", { // kill parent tooltips, custom or native, for hover if ( event && event.type === "mouseover" ) { target.parents().each(function() { - var blurEvent; - if ( $( this ).data( "tooltip-open" ) ) { + var parent = $( this ), + blurEvent; + if ( parent.data( "tooltip-open" ) ) { blurEvent = $.Event( "blur" ); blurEvent.target = blurEvent.currentTarget = this; that.close( blurEvent, true ); } - if ( this.title ) { - $( this ).uniqueId(); + if ( parent.attr( "title" ) ) { + parent.uniqueId(); that.parents[ this.id ] = { element: this, - title: this.title + title: parent.attr( "title" ) }; - this.title = ""; + parent.attr( "title", "" ); } }); } @@ -334,7 +335,7 @@ $.widget( "ui.tooltip", { if ( event && event.type === "mouseleave" ) { $.each( this.parents, function( id, parent ) { - parent.element.title = parent.title; + $( parent.element ).attr( "title", parent.title ); delete that.parents[ id ]; }); } From 8f0daea9eb0b5e6feb31b1e69878919bce78cef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 30 Oct 2012 16:26:42 -0400 Subject: [PATCH 08/43] Autocomplete: Set initial left position for menu. Fixes #8749 - Autocomplete dropdown positioned incorrectly in IE. (cherry picked from commit d693ce5324f6f3be8479ef083e4eaf3c705ef043) --- themes/base/jquery.ui.autocomplete.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/base/jquery.ui.autocomplete.css b/themes/base/jquery.ui.autocomplete.css index 05ae3108f12..57bb7e793a8 100644 --- a/themes/base/jquery.ui.autocomplete.css +++ b/themes/base/jquery.ui.autocomplete.css @@ -10,7 +10,8 @@ */ .ui-autocomplete { position: absolute; - top: 0; /* #8656 */ + top: 0; + left: 0; cursor: default; } From ccb741bd0ca4f2309f4cef7e6d05ff72ff37a342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 5 Nov 2012 09:37:01 -0500 Subject: [PATCH 09/43] Dialog: Don't use .attr( props, true ). (cherry picked from commit a8de99c791ae24e558920e1756fb7d0bf9dfc166) --- ui/jquery.ui.dialog.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js index c1ac7bc9ef6..a031eb5e0c2 100644 --- a/ui/jquery.ui.dialog.js +++ b/ui/jquery.ui.dialog.js @@ -369,15 +369,18 @@ $.widget("ui.dialog", { } if ( hasButtons ) { $.each( buttons, function( name, props ) { + var button, click; props = $.isFunction( props ) ? { click: props, text: name } : props; - var button = $( "" ) - .attr( props, true ) - .unbind( "click" ) - .click(function() { - props.click.apply( that.element[0], arguments ); - }) + // Default to a non-submitting button + props = $.extend( { type: "button" }, props ); + // Change the context for the click callback to be the main element + click = props.click; + props.click = function() { + click.apply( that.element[0], arguments ); + }; + button = $( "", props ) .appendTo( that.uiButtonSet ); if ( $.fn.button ) { button.button(); From e65f3ff125721b354a74cc094ef25a7a0092f89d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 5 Nov 2012 11:31:33 -0500 Subject: [PATCH 10/43] Skip collision: fit test in IE until TestSwarm stops using iframes. (cherry picked from commit 8bdf0359bbb3401c053fa453496ffd0c4b9f61bd) --- tests/unit/position/position_core.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/position/position_core.js b/tests/unit/position/position_core.js index 3b749a2186f..7b51223acfe 100644 --- a/tests/unit/position/position_core.js +++ b/tests/unit/position/position_core.js @@ -342,6 +342,8 @@ test( "collision: fit, no collision", function() { }, "with offset" ); }); +// Currently failing in IE8 due to the iframe used by TestSwarm +if ( !/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ) ) { test( "collision: fit, collision", function() { expect( 2 + (scrollTopSupport() ? 1 : 0) ); @@ -372,6 +374,7 @@ test( "collision: fit, collision", function() { win.scrollTop( 0 ).scrollLeft( 0 ); } }); +} test( "collision: flip, no collision", function() { expect( 2 ); From 9e0071fea411902f6daee04bd6e9f0ca83dc5296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 5 Nov 2012 18:37:48 +0100 Subject: [PATCH 11/43] Menu: Look into submenus for uninitialized menu items. Fixes #8773 - Menu: refresh() doesn't refresh existing submenus. (cherry picked from commit 8b3e57024138f1a40be762fd5d29cc390129a8ad) --- tests/unit/menu/menu_methods.js | 9 +++++++ ui/jquery.ui.menu.js | 47 +++++++++++++++++---------------- 2 files changed, 33 insertions(+), 23 deletions(-) diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index c49783c3e4d..a7e78ea6994 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -60,6 +60,15 @@ test( "refresh", function() { equal( element.find( ".ui-menu-item" ).length, 5, "Incorrect number of menu items" ); }); +test( "refresh submenu", function() { + expect( 2 ); + var element = $( "#menu2" ).menu(); + equal( element.find( "ul:first .ui-menu-item" ).length, 3 ); + element.find( "ul" ).andSelf().append( "
  • New Item
  • " ); + element.menu("refresh"); + equal( element.find( "ul:first .ui-menu-item" ).length, 4 ); +}); + test( "widget", function() { expect( 2 ); var element = $( "#menu1" ).menu(), diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 5d401da5351..45c1ec2e4b6 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -277,21 +277,35 @@ $.widget( "ui.menu", { }, refresh: function() { - // Initialize nested menus var menus, icon = this.options.icons.submenu, - submenus = this.element.find( this.options.menus + ":not(.ui-menu)" ) - .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) - .hide() - .attr({ - role: this.options.role, - "aria-hidden": "true", - "aria-expanded": "false" - }); + submenus = this.element.find( this.options.menus ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.prev( "a" ), + submenuCarat = $( "" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); - // Don't refresh list items that are already adapted menus = submenus.add( this.element ); + // Don't refresh list items that are already adapted menus.children( ":not(.ui-menu-item):has(a)" ) .addClass( "ui-menu-item" ) .attr( "role", "presentation" ) @@ -315,19 +329,6 @@ $.widget( "ui.menu", { // Add aria-disabled attribute to any disabled menu item menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); - submenus.each(function() { - var menu = $( this ), - item = menu.prev( "a" ), - submenuCarat = $( "" ) - .addClass( "ui-menu-icon ui-icon " + icon ) - .data( "ui-menu-submenu-carat", true ); - - item - .attr( "aria-haspopup", "true" ) - .prepend( submenuCarat ); - menu.attr( "aria-labelledby", item.attr( "id" ) ); - }); - // If the active item has been removed, blur the menu if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { this.blur(); From 241c10044d8dadf186a8c29113a954580a44dec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 5 Nov 2012 18:59:52 +0100 Subject: [PATCH 12/43] Tooltip: Check type on event directly, preventing TypeError when programmatically moving focus to track-toolipped-input. Fixes #8747 - Tooltip: Using the track option within dialogs creates JS errors (cherry picked from commit 98173a3d0ea8e2e6aeb19dda9b232cb65a0684e4) --- tests/unit/tooltip/tooltip_options.js | 8 ++++++++ ui/jquery.ui.tooltip.js | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/unit/tooltip/tooltip_options.js b/tests/unit/tooltip/tooltip_options.js index 9f0de2b5707..f9da27fb743 100644 --- a/tests/unit/tooltip/tooltip_options.js +++ b/tests/unit/tooltip/tooltip_options.js @@ -146,4 +146,12 @@ test( "track + show delay", function() { equal( $( ".ui-tooltip" ).css( "top" ), topVal + offsetVal + "px" ); }); +test( "track and programmatic focus", function() { + expect( 1 ); + $( "#qunit-fixture div input" ).tooltip({ + track: true + }).focus(); + equal( "inputtitle", $( ".ui-tooltip" ).text() ); +}); + }( jQuery ) ); diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index e2df1092e0b..482ce212041 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -252,7 +252,7 @@ $.widget( "ui.tooltip", { } tooltip.position( positionOption ); } - if ( this.options.track && event && /^mouse/.test( event.originalEvent.type ) ) { + if ( this.options.track && event && /^mouse/.test( event.type ) ) { this._on( this.document, { mousemove: position }); From fbc0e6afe6cb277f7e8b91817484cdcd002afc32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Zaefferer?= Date: Mon, 5 Nov 2012 19:05:58 +0100 Subject: [PATCH 13/43] Tooltip: Make 'flipfit flip' the collision default to avoid the tooltip ever overlapping the trigger. Also fix max-width for custom-content demo. Fixes #8739 - Tooltip: Default positioning on large items off. (cherry picked from commit 1d9eab1ead0d5a6f60e31437bb539eb3f804bacc) --- demos/tooltip/custom-content.html | 3 +++ ui/jquery.ui.tooltip.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/demos/tooltip/custom-content.html b/demos/tooltip/custom-content.html index 93172524ad3..20039e2b830 100644 --- a/demos/tooltip/custom-content.html +++ b/demos/tooltip/custom-content.html @@ -22,6 +22,9 @@ width: 350px; height: 350px; } + .ui-tooltip { + max-width: 350px; + } + diff --git a/demos/accordion/custom-icons.html b/demos/accordion/custom-icons.html index 660f1e1981b..56a9d450c81 100644 --- a/demos/accordion/custom-icons.html +++ b/demos/accordion/custom-icons.html @@ -4,7 +4,7 @@ jQuery UI Accordion - Customize icons - + diff --git a/demos/accordion/default.html b/demos/accordion/default.html index 28fe7cc6d10..311717a402c 100644 --- a/demos/accordion/default.html +++ b/demos/accordion/default.html @@ -4,7 +4,7 @@ jQuery UI Accordion - Default functionality - + diff --git a/demos/accordion/fillspace.html b/demos/accordion/fillspace.html index bdc2939c5f8..1e7df659697 100644 --- a/demos/accordion/fillspace.html +++ b/demos/accordion/fillspace.html @@ -4,7 +4,7 @@ jQuery UI Accordion - Fill space - + diff --git a/demos/accordion/hoverintent.html b/demos/accordion/hoverintent.html index 232773c8485..ce195c05f4e 100644 --- a/demos/accordion/hoverintent.html +++ b/demos/accordion/hoverintent.html @@ -4,7 +4,7 @@ jQuery UI Accordion - Open on hoverintent - + diff --git a/demos/accordion/no-auto-height.html b/demos/accordion/no-auto-height.html index a6356413a0f..2edaa10eafa 100644 --- a/demos/accordion/no-auto-height.html +++ b/demos/accordion/no-auto-height.html @@ -4,7 +4,7 @@ jQuery UI Accordion - No auto height - + diff --git a/demos/accordion/sortable.html b/demos/accordion/sortable.html index 70841b3f2b9..56020efbeaa 100644 --- a/demos/accordion/sortable.html +++ b/demos/accordion/sortable.html @@ -4,7 +4,7 @@ jQuery UI Accordion - Sortable - + diff --git a/demos/addClass/default.html b/demos/addClass/default.html index ad3a1058d00..a0c1ceb14d4 100644 --- a/demos/addClass/default.html +++ b/demos/addClass/default.html @@ -4,7 +4,7 @@ jQuery UI Effects - addClass demo - +