]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Remove deprecated content property in create event. Fixes #8999 - Accordio...
authorScott González <scott.gonzalez@gmail.com>
Fri, 15 Mar 2013 10:45:38 +0000 (06:45 -0400)
committerScott González <scott.gonzalez@gmail.com>
Fri, 15 Mar 2013 10:45:38 +0000 (06:45 -0400)
tests/unit/accordion/accordion_events.js
ui/jquery.ui.accordion.js

index 79283d11c435122ed71e923d31a8d840c81a5e5e..5f6cfa8bcb21e35a0d1125cdc8dd1d5befbd8134 100644 (file)
@@ -6,7 +6,7 @@ var setupTeardown = TestHelpers.accordion.setupTeardown,
 module( "accordion: events", setupTeardown() );
 
 test( "create", function() {
-       expect( 15 );
+       expect( 10 );
 
        var element = $( "#list1" ),
                headers = element.children( "h3" ),
@@ -18,8 +18,6 @@ test( "create", function() {
                        strictEqual( ui.header[ 0 ], headers[ 0 ], "header" );
                        equal( ui.panel.length, 1, "panel length" );
                        strictEqual( ui.panel[ 0 ], contents[ 0 ], "panel" );
-                       equal( ui.content.length, 1, "content length" );
-                       strictEqual( ui.content[ 0 ], contents[ 0 ], "content" );
                }
        });
        element.accordion( "destroy" );
@@ -31,8 +29,6 @@ test( "create", function() {
                        strictEqual( ui.header[ 0 ], headers[ 2 ], "header" );
                        equal( ui.panel.length, 1, "panel length" );
                        strictEqual( ui.panel[ 0 ], contents[ 2 ], "panel" );
-                       equal( ui.content.length, 1, "content length" );
-                       strictEqual( ui.content[ 0 ], contents[ 2 ], "content" );
                }
        });
        element.accordion( "destroy" );
@@ -43,7 +39,6 @@ test( "create", function() {
                create: function( event, ui ) {
                        equal( ui.header.length, 0, "header length" );
                        equal( ui.panel.length, 0, "panel length" );
-                       equal( ui.content.length, 0, "content length" );
                }
        });
        element.accordion( "destroy" );
index da0d5751c44f7c323ad16d10c460ebc1be8b6453..c210a29a95aac1801138839c1df535c7bc9945bc 100644 (file)
@@ -65,8 +65,7 @@ $.widget( "ui.accordion", {
        _getCreateEventData: function() {
                return {
                        header: this.active,
-                       panel: !this.active.length ? $() : this.active.next(),
-                       content: !this.active.length ? $() : this.active.next()
+                       panel: !this.active.length ? $() : this.active.next()
                };
        },