Skip to content

Commit

Permalink
Accordion: Removed deprecated icon option. Fixes #6835 - Accordion: R…
Browse files Browse the repository at this point in the history
…emove icons.headerSelected.
  • Loading branch information
jzaefferer committed Oct 24, 2012
1 parent 09eed56 commit fd952c5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
5 changes: 2 additions & 3 deletions tests/unit/accordion/accordion_common_deprecated.js
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions tests/unit/accordion/accordion_deprecated.js
Expand Up @@ -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() );

Expand Down
17 changes: 0 additions & 17 deletions ui/jquery.ui.accordion.js
Expand Up @@ -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;
Expand Down

0 comments on commit fd952c5

Please sign in to comment.