From b5e67861bb552c39bb76b13382a052701e4649e5 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Mon, 28 Mar 2011 11:13:53 -0400 Subject: [PATCH 01/58] Autocomplete: changed autoFocus default back to false. Reverts #7042 - Autocomplete: Default autoFocus to true --- tests/unit/autocomplete/autocomplete_defaults.js | 2 +- ui/jquery.ui.autocomplete.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/autocomplete/autocomplete_defaults.js b/tests/unit/autocomplete/autocomplete_defaults.js index e2196ea9ea1..dd5007089c6 100644 --- a/tests/unit/autocomplete/autocomplete_defaults.js +++ b/tests/unit/autocomplete/autocomplete_defaults.js @@ -4,7 +4,7 @@ var autocomplete_defaults = { appendTo: "body", - autoFocus: true, + autoFocus: false, delay: 300, disabled: false, minLength: 1, diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index ca06fff6584..1685c065236 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -22,7 +22,7 @@ $.widget( "ui.autocomplete", { defaultElement: "", options: { appendTo: "body", - autoFocus: true, + autoFocus: false, delay: 300, minLength: 1, position: { From ec4825535dc0654721df60f56b7bc7e73b61bfcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 28 Mar 2011 11:15:29 -0400 Subject: [PATCH 02/58] Accordion: Removed empty ticket test file. --- tests/unit/accordion/accordion_tickets.js | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 tests/unit/accordion/accordion_tickets.js diff --git a/tests/unit/accordion/accordion_tickets.js b/tests/unit/accordion/accordion_tickets.js deleted file mode 100644 index b301051da34..00000000000 --- a/tests/unit/accordion/accordion_tickets.js +++ /dev/null @@ -1,5 +0,0 @@ -(function( $ ) { - -module( "accordion: tickets", accordionSetupTeardown() ); - -}( jQuery ) ); From ec0a9cc4544a124043aa618dc599d42e750b9e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 28 Mar 2011 11:20:03 -0400 Subject: [PATCH 03/58] Removed empty ticket test files. --- tests/unit/accordion/accordio.html | 1 - tests/unit/accordion/accordion.html | 1 - tests/unit/autocomplete/autocomplete.html | 1 - tests/unit/autocomplete/autocomplete_tickets.js | 14 -------------- 4 files changed, 17 deletions(-) delete mode 100644 tests/unit/autocomplete/autocomplete_tickets.js diff --git a/tests/unit/accordion/accordio.html b/tests/unit/accordion/accordio.html index 4e4df72b4a9..69d445d1dff 100644 --- a/tests/unit/accordion/accordio.html +++ b/tests/unit/accordion/accordio.html @@ -51,7 +51,6 @@ - diff --git a/tests/unit/accordion/accordion.html b/tests/unit/accordion/accordion.html index 65fd16ab643..be9ceb05d5c 100644 --- a/tests/unit/accordion/accordion.html +++ b/tests/unit/accordion/accordion.html @@ -54,7 +54,6 @@ - - - - -

#4551 - Sortable connectWith fails if item is floated

- -
-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
- -
-
- -
-
12
-
14
-
- - - diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 8356eeb9fbe..131fb50d046 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -614,6 +614,10 @@ $.widget("ui.sortable", $.ui.mouse, { for (var i = this.items.length - 1; i >= 0; i--){ var item = this.items[i]; + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0]) + continue; + var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; if (!fast) { From d573a92bebf881d6ad68e4e128b5f534e047ae0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 7 Apr 2011 13:53:20 -0400 Subject: [PATCH 36/58] Tabs: Added tests for aria-controls attribute being assigned on init. --- tests/unit/tabs/tabs.html | 3 ++- tests/unit/tabs/tabs_core.js | 29 ++++++++++++++++++++++------ tests/unit/tabs/tabs_deprecated.html | 3 ++- tests/unit/tabs/tabs_deprecated.js | 4 ++-- tests/unit/tabs/tabs_events.js | 8 ++++---- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/tests/unit/tabs/tabs.html b/tests/unit/tabs/tabs.html index 3d1c780401d..c800894ffd2 100644 --- a/tests/unit/tabs/tabs.html +++ b/tests/unit/tabs/tabs.html @@ -72,7 +72,8 @@

  • 1
  • 2
  • 3
  • -
  • 4
  • +
  • 4
  • +
  • 5
  • diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js index 25e54c3ee18..30d58c25490 100644 --- a/tests/unit/tabs/tabs_core.js +++ b/tests/unit/tabs/tabs_core.js @@ -4,10 +4,10 @@ module( "tabs: core" ); test( "markup structure", function() { expect( 3 ); - var el = $( "#tabs1" ).tabs(); - ok( el.hasClass( "ui-tabs" ), "main element is .ui-tabs" ); - ok( el.find( "ul" ).hasClass( "ui-tabs-nav" ), "list item is .ui-tabs-nav" ); - equal( el.find( ".ui-tabs-panel" ).length, 3, + var element = $( "#tabs1" ).tabs(); + ok( element.hasClass( "ui-tabs" ), "main element is .ui-tabs" ); + ok( element.find( "ul" ).hasClass( "ui-tabs-nav" ), "list item is .ui-tabs-nav" ); + equal( element.find( ".ui-tabs-panel" ).length, 3, ".ui-tabs-panel elements exist, correct number" ); }); @@ -19,13 +19,30 @@ $.each({ }, function( type, selector ) { test( "markup structure: " + type, function() { expect( 2 ); - var el = $( selector ).tabs(); - ok( el.hasClass( "ui-tabs" ), "main element is .ui-tabs" ); + var element = $( selector ).tabs(); + ok( element.hasClass( "ui-tabs" ), "main element is .ui-tabs" ); ok( $( selector + "-list" ).hasClass( "ui-tabs-nav" ), "list item is .ui-tabs-nav" ); }); }); +test( "aria-controls", function() { + expect( 7 ); + var element = $( "#tabs1" ).tabs(), + tabs = element.find( ".ui-tabs-nav a" ); + tabs.each(function() { + var tab = $( this ); + equal( tab.attr( "href" ).substring( 1 ), tab.attr( "aria-controls" ) ); + }); + + element = $( "#tabs2" ).tabs(); + tabs = element.find( ".ui-tabs-nav a" ); + equal( tabs.eq( 0 ).attr( "aria-controls" ), "colon:test" ); + equal( tabs.eq( 1 ).attr( "aria-controls" ), "inline-style" ); + ok( /^ui-tabs-\d+$/.test( tabs.eq( 2 ).attr( "aria-controls" ) ), "generated id" ); + equal( tabs.eq( 3 ).attr( "aria-controls" ), "custom-id" ); +}); + test( "accessibility", function() { // TODO: add tests }); diff --git a/tests/unit/tabs/tabs_deprecated.html b/tests/unit/tabs/tabs_deprecated.html index b50cebebc8f..54e0c39d657 100644 --- a/tests/unit/tabs/tabs_deprecated.html +++ b/tests/unit/tabs/tabs_deprecated.html @@ -71,7 +71,8 @@

  • 1
  • 2
  • 3
  • -
  • 4
  • +
  • 4
  • +
  • 5
  • diff --git a/tests/unit/tabs/tabs_deprecated.js b/tests/unit/tabs/tabs_deprecated.js index c6549fd5092..c3116989e57 100644 --- a/tests/unit/tabs/tabs_deprecated.js +++ b/tests/unit/tabs/tabs_deprecated.js @@ -11,7 +11,7 @@ test( "panel ids", function() { equal( ui.panel.attr( "id" ), "∫ßáö_Սե", "from title attribute" ); event.preventDefault(); }); - element.tabs( "option", "active", 3 ); + element.tabs( "option", "active", 4 ); element.one( "tabsbeforeload", function( event, ui ) { ok( /^ui-tabs-\d+$/.test( ui.panel.attr( "id" ) ), "generated id" ); @@ -329,7 +329,7 @@ test( "length", function() { expect( 2 ); equals( $( "#tabs1" ).tabs().tabs( "length" ), 3, "basic tabs" ); - equals( $( "#tabs2" ).tabs().tabs( "length" ), 4, "ajax tabs with missing panels" ); + equals( $( "#tabs2" ).tabs().tabs( "length" ), 5, "ajax tabs with missing panels" ); }); test( "url", function() { diff --git a/tests/unit/tabs/tabs_events.js b/tests/unit/tabs/tabs_events.js index 2e54407de7e..28925a2b9dc 100644 --- a/tests/unit/tabs/tabs_events.js +++ b/tests/unit/tabs/tabs_events.js @@ -163,10 +163,10 @@ test( "beforeLoad", function() { strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" ); equals( ui.panel.html(), "", "panel html" ); event.preventDefault(); - tabs_state( element, 1, 0, 0, 0 ); + tabs_state( element, 1, 0, 0, 0, 0 ); }); element.tabs( "option", "active", 2 ); - tabs_state( element, 0, 0, 1, 0 ); + tabs_state( element, 0, 0, 1, 0, 0 ); equals( panel.html(), "", "panel html after" ); // click, change panel content @@ -184,10 +184,10 @@ test( "beforeLoad", function() { strictEqual( ui.panel[ 0 ], panel[ 0 ], "panel" ); ui.panel.html( "

    testing

    " ); event.preventDefault(); - tabs_state( element, 0, 0, 1, 0 ); + tabs_state( element, 0, 0, 1, 0, 0 ); }); element.find( ".ui-tabs-nav a" ).eq( 3 ).click(); - tabs_state( element, 0, 0, 0, 1 ); + tabs_state( element, 0, 0, 0, 1, 0 ); equals( panel.html(), "

    testing

    ", "panel html after" ); }); From 9d9e1ce12225302776497d0a98271e904740b4fd Mon Sep 17 00:00:00 2001 From: jzaefferer Date: Fri, 8 Apr 2011 15:31:06 +0200 Subject: [PATCH 37/58] Adding popup utility prototype to visual menu tests --- tests/visual/menu/popup.html | 159 +++++++++++++++++++++++++++++++++++ tests/visual/menu/popup.js | 107 +++++++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 tests/visual/menu/popup.html create mode 100644 tests/visual/menu/popup.js diff --git a/tests/visual/menu/popup.html b/tests/visual/menu/popup.html new file mode 100644 index 00000000000..de979613386 --- /dev/null +++ b/tests/visual/menu/popup.html @@ -0,0 +1,159 @@ + + + + Visual Test for Popup Utility + + + + + + + + + + + + + + + + + + +
    +
    + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameRelease YearAverage Rating
    Red Hot Chili Peppers: Funky Monks19933.6 + +
    Rod Stewart: Storyteller 1984-199119913.1
    Stevie Ray Vaughan and Double Trouble: Live at the El Mocambo 198319913.9
    Spike and Mike's Sick & Twisted Festival of Animation19972.6
    + +
    + Log: +
    +
    + + + diff --git a/tests/visual/menu/popup.js b/tests/visual/menu/popup.js new file mode 100644 index 00000000000..dea1452e045 --- /dev/null +++ b/tests/visual/menu/popup.js @@ -0,0 +1,107 @@ +/* + * jQuery UI popup utility + */ +(function($) { + +var idIncrement = 0; + +$.widget( "ui.popup", { + options: { + position: { + my: "left top", + at: "left bottom" + } + }, + _create: function() { + if ( !this.options.trigger ) { + this.options.trigger = this.element.prev(); + } + + if ( !this.element.attr( "id" ) ) { + this.element.attr( "id", "ui-popup-" + idIncrement++ ); + this.generatedId = true; + } + + if ( !this.element.attr( "role" ) ) { + // TODO alternatives to tooltip are dialog and menu, all three aren't generic popups + this.element.attr( "role", "tooltip" ); + this.generatedRole = true; + } + + this.options.trigger + .attr( "aria-haspop", true ) + .attr( "aria-owns", this.element.attr( "id" ) ); + + this.element + .addClass("ui-popup") + this._close(); + + this._bind(this.options.trigger, { + click: function( event ) { + event.stopPropagation(); + event.preventDefault(); + this._open( event ); + } + }); + + this._bind({ + keyup: function( event ) { + if (event.keyCode == $.ui.keyCode.ESCAPE && this.element.is( ":visible" )) { + this._close( event ); + this.options.trigger.focus(); + } + } + }); + + this._bind(document, { + click: function( event ) { + if (this.open && !$(event.target).closest(".ui-popup").length) { + this._close( event ); + } + } + }) + }, + + _destroy: function() { + this.element + .show() + .removeClass( "ui-popup" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ); + + if ( this.generatedId ) { + this.element.removeAttr( "id" ); + } + if ( this.generatedRole ) { + this.element.removeAttr( "role" ); + } + }, + + _open: function( event ) { + var position = $.extend( {}, { + of: this.options.trigger + }, this.options.position ); + + this.element + .show() + .attr( "aria-hidden", false ) + .attr( "aria-expanded", true ) + .position( position ) + .focus(); + this.open = true; + this._trigger( "open", event ); + }, + + _close: function( event ) { + this.element + .hide() + .attr( "aria-hidden", true ) + .attr( "aria-expanded", false ); + this.open = false; + this._trigger( "close", event ); + } + + +}); + +}(jQuery)); From 3b77ac654b079a3098d12cca04d2397bb3863b85 Mon Sep 17 00:00:00 2001 From: Kyle Florence Date: Fri, 8 Apr 2011 16:55:14 -0700 Subject: [PATCH 38/58] Progressbar: hide valueDiv when value is 0. Fixes #7231 - valueDiv should be hidden when value is at 0% --- ui/jquery.ui.progressbar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/jquery.ui.progressbar.js b/ui/jquery.ui.progressbar.js index cb89a1c394a..e3b25cfd798 100644 --- a/ui/jquery.ui.progressbar.js +++ b/ui/jquery.ui.progressbar.js @@ -93,6 +93,7 @@ $.widget( "ui.progressbar", { } this.valueDiv + .toggle( value > this.min ) .toggleClass( "ui-corner-right", value === this.options.max ) .width( percentage.toFixed(0) + "%" ); this.element.attr( "aria-valuenow", value ); From 7272f3bdef8ebc81cc51d3749fdeb4696eda666a Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Sat, 9 Apr 2011 14:53:15 -0400 Subject: [PATCH 39/58] Progressbar: Added unit test for #7231 - valueDiv should be hidden when value is at 0% --- tests/unit/progressbar/progressbar_options.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/unit/progressbar/progressbar_options.js b/tests/unit/progressbar/progressbar_options.js index 70ad7ababb8..230c939abd0 100644 --- a/tests/unit/progressbar/progressbar_options.js +++ b/tests/unit/progressbar/progressbar_options.js @@ -10,6 +10,23 @@ test("{ value : 0 }, default", function() { same( 0, $("#progressbar").progressbar("value") ); }); +// Ticket #7231 - valueDiv should be hidden when value is at 0% +test( "value: visibility of valueDiv", function() { + expect( 5 ); + var element = $( "#progressbar" ).progressbar({ + value: 0 + }); + ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ), "valueDiv hidden when value is initialized at 0" ); + element.progressbar( "value", 1 ); + ok( element.children( ".ui-progressbar-value" ).is( ":visible" ), "valueDiv visible when value is set to 1" ); + element.progressbar( "value", 100 ); + ok( element.children( ".ui-progressbar-value" ).is( ":visible" ), "valueDiv visible when value is set to 100" ); + element.progressbar( "value", 0 ); + ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ), "valueDiv hidden when value is set to 0" ); + element.progressbar( "value", -1 ); + ok( element.children( ".ui-progressbar-value" ).is( ":hidden" ), "valueDiv hidden when value set to -1 (normalizes to 0)" ); +}); + test("{ value : 5 }", function() { $("#progressbar").progressbar({ value: 5 From 64f13b661a571806bdfb181d1ef511ac9e2771b3 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Sat, 9 Apr 2011 15:54:17 -0400 Subject: [PATCH 40/58] Resizable: Added a non-visible yet non-transparent (apparently) no-request background-image on resizable handles to work around an IE bug. Fixed #7233 - Resizable: resizable handles fail to work in IE if transparent and content overlaps --- themes/base/jquery.ui.resizable.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css index eeb547b9f6f..6a258d7028c 100644 --- a/themes/base/jquery.ui.resizable.css +++ b/themes/base/jquery.ui.resizable.css @@ -8,7 +8,12 @@ * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} -.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; + /* http://bugs.jqueryui.com/ticket/7233 + - Resizable: resizable handles fail to work in IE if transparent and content overlaps + */ + background-image:url(about:blank); +} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } From 08b6a2b5189f62c62a0ee725629087b445f308d7 Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Sat, 9 Apr 2011 23:12:53 -0400 Subject: [PATCH 41/58] Resizable: use background-image:url(data:) instead of background-image:url(about:blank) as it's shorter and safer. Thanks @epascarello . Better fixes #7233 - Resizable: resizable handles fail to work in IE if transparent and content overlaps --- themes/base/jquery.ui.resizable.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/base/jquery.ui.resizable.css b/themes/base/jquery.ui.resizable.css index 6a258d7028c..05f855a7145 100644 --- a/themes/base/jquery.ui.resizable.css +++ b/themes/base/jquery.ui.resizable.css @@ -12,7 +12,7 @@ /* http://bugs.jqueryui.com/ticket/7233 - Resizable: resizable handles fail to work in IE if transparent and content overlaps */ - background-image:url(about:blank); + background-image:url(data:); } .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } From ccac8cd4920f7d79d046fb34589d0dbb48d31551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 11 Apr 2011 10:08:32 -0400 Subject: [PATCH 42/58] Tabs: Updated references to .ui-tabs-selected to use .ui-tabs-active. --- demos/demos.css | 8 ++++---- demos/tabs/bottom.html | 1 - demos/tabs/vertical.html | 2 +- tests/unit/tabs/tabs_deprecated.js | 2 +- tests/unit/tabs/tabs_options.js | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/demos/demos.css b/demos/demos.css index 2d2ce1fc82c..f5f2dbe6469 100644 --- a/demos/demos.css +++ b/demos/demos.css @@ -320,10 +320,10 @@ div.demo-description { #widget-docs .ui-tabs-nav li a:hover, #widget-docs .ui-tabs-nav li a:active { font-size:14px; padding:4px 1.2em 3px; color:#fff; } -#widget-docs .ui-tabs-nav li.ui-tabs-selected a:link, -#widget-docs .ui-tabs-nav li.ui-tabs-selected a:visited, -#widget-docs .ui-tabs-nav li.ui-tabs-selected a:hover, -#widget-docs .ui-tabs-nav li.ui-tabs-selected a:active { color:#e6820E; } +#widget-docs .ui-tabs-nav li.ui-tabs-active a:link, +#widget-docs .ui-tabs-nav li.ui-tabs-active a:visited, +#widget-docs .ui-tabs-nav li.ui-tabs-active a:hover, +#widget-docs .ui-tabs-nav li.ui-tabs-active a:active { color:#e6820E; } #widget-docs .ui-tabs-panel { padding:20px 9px; font-size:12px; line-height:1.4; color:#000; } diff --git a/demos/tabs/bottom.html b/demos/tabs/bottom.html index 4f0e3c2a441..68ccac90276 100644 --- a/demos/tabs/bottom.html +++ b/demos/tabs/bottom.html @@ -23,7 +23,6 @@ .tabs-bottom .ui-tabs-panel { height: 140px; overflow: auto; } .tabs-bottom .ui-tabs-nav { position: absolute !important; left: 0; bottom: 0; right:0; padding: 0 0.2em 0.2em 0; } .tabs-bottom .ui-tabs-nav li { margin-top: -2px !important; margin-bottom: 1px !important; border-top: none; border-bottom-width: 1px; } - .ui-tabs-selected { margin-top: -3px !important; } diff --git a/demos/tabs/vertical.html b/demos/tabs/vertical.html index 4ddb5c9c995..690f034201b 100644 --- a/demos/tabs/vertical.html +++ b/demos/tabs/vertical.html @@ -20,7 +20,7 @@ .ui-tabs-vertical .ui-tabs-nav { padding: .2em .1em .2em .2em; float: left; width: 12em; } .ui-tabs-vertical .ui-tabs-nav li { clear: left; width: 100%; border-bottom-width: 1px !important; border-right-width: 0 !important; margin: 0 -1px .2em 0; } .ui-tabs-vertical .ui-tabs-nav li a { display:block; } - .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; } + .ui-tabs-vertical .ui-tabs-nav li.ui-tabs-active { padding-bottom: 0; padding-right: .1em; border-right-width: 1px; border-right-width: 1px; } .ui-tabs-vertical .ui-tabs-panel { padding: 1em; float: right; width: 40em;} diff --git a/tests/unit/tabs/tabs_deprecated.js b/tests/unit/tabs/tabs_deprecated.js index c3116989e57..c221868fc00 100644 --- a/tests/unit/tabs/tabs_deprecated.js +++ b/tests/unit/tabs/tabs_deprecated.js @@ -130,7 +130,7 @@ test('selected', function() { el.tabs('destroy'); el = $('#tabs1').tabs({ selected: -1 }); equals(el.tabs('option', 'selected'), -1, 'should be -1 for all tabs unselected'); - equals( $('li.ui-tabs-selected', el).length, 0, 'no tab should be selected' ); + equals( $('li.ui-tabs-active', el).length, 0, 'no tab should be selected' ); equals( $('div:hidden', '#tabs1').length, 3, 'all panels should be hidden' ); el.tabs('destroy'); diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js index 49c77521eb6..ce556fc3eee 100644 --- a/tests/unit/tabs/tabs_options.js +++ b/tests/unit/tabs/tabs_options.js @@ -55,7 +55,7 @@ test('active', function() { el.tabs('destroy'); el.tabs({ active: false }); equals(el.tabs('option', 'active'), false, 'should be false for all tabs deactive'); - equals( $('li.ui-tabs-selected', el).length, 0, 'no tab should be active' ); + equals( $('li.ui-tabs-active', el).length, 0, 'no tab should be active' ); equals( $('div:hidden', '#tabs1').length, 3, 'all panels should be hidden' ); el.tabs('destroy'); From a3370064d85b30d89846efde00e461a2d493dfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 11 Apr 2011 10:39:33 -0400 Subject: [PATCH 43/58] Tabs: Update ajax demo to use beforeLoad event instead of deprecated ajaxOptions option. --- demos/tabs/ajax.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/demos/tabs/ajax.html b/demos/tabs/ajax.html index 284de57f949..40791458963 100644 --- a/demos/tabs/ajax.html +++ b/demos/tabs/ajax.html @@ -12,13 +12,12 @@ + - - - - - - - - - - - - -
    - - - - - -

    Default

    - - - -

    - -
    - -

    Drilldown

    - - - -
    - -

    - -
    - -

    Flyout / nested

    - - - -
    - - - - diff --git a/tests/static/menu/default.html b/tests/static/menu/default.html deleted file mode 100644 index dd1e0ba7d03..00000000000 --- a/tests/static/menu/default.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - Menu Static Test : Default - - - - - - - - - - - - - - From 5a5ce51aad3a60093905e0c93e7503aca2d59688 Mon Sep 17 00:00:00 2001 From: maggiewachs Date: Thu, 21 Apr 2011 11:30:29 -0400 Subject: [PATCH 56/58] Removed duplicate selector reference --- themes/base/jquery.ui.menu.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/themes/base/jquery.ui.menu.css b/themes/base/jquery.ui.menu.css index a700d2895f9..d5d8028215e 100644 --- a/themes/base/jquery.ui.menu.css +++ b/themes/base/jquery.ui.menu.css @@ -29,8 +29,6 @@ padding:.2em .4em; line-height:1.5; zoom:1; -} -.ui-menu .ui-menu-item a { font-weight: normal; } .ui-menu .ui-menu-item a.ui-state-focus, From 49556995d2dffb7b57169bc2462aef5e17370d41 Mon Sep 17 00:00:00 2001 From: maggiewachs Date: Thu, 21 Apr 2011 14:29:45 -0400 Subject: [PATCH 57/58] Set menu item link top padding to px (in place of em); this fixes the issue where the submenu jumped when mousing over the parent item's menu icon. --- themes/base/jquery.ui.menu.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/base/jquery.ui.menu.css b/themes/base/jquery.ui.menu.css index d5d8028215e..ed4b4a13a18 100644 --- a/themes/base/jquery.ui.menu.css +++ b/themes/base/jquery.ui.menu.css @@ -26,7 +26,7 @@ .ui-menu .ui-menu-item a { text-decoration:none; display:block; - padding:.2em .4em; + padding: 2px .4em; line-height:1.5; zoom:1; font-weight: normal; From e7e00ccbc750c0a376f5a222ba98de659628b4b9 Mon Sep 17 00:00:00 2001 From: Jean-Francois Remy Date: Fri, 22 Apr 2011 21:53:27 -0700 Subject: [PATCH 58/58] Check if we are too far left / down as well as right / bottom - Fix #7211 - Position: Collision: fit doesn't work at top of window when scrolled --- ui/jquery.ui.position.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js index b6fcc715192..f81d6b1f28a 100644 --- a/ui/jquery.ui.position.js +++ b/ui/jquery.ui.position.js @@ -184,17 +184,15 @@ $.ui.position = { fit: { left: function( position, data ) { var win = $( window ), - over = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(); - position.left = over > 0 ? - position.left - over : - Math.max( position.left - data.collisionPosition.left, position.left ); + overLeft = win.scrollLeft() - data.collisionPosition.left, + overRight = data.collisionPosition.left + data.collisionWidth - win.width() - win.scrollLeft(); + position.left = overLeft > 0 ? position.left + overLeft : (overRight > 0 ? position.left - overRight : Math.max( position.left - data.collisionPosition.left, position.left )); }, top: function( position, data ) { var win = $( window ), - over = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(); - position.top = over > 0 ? - position.top - over : - Math.max( position.top - data.collisionPosition.top, position.top ); + overTop = win.scrollTop() - data.collisionPosition.top, + overBottom = data.collisionPosition.top + data.collisionHeight - win.height() - win.scrollTop(); + position.top = overTop > 0 ? position.top + overTop : (overBottom > 0 ? position.top - overBottom : Math.max( position.top - data.collisionPosition.top, position.top )); } },