Skip to content

Commit bebeaba

Browse files
committed
Accordion: Removed deprecated icon option. Fixes #6835 - Accordion: Remove icons.headerSelected.
1 parent b674c28 commit bebeaba

File tree

3 files changed

+2
-36
lines changed

3 files changed

+2
-36
lines changed

tests/unit/accordion/accordion_common_deprecated.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ TestHelpers.commonWidgetTests( "accordion", {
99
header: "> li > :first-child,> :not(li):even",
1010
heightStyle: "auto",
1111
icons: {
12-
"activeHeader": null,
13-
"header": "ui-icon-triangle-1-e",
14-
"headerSelected": "ui-icon-triangle-1-s"
12+
"activeHeader": "ui-icon-triangle-1-s",
13+
"header": "ui-icon-triangle-1-e"
1514
},
1615

1716
// callbacks

tests/unit/accordion/accordion_deprecated.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,22 +104,6 @@ test( "{ active: jQuery Object }", function() {
104104

105105

106106

107-
module( "accordion (deprecated) - icons", setupTeardown() );
108-
109-
test( "icons, headerSelected", function() {
110-
expect( 3 );
111-
var element = $( "#list1" ).accordion({
112-
icons: { headerSelected: "a1", header: "h1" }
113-
});
114-
ok( element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a1" ) );
115-
element.accordion( "option", "icons", { headerSelected: "a2", header: "h2" } );
116-
ok( !element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a1" ) );
117-
ok( element.find( ".ui-accordion-header.ui-state-active span.ui-icon" ).hasClass( "a2" ) );
118-
});
119-
120-
121-
122-
123107

124108
module( "accordion (deprecated) - resize", setupTeardown() );
125109

ui/jquery.ui.accordion.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -544,23 +544,6 @@ $.widget( "ui.accordion", {
544544

545545
// DEPRECATED
546546
if ( $.uiBackCompat !== false ) {
547-
// icon options
548-
(function( $, prototype ) {
549-
$.extend( prototype.options.icons, {
550-
activeHeader: null, // remove default so we fall back to old values
551-
headerSelected: "ui-icon-triangle-1-s"
552-
});
553-
554-
var _createIcons = prototype._createIcons;
555-
prototype._createIcons = function() {
556-
if ( this.options.icons ) {
557-
this.options.icons.activeHeader = this.options.icons.activeHeader ||
558-
this.options.icons.headerSelected;
559-
}
560-
_createIcons.call( this );
561-
};
562-
}( jQuery, jQuery.ui.accordion.prototype ) );
563-
564547
// expanded active option, activate method
565548
(function( $, prototype ) {
566549
prototype.activate = prototype._activate;

0 commit comments

Comments
 (0)