Permalink
Browse files

Collapsible: Also add "themed-content" class to non-inset collapsible…

…s for collapsible lists border styling.
  • Loading branch information...
1 parent 26be630 commit f02a8739cb6fa6bbde531f588e2cadc54f0214af @jaspermdegroot jaspermdegroot committed Nov 9, 2012
Showing with 9 additions and 11 deletions.
  1. +9 −11 js/widgets/collapsible.js
@@ -80,20 +80,18 @@ $.widget( "mobile.collapsible", $.mobile.widget, {
o.theme = $.mobile.getInheritedTheme( $el, "c" );
}
}
-
- if ( !!o.inset ) {
- var collapsibleClasses = "ui-collapsible-inset";
- if ( !!o.corners ) {
- collapsibleClasses += " ui-corner-all";
- }
- if ( o.contentTheme ) {
- collapsibleClasses += " ui-collapsible-themed-content";
- }
+
+ var collapsibleClasses = "";
+ !!o.inset ? collapsibleClasses += "ui-collapsible-inset" : "";
+ !!o.corners && !!o.inset ? collapsibleClasses += " ui-corner-all" : "";
+ if ( o.contentTheme ) {
+ collapsibleClasses += " ui-collapsible-themed-content";
+ collapsibleContent.addClass( "ui-body-" + o.contentTheme );
+ }
+ if ( collapsibleClasses !== "" ) {
collapsible.addClass( collapsibleClasses );
}
- collapsibleContent.addClass( ( o.contentTheme ) ? ( "ui-body-" + o.contentTheme ) : "");
-
collapsedIcon = $el.jqmData( "collapsed-icon" ) || o.collapsedIcon || "plus";
expandedIcon = $el.jqmData( "expanded-icon" ) || o.expandedIcon || "minus";

0 comments on commit f02a873

Please sign in to comment.