From: Jörn Zaefferer Date: Wed, 24 Oct 2012 14:57:01 +0000 (-0400) Subject: Accordion: Removed deprecated icon option. Fixes #6835 - Accordion: Remove icons... X-Git-Tag: 1.10.0-beta.1~268 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd952c5a7956ac583a44475f481bdec9efa7857b;p=jquery-ui.git Accordion: Removed deprecated icon option. Fixes #6835 - Accordion: Remove icons.headerSelected. --- diff --git a/tests/unit/accordion/accordion_common_deprecated.js b/tests/unit/accordion/accordion_common_deprecated.js index 9adb074c4..0ce36991c 100644 --- a/tests/unit/accordion/accordion_common_deprecated.js +++ b/tests/unit/accordion/accordion_common_deprecated.js @@ -9,9 +9,8 @@ TestHelpers.commonWidgetTests( "accordion", { header: "> li > :first-child,> :not(li):even", heightStyle: "auto", icons: { - "activeHeader": null, - "header": "ui-icon-triangle-1-e", - "headerSelected": "ui-icon-triangle-1-s" + "activeHeader": "ui-icon-triangle-1-s", + "header": "ui-icon-triangle-1-e" }, // callbacks diff --git a/tests/unit/accordion/accordion_deprecated.js b/tests/unit/accordion/accordion_deprecated.js index 2fb509c44..d410e07e2 100644 --- a/tests/unit/accordion/accordion_deprecated.js +++ b/tests/unit/accordion/accordion_deprecated.js @@ -104,22 +104,6 @@ test( "{ active: jQuery Object }", function() { -module( "accordion (deprecated) - icons", setupTeardown() ); - -test( "icons, headerSelected", function() { - expect( 3 ); - var element = $( "#list1" ).accordion({ - icons: { headerSelected: "a1", header: "h1" } - }); - ok( element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a1" ) ); - element.accordion( "option", "icons", { headerSelected: "a2", header: "h2" } ); - ok( !element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a1" ) ); - ok( element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a2" ) ); -}); - - - - module( "accordion (deprecated) - resize", setupTeardown() ); diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index f9cf733d5..76076131d 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -544,23 +544,6 @@ $.widget( "ui.accordion", { // DEPRECATED if ( $.uiBackCompat !== false ) { - // icon options - (function( $, prototype ) { - $.extend( prototype.options.icons, { - activeHeader: null, // remove default so we fall back to old values - headerSelected: "ui-icon-triangle-1-s" - }); - - var _createIcons = prototype._createIcons; - prototype._createIcons = function() { - if ( this.options.icons ) { - this.options.icons.activeHeader = this.options.icons.activeHeader || - this.options.icons.headerSelected; - } - _createIcons.call( this ); - }; - }( jQuery, jQuery.ui.accordion.prototype ) ); - // expanded active option, activate method (function( $, prototype ) { prototype.activate = prototype._activate;