From f1ff9b8f4d027207ebebce09c784b986b10fcf3c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 2 Feb 2011 21:15:25 -0500 Subject: [PATCH] Accordion: Added ui-accordion-header-icon class to generated icons in order to not interfere with any additional icons that users might add. --- themes/base/jquery.ui.accordion.css | 2 +- ui/jquery.ui.accordion.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/base/jquery.ui.accordion.css b/themes/base/jquery.ui.accordion.css index a260cf9ef..dfc98c226 100644 --- a/themes/base/jquery.ui.accordion.css +++ b/themes/base/jquery.ui.accordion.css @@ -13,6 +13,6 @@ .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-heading { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } .ui-accordion-icons .ui-accordion-heading { padding-left: 2.2em; } -.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } .ui-accordion .ui-accordion-content-active { display: block; } diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 6c257c8c0..48b3bdec8 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -98,9 +98,9 @@ $.widget( "ui.accordion", { var icons = this.options.icons; if ( icons ) { $( "" ) - .addClass( "ui-icon " + icons.header ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) .prependTo( this.headers ); - this.active.children( ".ui-icon" ) + this.active.children( ".ui-accordion-header-icon" ) .removeClass( icons.header ) .addClass( icons.activeHeader ); this.element.addClass( "ui-accordion-icons" ); @@ -108,7 +108,7 @@ $.widget( "ui.accordion", { }, _destroyIcons: function() { - this.headers.children( ".ui-icon" ).remove(); + this.headers.children( ".ui-accordion-header-icon" ).remove(); this.element.removeClass( "ui-accordion-icons" ); }, @@ -272,7 +272,7 @@ $.widget( "ui.accordion", { this.active .removeClass( "ui-state-active ui-corner-top" ) .addClass( "ui-state-default ui-corner-all" ) - .children( ".ui-icon" ) + .children( ".ui-accordion-header-icon" ) .removeClass( this.options.icons.activeHeader ) .addClass( this.options.icons.header ); this.active.next().addClass( "ui-accordion-content-active" ); @@ -345,14 +345,14 @@ $.widget( "ui.accordion", { active .removeClass( "ui-state-active ui-corner-top" ) .addClass( "ui-state-default ui-corner-all" ) - .children( ".ui-icon" ) + .children( ".ui-accordion-header-icon" ) .removeClass( options.icons.activeHeader ) .addClass( options.icons.header ); if ( !clickedIsActive ) { clicked .removeClass( "ui-state-default ui-corner-all" ) .addClass( "ui-state-active ui-corner-top" ) - .children( ".ui-icon" ) + .children( ".ui-accordion-header-icon" ) .removeClass( options.icons.header ) .addClass( options.icons.activeHeader ); clicked -- 2.39.5