]> source.dussan.org Git - jquery-ui.git/commitdiff
Accordion: Removed deprecated icon option. Fixes #6835 - Accordion: Remove icons...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 24 Oct 2012 14:57:01 +0000 (10:57 -0400)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Wed, 24 Oct 2012 21:44:06 +0000 (17:44 -0400)
tests/unit/accordion/accordion_common_deprecated.js
tests/unit/accordion/accordion_deprecated.js
ui/jquery.ui.accordion.js

index 9adb074c4ca6adbbf67b86a97b80794498753546..0ce36991cc74584a600a8229dd7f94ce65755755 100644 (file)
@@ -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
index 2fb509c442b7a0cc20b76d50af720b8f3a575f3b..d410e07e2a45f26e72b2a0aff53470227ccca8cb 100644 (file)
@@ -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() );
 
index f9cf733d52330bf779d1d65adcaffe69d174529e..76076131d683a067f0d49ec236642f4430dd0523 100644 (file)
@@ -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;