Skip to content

Commit b674c28

Browse files
committed
Accordion: Removed deprecated navigation options. Fixes #5870 - Accordion: Remove navigation options.
1 parent ac099fb commit b674c28

File tree

3 files changed

+0
-64
lines changed

3 files changed

+0
-64
lines changed

tests/unit/accordion/accordion_common_deprecated.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ TestHelpers.commonWidgetTests( "accordion", {
1313
"header": "ui-icon-triangle-1-e",
1414
"headerSelected": "ui-icon-triangle-1-s"
1515
},
16-
navigation: false,
17-
navigationFilter: function() {},
1816

1917
// callbacks
2018
activate: null,

tests/unit/accordion/accordion_deprecated.js

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -143,36 +143,6 @@ test( "resize", function() {
143143

144144

145145

146-
module( "accordion (deprecated) - navigation", setupTeardown() );
147-
148-
test( "{ navigation: true, navigationFilter: header }", function() {
149-
expect( 2 );
150-
var element = $( "#navigation" ).accordion({
151-
navigation: true,
152-
navigationFilter: function() {
153-
return (/\?p=1\.1\.3$/).test( this.href );
154-
}
155-
});
156-
equal( element.accordion( "option", "active" ), 2 );
157-
state( element, 0, 0, 1 );
158-
});
159-
160-
test( "{ navigation: true, navigationFilter: content }", function() {
161-
expect( 2 );
162-
var element = $( "#navigation" ).accordion({
163-
navigation: true,
164-
navigationFilter: function() {
165-
return (/\?p=1\.1\.3\.2$/).test( this.href );
166-
}
167-
});
168-
equal( element.accordion( "option", "active" ), 2 );
169-
state( element, 0, 0, 1 );
170-
});
171-
172-
173-
174-
175-
176146
module( "accordion (deprecated) - changestart/change events", setupTeardown() );
177147

178148
test( "changestart", function() {

ui/jquery.ui.accordion.js

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

545545
// DEPRECATED
546546
if ( $.uiBackCompat !== false ) {
547-
// navigation options
548-
(function( $, prototype ) {
549-
$.extend( prototype.options, {
550-
navigation: false,
551-
navigationFilter: function() {
552-
return this.href.toLowerCase() === location.href.toLowerCase();
553-
}
554-
});
555-
556-
var _create = prototype._create;
557-
prototype._create = function() {
558-
if ( this.options.navigation ) {
559-
var that = this,
560-
headers = this.element.find( this.options.header ),
561-
content = headers.next(),
562-
current = headers.add( content )
563-
.find( "a" )
564-
.filter( this.options.navigationFilter )
565-
[ 0 ];
566-
if ( current ) {
567-
headers.add( content ).each( function( index ) {
568-
if ( $.contains( this, current ) ) {
569-
that.options.active = Math.floor( index / 2 );
570-
return false;
571-
}
572-
});
573-
}
574-
}
575-
_create.call( this );
576-
};
577-
}( jQuery, jQuery.ui.accordion.prototype ) );
578-
579547
// icon options
580548
(function( $, prototype ) {
581549
$.extend( prototype.options.icons, {

0 commit comments

Comments
 (0)