From 8c5c6e0a32a1e87cab575cbb265873fccbd416df Mon Sep 17 00:00:00 2001 From: kborchers Date: Sun, 22 Jan 2012 11:24:49 -0600 Subject: Menu: Added check for the disabled option on create. --- ui/jquery.ui.menu.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 83ea3c3c0..ebfd5087c 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -45,6 +45,9 @@ $.widget( "ui.menu", { event.preventDefault(); } }, this)); + if ( this.options.disabled ) { + this.element.addClass( "ui-state-disabled" ); + } this._bind({ // Prevent focus from sticking to links inside menu after clicking // them (focus should always stay on UL during navigation). -- cgit v1.2.3 From 4f15e66f5373170caf307237b9a8b2c505ae3dbf Mon Sep 17 00:00:00 2001 From: kborchers Date: Sun, 22 Jan 2012 11:26:41 -0600 Subject: Menu: Added unit tests for the enable, disable and refresh methods as well as the disabled option. Cleaned up some variable names in unit tests. --- tests/unit/menu/menu_core.js | 28 ++++++++++++++-------------- tests/unit/menu/menu_events.js | 12 ++++++------ tests/unit/menu/menu_methods.js | 30 ++++++++++++++++++++++++++++++ tests/unit/menu/menu_options.js | 28 ++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 20 deletions(-) diff --git a/tests/unit/menu/menu_core.js b/tests/unit/menu/menu_core.js index c0feae75c..bccf4a1f2 100644 --- a/tests/unit/menu/menu_core.js +++ b/tests/unit/menu/menu_core.js @@ -9,27 +9,27 @@ module("menu: core"); test("accessibility", function () { expect(5); - var ac = $('#menu1').menu(); + var menu = $('#menu1').menu(); var item0 = $("li:eq(0) a"); - ok( ac.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all"), "menu class"); - equals( ac.attr("role"), "menu", "main role"); - ok( !ac.attr("aria-activedescendant"), "aria attribute not yet active"); + ok( menu.hasClass("ui-menu ui-widget ui-widget-content ui-corner-all"), "menu class"); + equals( menu.attr("role"), "menu", "main role"); + ok( !menu.attr("aria-activedescendant"), "aria attribute not yet active"); - var item = ac.find( "li:first" ).find( "a" ).attr( "id", "xid" ).end(); - ac.menu( "focus", $.Event(), item ); - equals( ac.attr("aria-activedescendant"), "xid", "aria attribute, id from dom"); + var item = menu.find( "li:first" ).find( "a" ).attr( "id", "xid" ).end(); + menu.menu( "focus", $.Event(), item ); + equals( menu.attr("aria-activedescendant"), "xid", "aria attribute, id from dom"); - var item = ac.find( "li:last" ); - ac.menu( "focus", $.Event(), item ); - equals( ac.attr("aria-activedescendant"), "menu1-4", "aria attribute, generated id"); + var item = menu.find( "li:last" ); + menu.menu( "focus", $.Event(), item ); + equals( menu.attr("aria-activedescendant"), "menu1-4", "aria attribute, generated id"); }); test("items class and role", function () { - var ac = $('#menu1').menu(); - expect(1 + 5 * $("li",ac).length); - ok( ($("li",ac).length > 0 ), "number of menu items"); - $("li",ac).each(function(item) { + var menu = $('#menu1').menu(); + expect(1 + 5 * $("li",menu).length); + ok( ($("li",menu).length > 0 ), "number of menu items"); + $("li",menu).each(function(item) { ok( $(this).hasClass("ui-menu-item"), "menu item ("+ item + ") class for item"); equals( $(this).attr("role"), "presentation", "menu item ("+ item + ") role"); equals( $("a", this).attr("role"), "menuitem", "menu item ("+ item + ") role"); diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index 9e68e0c67..8df43fa21 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -7,7 +7,7 @@ module("menu: events"); test("handle click on menu", function() { expect(1); - var ac = $('#menu1').menu({ + var menu = $('#menu1').menu({ select: function(event, ui) { menu_log(); } @@ -15,15 +15,15 @@ test("handle click on menu", function() { menu_log("click",true); menu_click($('#menu1'),"1"); menu_log("afterclick"); - menu_click( ac,"2"); + menu_click( menu,"2"); menu_click($('#menu1'),"3"); - menu_click( ac,"1"); + menu_click( menu,"1"); equals( $("#log").html(), "1,3,2,afterclick,1,click,", "Click order not valid."); }); test("handle click on custom item menu", function() { expect(1); - var ac = $('#menu5').menu({ + var menu = $('#menu5').menu({ select: function(event, ui) { menu_log(); }, @@ -32,9 +32,9 @@ test("handle click on custom item menu", function() { menu_log("click",true); menu_click($('#menu5'),"1"); menu_log("afterclick"); - menu_click( ac,"2"); + menu_click( menu,"2"); menu_click($('#menu5'),"3"); - menu_click( ac,"1"); + menu_click( menu,"1"); equals( $("#log").html(), "1,3,2,afterclick,1,click,", "Click order not valid."); }); diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js index 0ecaf7328..3bcab3361 100644 --- a/tests/unit/menu/menu_methods.js +++ b/tests/unit/menu/menu_methods.js @@ -5,6 +5,36 @@ module("menu: methods"); +test( "enable/disable", function() { + expect( 3 ); + var menu = $( "#menu1" ).menu({ + select: function(event, ui) { + menu_log(); + } + }); + menu.menu("disable"); + ok(menu.is(".ui-state-disabled"),"Missing ui-state-disabled class"); + menu_log("click",true); + menu_click(menu,"1"); + menu_log("afterclick"); + menu.menu("enable"); + ok(menu.not(".ui-state-disabled"),"Has ui-state-disabled class"); + menu_log("click"); + menu_click(menu,"1"); + menu_log("afterclick"); + equals( $("#log").html(), "afterclick,1,click,afterclick,click,", "Click order not valid."); +}); + +test( "refresh", function() { + expect( 3 ); + var menu = $( "#menu1" ).menu(); + equals(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); + menu.append("
  • test item
  • ").menu("refresh"); + equals(menu.find(".ui-menu-item").length,6,"Incorrect number of menu items"); + menu.find(".ui-menu-item:last").remove().end().menu("refresh"); + equals(menu.find(".ui-menu-item").length,5,"Incorrect number of menu items"); +}); + test("destroy", function() { domEqual("#menu1", function() { $("#menu1").menu().menu("destroy"); diff --git a/tests/unit/menu/menu_options.js b/tests/unit/menu/menu_options.js index 03822fd74..479aab0d1 100644 --- a/tests/unit/menu/menu_options.js +++ b/tests/unit/menu/menu_options.js @@ -5,6 +5,34 @@ module("menu: options"); +test( "{ disabled: true }", function() { + expect( 2 ); + var menu = $( "#menu1" ).menu({ + disabled: true, + select: function(event, ui) { + menu_log(); + } + }); + ok(menu.is(".ui-state-disabled"),"Missing ui-state-disabled class"); + menu_log("click",true); + menu_click(menu,"1"); + menu_log("afterclick"); + equals( $("#log").html(), "afterclick,click,", "Click order not valid."); +}); +test( "{ disabled: false }", function() { + expect( 2 ); + var menu = $( "#menu1" ).menu({ + disabled: false, + select: function(event, ui) { + menu_log(); + } + }); + ok(menu.not(".ui-state-disabled"),"Has ui-state-disabled class"); + menu_log("click",true); + menu_click(menu,"1"); + menu_log("afterclick"); + equals( $("#log").html(), "afterclick,1,click,", "Click order not valid."); +}); })(jQuery); -- cgit v1.2.3 From ba4335712226ecfd66d34ddc93def2433af82f8c Mon Sep 17 00:00:00 2001 From: Scott González Date: Sat, 28 Jan 2012 07:44:58 -0500 Subject: Demos: Specify the dataType when loading the demo and docs files. Fixes #8069 - UI demos fail from local file:// in Firefox 9 - bad tags, bad calls in demo sources. --- demos/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/index.html b/demos/index.html index 76ddcd3da..cba4641a3 100644 --- a/demos/index.html +++ b/demos/index.html @@ -225,9 +225,9 @@ return false; }); }); - }); + }, "html" ); } - }); + }, "html" ); } function updateDemoNotes() { -- cgit v1.2.3 From 6074b0698a01ec52c30eae91dbeb883e8f5432e1 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 08:54:21 -0500 Subject: Accordion: Use ui-accordion-header-active class. --- themes/base/jquery.ui.accordion.css | 6 +++--- ui/jquery.ui.accordion.js | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css index dfc98c226..c69118384 100644 --- a/themes/base/jquery.ui.accordion.css +++ b/themes/base/jquery.ui.accordion.css @@ -9,10 +9,10 @@ */ /* IE/Win - Fix animation bug - #4615 */ .ui-accordion { width: 100%; } -.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0; } .ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion-icons .ui-accordion-heading { padding-left: 2.2em; } .ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } -.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 127099d59..48d61448d 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -13,7 +13,6 @@ */ (function( $, undefined ) { -// TODO: use ui-accordion-header-active class and fix styling $.widget( "ui.accordion", { version: "@VERSION", options: { @@ -58,7 +57,7 @@ $.widget( "ui.accordion", { options.active += this.headers.length; } self.active = self._findActive( options.active ) - .addClass( "ui-state-default ui-state-active" ) + .addClass( "ui-accordion-header-active ui-state-active" ) .toggleClass( "ui-corner-all" ) .toggleClass( "ui-corner-top" ); self.active.next().addClass( "ui-accordion-content-active" ); @@ -131,7 +130,7 @@ $.widget( "ui.accordion", { // clean up headers this.headers .unbind( ".accordion" ) - .removeClass( "ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeClass( "ui-accordion-header ui-accordion-header-active ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) .removeAttr( "role" ) .removeAttr( "aria-expanded" ) .removeAttr( "aria-selected" ) @@ -335,15 +334,15 @@ $.widget( "ui.accordion", { // switch classes active - .removeClass( "ui-state-active ui-corner-top" ) - .addClass( "ui-state-default ui-corner-all" ) + .removeClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .addClass( "ui-corner-all" ) .children( ".ui-accordion-header-icon" ) .removeClass( options.icons.activeHeader ) .addClass( options.icons.header ); if ( !clickedIsActive ) { clicked - .removeClass( "ui-state-default ui-corner-all" ) - .addClass( "ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) .children( ".ui-accordion-header-icon" ) .removeClass( options.icons.header ) .addClass( options.icons.activeHeader ); -- cgit v1.2.3 From ecddf469d7924d88d72e57a4806996fc50fa50ae Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 10:42:01 -0500 Subject: Accordion: Reset overflowX and overflowY after animations to fix overflow in Opera <11.6. Fixes #6971 - Accordion animation bug in Opera 11.01 with jQuery 1.4.3+. --- ui/jquery.ui.accordion.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 48d61448d..a019ca127 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -438,7 +438,11 @@ $.extend( $.ui.accordion, { } var showOverflow = options.toShow.css( "overflow" ), + showOverflowX = options.toHide.css( "overflowX" ), + showOverflowY = options.toHide.css( "overflowY" ), hideOverflow = options.toHide.css( "overflow" ), + hideOverflowX = options.toHide.css( "overflowX" ), + hideOverflowY = options.toHide.css( "overflowY" ), percentDone = 0, showProps = {}, hideProps = {}, @@ -521,9 +525,15 @@ $.extend( $.ui.accordion, { complete: function() { options.toShow.css({ width: originalWidth, - overflow: showOverflow + overflow: showOverflow, + overflowX: showOverflowX, + overflowY: showOverflowY + }); + options.toHide.css({ + overflow: hideOverflow, + overflowX: hideOverflowX, + overflowY: hideOverflowY }); - options.toHide.css( "overflow", hideOverflow ); options.complete(); } }); -- cgit v1.2.3 From 3919256abd7b91dcc8437c245f98d623103f97e0 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 11:46:31 -0500 Subject: Accordion: Pass header and content in create event. Fixes #7869 - Accordion: Provide header and content details in create event. --- tests/unit/accordion/accordion_events.js | 39 ++++++++++++++++++++++++++++++++ ui/jquery.ui.accordion.js | 7 ++++++ 2 files changed, 46 insertions(+) diff --git a/tests/unit/accordion/accordion_events.js b/tests/unit/accordion/accordion_events.js index 12acf2a44..b5c3ea228 100644 --- a/tests/unit/accordion/accordion_events.js +++ b/tests/unit/accordion/accordion_events.js @@ -2,6 +2,45 @@ module( "accordion: events", accordion_setupTeardown() ); +test( "create", function() { + expect( 10 ); + + var element = $( "#list1" ), + headers = element.children( "h3" ), + contents = headers.next(); + + element.accordion({ + create: function( event, ui ) { + equals( ui.header.size(), 1, "header size" ); + strictEqual( ui.header[ 0 ], headers[ 0 ], "header" ); + equals( ui.content.size(), 1, "content size" ); + strictEqual( ui.content[ 0 ], contents[ 0 ], "content" ); + } + }); + element.accordion( "destroy" ); + + element.accordion({ + active: 2, + create: function( event, ui ) { + equals( ui.header.size(), 1, "header size" ); + strictEqual( ui.header[ 0 ], headers[ 2 ], "header" ); + equals( ui.content.size(), 1, "content size" ); + strictEqual( ui.content[ 0 ], contents[ 2 ], "content" ); + } + }); + element.accordion( "destroy" ); + + element.accordion({ + active: false, + collapsible: true, + create: function( event, ui ) { + equals( ui.header.size(), 0, "header size" ); + equals( ui.content.size(), 0, "content size" ); + } + }); + element.accordion( "destroy" ); +}); + test( "beforeActivate", function() { expect( 38 ); var element = $( "#list1" ).accordion({ diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index a019ca127..97549cb10 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -103,6 +103,13 @@ $.widget( "ui.accordion", { this._setupEvents( options.event ); }, + _getCreateEventData: function() { + return { + header: this.active, + content: !this.active.length ? $() : this.active.next() + }; + }, + _createIcons: function() { var icons = this.options.icons; if ( icons ) { -- cgit v1.2.3 From 5a55d68eca60b52cbd1ae1ab48a6c9b1f8817ef1 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 12:48:00 -0500 Subject: Accordion: Moved the ui-accordion-icons class to the headers to properly style nested accordions with varying settings of icons and no icons. Fixes #7880 - Nested accordion. --- themes/base/jquery.ui.accordion.css | 4 +++- ui/jquery.ui.accordion.js | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css index c69118384..0a07f0309 100644 --- a/themes/base/jquery.ui.accordion.css +++ b/themes/base/jquery.ui.accordion.css @@ -12,7 +12,9 @@ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; } .ui-accordion .ui-accordion-header-active { border-bottom: 0; } .ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } -.ui-accordion-icons .ui-accordion-heading { padding-left: 2.2em; } +.ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; } +.ui-accordion-noicons a.ui-accordion-heading { padding-left: .7em; } +.ui-accordion-icons .ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; } .ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 97549cb10..6c486c7b1 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -119,13 +119,15 @@ $.widget( "ui.accordion", { this.active.children( ".ui-accordion-header-icon" ) .removeClass( icons.header ) .addClass( icons.activeHeader ); - this.element.addClass( "ui-accordion-icons" ); + this.headers.addClass( "ui-accordion-icons" ); } }, _destroyIcons: function() { - this.headers.children( ".ui-accordion-header-icon" ).remove(); - this.element.removeClass( "ui-accordion-icons" ); + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); }, _destroy: function() { -- cgit v1.2.3 From 8f521f9d9e354a160df116df02b6c1e29d9fa458 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 13:09:28 -0500 Subject: Accordion: Fixed styling for nested accordions. --- themes/base/jquery.ui.accordion.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css index 0a07f0309..5255bdd26 100644 --- a/themes/base/jquery.ui.accordion.css +++ b/themes/base/jquery.ui.accordion.css @@ -10,7 +10,8 @@ /* IE/Win - Fix animation bug - #4615 */ .ui-accordion { width: 100%; } .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; } -.ui-accordion .ui-accordion-header-active { border-bottom: 0; } +.ui-accordion .ui-accordion-header-active, +.ui-accordion .ui-accordion .ui-accordion-header-active { border-bottom: 0; } .ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; } .ui-accordion-noicons a.ui-accordion-heading { padding-left: .7em; } -- cgit v1.2.3 From 853b515e5c6f02dff1a4693eaf6c16d8bafc1395 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 13:11:20 -0500 Subject: Accordion: Adjusted tests for icons: false. --- tests/unit/accordion/accordion_options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/accordion/accordion_options.js b/tests/unit/accordion/accordion_options.js index a60bb27e1..8206b1d62 100644 --- a/tests/unit/accordion/accordion_options.js +++ b/tests/unit/accordion/accordion_options.js @@ -255,7 +255,7 @@ test( "{ icons: false }", function() { var element = $( "#list1" ); function icons( on ) { deepEqual( element.find( "span.ui-icon").length, on ? 3 : 0 ); - deepEqual( element.hasClass( "ui-accordion-icons" ), on ); + deepEqual( element.find( ".ui-accordion-header.ui-accordion-icons" ).length, on ? 3 : 0 ); } element.accordion(); icons( true ); -- cgit v1.2.3 From 66c7dfd377d91bd5867ce1a9b607e8ed25955241 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 14:07:17 -0500 Subject: Accordion demo: Clear out originalEvent in hoverintent special event. Fixes #6028 - Accordion: Hoverintent demo throws an error in IE. --- demos/accordion/hoverintent.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/demos/accordion/hoverintent.html b/demos/accordion/hoverintent.html index 09360d62d..184951cf2 100644 --- a/demos/accordion/hoverintent.html +++ b/demos/accordion/hoverintent.html @@ -50,6 +50,10 @@ if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) { clear(); event.type = "hoverintent"; + // prevent accessing the original event since the new event + // is fired asynchronously and the old event is no longer + // usable (#6028) + event.originalEvent = {}; jQuery.event.handle.apply( self, args ); } else { pX = cX; -- cgit v1.2.3 From 62a70da959e71a2d5c8ecc27548ea38733ec3128 Mon Sep 17 00:00:00 2001 From: Scott González Date: Tue, 31 Jan 2012 14:21:18 -0500 Subject: Autocomplete: Added test for close method. --- tests/unit/autocomplete/autocomplete_core.js | 4 ---- tests/unit/autocomplete/autocomplete_methods.js | 11 +++++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/unit/autocomplete/autocomplete_core.js b/tests/unit/autocomplete/autocomplete_core.js index d98f56abf..bc61b9100 100644 --- a/tests/unit/autocomplete/autocomplete_core.js +++ b/tests/unit/autocomplete/autocomplete_core.js @@ -162,8 +162,4 @@ test( "allow form submit on enter when menu is not active", function() { } })(); -(function() { - -})(); - }( jQuery ) ); diff --git a/tests/unit/autocomplete/autocomplete_methods.js b/tests/unit/autocomplete/autocomplete_methods.js index 3fe035d28..1600d73dc 100644 --- a/tests/unit/autocomplete/autocomplete_methods.js +++ b/tests/unit/autocomplete/autocomplete_methods.js @@ -9,15 +9,19 @@ test( "destroy", function() { }); }); -test( "search", function() { - expect( 3 ); +test( "search, close", function() { + expect( 6 ); var data = [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby", "python", "c", "scala", "groovy", "haskell", "perl" ], element = $( "#autocomplete" ).autocomplete({ source: data, minLength: 0 }), menu = element.autocomplete( "widget" ); + + ok( menu.is( ":hidden" ), "menu is hidden on init" ); + element.autocomplete( "search" ); + ok( menu.is( ":visible" ), "menu is visible after search" ); equal( menu.find( ".ui-menu-item" ).length, data.length, "all items for a blank search" ); element.val( "has" ).autocomplete( "search" ); @@ -25,6 +29,9 @@ test( "search", function() { element.autocomplete( "search", "ja" ); equal( menu.find( ".ui-menu-item" ).length, 2, "only java and javascript for 'ja'" ); + + element.autocomplete( "close" ); + ok( menu.is( ":hidden" ), "menu is hidden after close" ); }); }( jQuery ) ); -- cgit v1.2.3 From e496cde384d1497993394f04110ef8099d256eee Mon Sep 17 00:00:00 2001 From: levushka Date: Wed, 1 Feb 2012 14:47:56 -0500 Subject: Datepicker i18n: Changed Hebrew monthNamesShort from number to names. Fixes #6051 - Hebrew and Arabic: Instead of the month name indicates the month number! --- ui/i18n/jquery.ui.datepicker-he.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/i18n/jquery.ui.datepicker-he.js b/ui/i18n/jquery.ui.datepicker-he.js index 58ea8c6d8..b9e8deec5 100644 --- a/ui/i18n/jquery.ui.datepicker-he.js +++ b/ui/i18n/jquery.ui.datepicker-he.js @@ -8,8 +8,8 @@ jQuery(function($){ currentText: 'היום', monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני', 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'], - monthNamesShort: ['1','2','3','4','5','6', - '7','8','9','10','11','12'], + monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני', + 'יולי','אוג','ספט','אוק','נוב','דצמ'], dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'], dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'], -- cgit v1.2.3 From 8cd4a8330ca79f222e193de585e2746b4ad3500d Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 1 Feb 2012 16:59:26 -0500 Subject: Widget: Allow redefining a widget after other widgets have inherited from it. --- tests/unit/tabs/tabs_deprecated.js | 10 +- tests/unit/widget/widget_core.js | 45 ++++++- ui/jquery.ui.tabs.js | 256 +++++++++++++++++-------------------- ui/jquery.ui.widget.js | 74 +++++++---- 4 files changed, 217 insertions(+), 168 deletions(-) diff --git a/tests/unit/tabs/tabs_deprecated.js b/tests/unit/tabs/tabs_deprecated.js index 1323c774a..d0d13fa84 100644 --- a/tests/unit/tabs/tabs_deprecated.js +++ b/tests/unit/tabs/tabs_deprecated.js @@ -281,7 +281,7 @@ test( "enable", function() { var element = $( "#tabs1" ).tabs({ disabled: [ 0, 1 ], - enable: function ( event, ui ) { + enable: function( event, ui ) { equals( ui.tab, element.find( ".ui-tabs-nav a" )[ 1 ], "ui.tab" ); equals( ui.panel, element.find( ".ui-tabs-panel" )[ 1 ], "ui.panel" ); equals( ui.index, 1, "ui.index" ); @@ -296,10 +296,10 @@ test( "disable", function() { expect( 3 ); var element = $( "#tabs1" ).tabs({ - disable: function ( event, ui ) { - equals( ui.tab, element.find( ".ui-tabs-nav a" )[ 1 ], "ui.tab" ); - equals( ui.panel, element.find( ".ui-tabs-panel" )[ 1 ], "ui.panel" ); - equals( ui.index, 1, "ui.index" ); + disable: function( event, ui ) { + equals( ui.tab, element.find( ".ui-tabs-nav a" )[ 1 ], "ui.tab" ); + equals( ui.panel, element.find( ".ui-tabs-panel" )[ 1 ], "ui.panel" ); + equals( ui.index, 1, "ui.index" ); } }); element.tabs( "disable", 1 ); diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js index df83abe91..86fa658aa 100644 --- a/tests/unit/widget/widget_core.js +++ b/tests/unit/widget/widget_core.js @@ -1050,11 +1050,54 @@ test( "redefine", function() { } }); - var instance = new $.ui.testWidget(); + var instance = new $.ui.testWidget({}); instance.method( "foo" ); equal( $.ui.testWidget.foo, "bar", "static properties remain" ); }); +test( "redefine deep prototype chain", function() { + expect( 8 ); + $.widget( "ui.testWidget", { + method: function( str ) { + strictEqual( this, instance, "original invoked with correct this" ); + equal( str, "level 4", "original invoked with correct parameter" ); + } + }); + $.widget( "ui.testWidget2", $.ui.testWidget, { + method: function( str ) { + strictEqual( this, instance, "testWidget2 invoked with correct this" ); + equal( str, "level 2", "testWidget2 invoked with correct parameter" ); + this._super( "level 3" ); + } + }); + $.widget( "ui.testWidget3", $.ui.testWidget2, { + method: function( str ) { + strictEqual( this, instance, "testWidget3 invoked with correct this" ); + equal( str, "level 1", "testWidget3 invoked with correct parameter" ); + this._super( "level 2" ); + } + }); + // redefine testWidget after other widgets have inherited from it + // this tests whether the inheriting widgets get updated prototype chains + $.widget( "ui.testWidget", $.ui.testWidget, { + method: function( str ) { + strictEqual( this, instance, "new invoked with correct this" ); + equal( str, "level 3", "new invoked with correct parameter" ); + this._super( "level 4" ); + } + }); + // redefine testWidget3 after it has been automatically redefined + // this tests whether we properly handle _super() when the topmost prototype + // doesn't have the method defined + $.widget( "ui.testWidget3", $.ui.testWidget3, {} ); + + var instance = new $.ui.testWidget3({}); + instance.method( "level 1" ); + + delete $.ui.testWidget3; + delete $.ui.testWidget2; +}); + asyncTest( "_delay", function() { expect( 6 ); var order = 0, diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js index 7a701405c..dc52591b9 100644 --- a/ui/jquery.ui.tabs.js +++ b/ui/jquery.ui.tabs.js @@ -596,86 +596,79 @@ if ( $.uiBackCompat !== false ) { }; // url method - (function( $, prototype ) { - prototype.url = function( index, url ) { + $.widget( "ui.tabs", $.ui.tabs, { + url: function( index, url ) { this.anchors.eq( index ).attr( "href", url ); - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // ajaxOptions and cache options - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { ajaxOptions: null, cache: false - }); - - var _create = prototype._create, - _setOption = prototype._setOption, - _destroy = prototype._destroy, - oldurl = prototype.url || $.noop; - - $.extend( prototype, { - _create: function() { - _create.call( this ); + }, - var self = this; + _create: function() { + this._super(); - this.element.bind( "tabsbeforeload.tabs", function( event, ui ) { - // tab is already cached - if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { - event.preventDefault(); - return; - } + var self = this; - $.extend( ui.ajaxSettings, self.options.ajaxOptions, { - error: function( xhr, s, e ) { - try { - // Passing index avoid a race condition when this method is - // called after the user has selected another tab. - // Pass the anchor that initiated this request allows - // loadError to manipulate the tab content panel via $(a.hash) - self.options.ajaxOptions.error( xhr, s, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); - } - catch ( e ) {} - } - }); + this.element.bind( "tabsbeforeload.tabs", function( event, ui ) { + // tab is already cached + if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) { + event.preventDefault(); + return; + } - ui.jqXHR.success(function() { - if ( self.options.cache ) { - $.data( ui.tab[ 0 ], "cache.tabs", true ); + $.extend( ui.ajaxSettings, self.options.ajaxOptions, { + error: function( xhr, s, e ) { + try { + // Passing index avoid a race condition when this method is + // called after the user has selected another tab. + // Pass the anchor that initiated this request allows + // loadError to manipulate the tab content panel via $(a.hash) + self.options.ajaxOptions.error( xhr, s, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] ); } - }); + catch ( e ) {} + } }); - }, - _setOption: function( key, value ) { - // reset cache if switching from cached to not cached - if ( key === "cache" && value === false ) { - this.anchors.removeData( "cache.tabs" ); - } - _setOption.apply( this, arguments ); - }, + ui.jqXHR.success(function() { + if ( self.options.cache ) { + $.data( ui.tab[ 0 ], "cache.tabs", true ); + } + }); + }); + }, - _destroy: function() { + _setOption: function( key, value ) { + // reset cache if switching from cached to not cached + if ( key === "cache" && value === false ) { this.anchors.removeData( "cache.tabs" ); - _destroy.call( this ); - }, - - url: function( index, url ){ - this.anchors.eq( index ).removeData( "cache.tabs" ); - oldurl.apply( this, arguments ); } - }); - }( jQuery, jQuery.ui.tabs.prototype ) ); + this._super( key, value ); + }, + + _destroy: function() { + this.anchors.removeData( "cache.tabs" ); + this._super(); + }, + + url: function( index, url ){ + this.anchors.eq( index ).removeData( "cache.tabs" ); + this._superApply( arguments ); + } + }); // abort method - (function( $, prototype ) { - prototype.abort = function() { + $.widget( "ui.tabs", $.ui.tabs, { + abort: function() { if ( this.xhr ) { this.xhr.abort(); } - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // spinner $.widget( "ui.tabs", $.ui.tabs, { @@ -702,16 +695,13 @@ if ( $.uiBackCompat !== false ) { }); // enable/disable events - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { enable: null, disable: null - }); - - var enable = prototype.enable, - disable = prototype.disable; + }, - prototype.enable = function( index ) { + enable: function( index ) { var options = this.options, trigger; @@ -720,14 +710,14 @@ if ( $.uiBackCompat !== false ) { trigger = true; } - enable.apply( this, arguments ); + this._superApply( arguments ); if ( trigger ) { this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); } - }; + }, - prototype.disable = function( index ) { + disable: function( index ) { var options = this.options, trigger; @@ -736,23 +726,23 @@ if ( $.uiBackCompat !== false ) { trigger = true; } - disable.apply( this, arguments ); + this._superApply( arguments ); if ( trigger ) { this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); } - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // add/remove methods and events - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { add: null, remove: null, tabTemplate: "
  • #{label}
  • " - }); + }, - prototype.add = function( url, label, index ) { + add: function( url, label, index ) { if ( index === undefined ) { index = this.anchors.length; } @@ -803,9 +793,9 @@ if ( $.uiBackCompat !== false ) { this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); return this; - }; + }, - prototype.remove = function( index ) { + remove: function( index ) { index = this._getIndex( index ); var options = this.options, tab = this.lis.eq( index ).remove(), @@ -832,125 +822,117 @@ if ( $.uiBackCompat !== false ) { this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) ); return this; - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // length method - (function( $, prototype ) { - prototype.length = function() { + $.widget( "ui.tabs", $.ui.tabs, { + length: function() { return this.anchors.length; - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // panel ids (idPrefix option + title attribute) - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { idPrefix: "ui-tabs-" - }); + }, - var _tabId = prototype._tabId; - prototype._tabId = function( a ) { + _tabId: function( a ) { return $( a ).attr( "aria-controls" ) || a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) || this.options.idPrefix + getNextTabId(); - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // _createPanel method - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { panelTemplate: "
    " - }); + }, - var _createPanel = prototype._createPanel; - prototype._createPanel = function( id ) { + _createPanel: function( id ) { return $( this.options.panelTemplate ) - .attr( "id", id ) - .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) - .data( "destroy.tabs", true ); - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "destroy.tabs", true ); + } + }); // selected option - (function( $, prototype ) { - var _create = prototype._create, - _setOption = prototype._setOption, - _eventHandler = prototype._eventHandler; - - prototype._create = function() { + $.widget( "ui.tabs", $.ui.tabs, { + _create: function() { var options = this.options; if ( options.active === null && options.selected !== undefined ) { options.active = options.selected === -1 ? false : options.selected; } - _create.call( this ); + this._super(); options.selected = options.active; if ( options.selected === false ) { options.selected = -1; } - }; + }, - prototype._setOption = function( key, value ) { + _setOption: function( key, value ) { if ( key !== "selected" ) { - return _setOption.apply( this, arguments ); + return this._super( key, value ); } var options = this.options; - _setOption.call( this, "active", value === -1 ? false : value ); + this._super( "active", value === -1 ? false : value ); options.selected = options.active; if ( options.selected === false ) { options.selected = -1; } - }; + }, - prototype._eventHandler = function( event ) { - _eventHandler.apply( this, arguments ); + _eventHandler: function( event ) { + this._superApply( arguments ); this.options.selected = this.options.active; if ( this.options.selected === false ) { this.options.selected = -1; } - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // show and select event - (function( $, prototype ) { - $.extend( prototype.options, { + $.widget( "ui.tabs", $.ui.tabs, { + options: { show: null, select: null - }); - var _create = prototype._create, - _trigger = prototype._trigger; - - prototype._create = function() { - _create.call( this ); + }, + _create: function() { + this._super(); if ( this.options.active !== false ) { this._trigger( "show", null, this._ui( this.active[ 0 ], this._getPanelForTab( this.active )[ 0 ] ) ); } - }; - prototype._trigger = function( type, event, data ) { - var ret = _trigger.apply( this, arguments ); + }, + _trigger: function( type, event, data ) { + var ret = this._superApply( arguments ); if ( !ret ) { return false; } if ( type === "beforeActivate" && data.newTab.length ) { - ret = _trigger.call( this, "select", event, { + ret = this._super( "select", event, { tab: data.newTab[ 0], panel: data.newPanel[ 0 ], index: data.newTab.closest( "li" ).index() }); } else if ( type === "activate" && data.newTab.length ) { - ret = _trigger.call( this, "show", event, { + ret = this._super( "show", event, { tab: data.newTab[ 0 ], panel: data.newPanel[ 0 ], index: data.newTab.closest( "li" ).index() }); } - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + return ret; + } + }); // select method - (function( $, prototype ) { - prototype.select = function( index ) { + $.widget( "ui.tabs", $.ui.tabs, { + select: function( index ) { index = this._getIndex( index ); if ( index === -1 ) { if ( this.options.collapsible && this.options.selected !== -1 ) { @@ -960,8 +942,8 @@ if ( $.uiBackCompat !== false ) { } } this.anchors.eq( index ).trigger( this.options.event + ".tabs" ); - }; - }( jQuery, jQuery.ui.tabs.prototype ) ); + } + }); // cookie option var listId = 0; diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js index ad03e6f44..bf26373e1 100644 --- a/ui/jquery.ui.widget.js +++ b/ui/jquery.ui.widget.js @@ -23,8 +23,9 @@ $.cleanData = function( elems ) { }; $.widget = function( name, base, prototype ) { - var namespace = name.split( "." )[ 0 ], - fullName; + var fullName, existingConstructor, constructor, basePrototype, + namespace = name.split( "." )[ 0 ]; + name = name.split( "." )[ 1 ]; fullName = namespace + "-" + name; @@ -39,12 +40,11 @@ $.widget = function( name, base, prototype ) { }; $[ namespace ] = $[ namespace ] || {}; - // create the constructor using $.extend() so we can carry over any - // static properties stored on the existing constructor (if there is one) - $[ namespace ][ name ] = $.extend( function( options, element ) { + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { // allow instantiation without "new" keyword if ( !this._createWidget ) { - return new $[ namespace ][ name ]( options, element ); + return new constructor( options, element ); } // allow instantiation without initializing for simple inheritance @@ -52,9 +52,19 @@ $.widget = function( name, base, prototype ) { if ( arguments.length ) { this._createWidget( options, element ); } - }, $[ namespace ][ name ], { version: prototype.version } ); + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); - var basePrototype = new base(); + basePrototype = new base(); // we need to make the options hash a property directly on the new instance // otherwise we'll modify the options hash on the prototype that we're // inheriting from @@ -83,17 +93,41 @@ $.widget = function( name, base, prototype ) { return returnValue; }; - }()); + })(); } }); - $[ namespace ][ name ].prototype = $.widget.extend( basePrototype, { + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: name + }, prototype, { + constructor: constructor, namespace: namespace, widgetName: name, - widgetEventPrefix: name, widgetBaseClass: fullName - }, prototype ); + }); - $.widget.bridge( name, $[ namespace ][ name ] ); + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); }; $.widget.extend = function( target ) { @@ -157,18 +191,8 @@ $.widget.bridge = function( name, object ) { }; }; -$.Widget = function( options, element ) { - // allow instantiation without "new" keyword - if ( !this._createWidget ) { - return new $[ namespace ][ name ]( options, element ); - } - - // allow instantiation without initializing for simple inheritance - // must use "new" keyword (the code above always passes args) - if ( arguments.length ) { - this._createWidget( options, element ); - } -}; +$.Widget = function( options, element ) {}; +$.Widget._childConstructors = []; $.Widget.prototype = { widgetName: "widget", -- cgit v1.2.3 From e0019ecd3ddb3ed94af038a9c61fcfe620c95a75 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 1 Feb 2012 19:54:57 -0500 Subject: Static tests: Removed slider tests. --- tests/static/slider/default.html | 17 ----------------- tests/static/slider/default_vertical.html | 17 ----------------- tests/static/slider/slider_horizontal.html | 17 ----------------- tests/static/slider/slider_horizontal_range.html | 17 ----------------- tests/static/slider/slider_horizontal_range_max.html | 17 ----------------- tests/static/slider/slider_horizontal_range_min.html | 17 ----------------- tests/static/slider/slider_vertical.html | 17 ----------------- tests/static/slider/slider_vertical_range.html | 17 ----------------- tests/static/slider/slider_vertical_range_max.html | 17 ----------------- tests/static/slider/slider_vertical_range_min.html | 17 ----------------- 10 files changed, 170 deletions(-) delete mode 100644 tests/static/slider/default.html delete mode 100644 tests/static/slider/default_vertical.html delete mode 100644 tests/static/slider/slider_horizontal.html delete mode 100644 tests/static/slider/slider_horizontal_range.html delete mode 100644 tests/static/slider/slider_horizontal_range_max.html delete mode 100644 tests/static/slider/slider_horizontal_range_min.html delete mode 100644 tests/static/slider/slider_vertical.html delete mode 100644 tests/static/slider/slider_vertical_range.html delete mode 100644 tests/static/slider/slider_vertical_range_max.html delete mode 100644 tests/static/slider/slider_vertical_range_min.html diff --git a/tests/static/slider/default.html b/tests/static/slider/default.html deleted file mode 100644 index aec1f7800..000000000 --- a/tests/static/slider/default.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Default - - - - - - - - -
    - - - diff --git a/tests/static/slider/default_vertical.html b/tests/static/slider/default_vertical.html deleted file mode 100644 index 6ddf1de2b..000000000 --- a/tests/static/slider/default_vertical.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Default vertical - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_horizontal.html b/tests/static/slider/slider_horizontal.html deleted file mode 100644 index e28d9d774..000000000 --- a/tests/static/slider/slider_horizontal.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider horizontal - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_horizontal_range.html b/tests/static/slider/slider_horizontal_range.html deleted file mode 100644 index 227ce44bb..000000000 --- a/tests/static/slider/slider_horizontal_range.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider horizontal range - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_horizontal_range_max.html b/tests/static/slider/slider_horizontal_range_max.html deleted file mode 100644 index 11b2a9673..000000000 --- a/tests/static/slider/slider_horizontal_range_max.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider horizontal range max - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_horizontal_range_min.html b/tests/static/slider/slider_horizontal_range_min.html deleted file mode 100644 index 9ed15f538..000000000 --- a/tests/static/slider/slider_horizontal_range_min.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider horizontal range min - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_vertical.html b/tests/static/slider/slider_vertical.html deleted file mode 100644 index 63ef3d1db..000000000 --- a/tests/static/slider/slider_vertical.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider vertical - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_vertical_range.html b/tests/static/slider/slider_vertical_range.html deleted file mode 100644 index 4f1ffb035..000000000 --- a/tests/static/slider/slider_vertical_range.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider vertical range - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_vertical_range_max.html b/tests/static/slider/slider_vertical_range_max.html deleted file mode 100644 index a5c9857c1..000000000 --- a/tests/static/slider/slider_vertical_range_max.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider vertical range max - - - - - - - - -
    - - - diff --git a/tests/static/slider/slider_vertical_range_min.html b/tests/static/slider/slider_vertical_range_min.html deleted file mode 100644 index b43d4511b..000000000 --- a/tests/static/slider/slider_vertical_range_min.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - Slider Static Test : Slider vertical range min - - - - - - - - -
    - - - -- cgit v1.2.3 From 519985f6129cdc81bb2713e8c818ad062479d822 Mon Sep 17 00:00:00 2001 From: Scott González Date: Wed, 1 Feb 2012 20:35:31 -0500 Subject: Visual tests: Cleaned up dialog tests. --- .../dialog/dialog_on_page_with_large_dom.html | 2992 +------------------- 1 file changed, 50 insertions(+), 2942 deletions(-) diff --git a/tests/visual/dialog/dialog_on_page_with_large_dom.html b/tests/visual/dialog/dialog_on_page_with_large_dom.html index c7c105696..bc87aec09 100644 --- a/tests/visual/dialog/dialog_on_page_with_large_dom.html +++ b/tests/visual/dialog/dialog_on_page_with_large_dom.html @@ -1,26 +1,36 @@ - + - - Dialog Visual Test : Modal Dialog in Large DOM - - - - - - - - - - - + + + + + + + + + @@ -33,2931 +43,29 @@ -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    - -
    - - - - - - -
    +
      + + -- cgit v1.2.3 From 4259978d39c6c9d8ce292ad0839d0d42c45400f0 Mon Sep 17 00:00:00 2001 From: Scott González Date: Thu, 2 Feb 2012 11:38:51 -0500 Subject: Sortable: Fixed destroy to remove instance from element. Fixes #8094 - .sortable() after destroy does not work. --- ui/jquery.ui.sortable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/jquery.ui.sortable.js b/ui/jquery.ui.sortable.js index 600569451..d5796a3f0 100644 --- a/ui/jquery.ui.sortable.js +++ b/ui/jquery.ui.sortable.js @@ -65,7 +65,7 @@ $.widget("ui.sortable", $.ui.mouse, { }, - destroy: function() { + _destroy: function() { this.element .removeClass("ui-sortable ui-sortable-disabled"); this._mouseDestroy(); -- cgit v1.2.3 From 48ad0994a0e517ac22c4fccab0958b6668640d78 Mon Sep 17 00:00:00 2001 From: kborchers Date: Fri, 3 Feb 2012 16:12:37 -0600 Subject: Menu: Prevent clicking on disabled menu items and remove unnecessary extra padding from disabled items. --- tests/visual/menu/menu.html | 10 +++++----- themes/base/jquery.ui.menu.css | 2 +- ui/jquery.ui.menu.js | 18 +++++++++++------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/visual/menu/menu.html b/tests/visual/menu/menu.html index 0715ac7f7..7fffdf2a7 100644 --- a/tests/visual/menu/menu.html +++ b/tests/visual/menu/menu.html @@ -76,12 +76,12 @@