mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Accordion: Moved the ui-accordion-icons class to the headers to properly style nested accordions with varying settings of icons and no icons. Fixes #7880 - Nested accordion.
This commit is contained in:
parent
3919256abd
commit
5a55d68eca
4
themes/base/jquery.ui.accordion.css
vendored
4
themes/base/jquery.ui.accordion.css
vendored
@ -12,7 +12,9 @@
|
||||
.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 2px; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-header-active { border-bottom: 0; }
|
||||
.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-icons a.ui-accordion-heading { padding-left: 2.2em; }
|
||||
.ui-accordion-noicons a.ui-accordion-heading { padding-left: .7em; }
|
||||
.ui-accordion-icons .ui-accordion-icons a.ui-accordion-heading { padding-left: 2.2em; }
|
||||
.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; overflow: auto; display: none; zoom: 1; }
|
||||
.ui-accordion .ui-accordion-content-active { display: block; }
|
||||
|
8
ui/jquery.ui.accordion.js
vendored
8
ui/jquery.ui.accordion.js
vendored
@ -119,13 +119,15 @@ $.widget( "ui.accordion", {
|
||||
this.active.children( ".ui-accordion-header-icon" )
|
||||
.removeClass( icons.header )
|
||||
.addClass( icons.activeHeader );
|
||||
this.element.addClass( "ui-accordion-icons" );
|
||||
this.headers.addClass( "ui-accordion-icons" );
|
||||
}
|
||||
},
|
||||
|
||||
_destroyIcons: function() {
|
||||
this.headers.children( ".ui-accordion-header-icon" ).remove();
|
||||
this.element.removeClass( "ui-accordion-icons" );
|
||||
this.headers
|
||||
.removeClass( "ui-accordion-icons" )
|
||||
.children( ".ui-accordion-header-icon" )
|
||||
.remove();
|
||||
},
|
||||
|
||||
_destroy: function() {
|
||||
|
Loading…
Reference in New Issue
Block a user