Skip to content
This repository
Browse code

Collapsible sets now respect data-corners attribute.

  • Loading branch information...
commit 4826f29b5fb0e1fde50a53f471fd280ca40db3c2 1 parent 9185a50
Mat Marquis authored April 05, 2012

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  js/jquery.mobile.collapsibleSet.js
9  js/jquery.mobile.collapsibleSet.js
@@ -25,6 +25,10 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
25 25
 			o.contentTheme = $el.jqmData( "content-theme" );
26 26
 		}
27 27
 
  28
+		if ( !o.corners ) {
  29
+			o.corners = $el.jqmData( "corners" ) === undefined ? true : false;
  30
+		}
  31
+
28 32
 		// Initialize the collapsible set if it's not already initialized
29 33
 		if ( !$el.jqmData( "collapsiblebound" ) ) {
30 34
 			$el
@@ -57,6 +61,7 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
57 61
 
58 62
 	refresh: function() {
59 63
 		var $el = this.element,
  64
+			o = this.options,
60 65
 			collapsiblesInSet = $el.children( ":jqmData(role='collapsible')" );
61 66
 
62 67
 		$.mobile.collapsible.prototype.enhance( collapsiblesInSet.not( ".ui-collapsible" ) );
@@ -72,7 +77,7 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
72 77
 		collapsiblesInSet.first()
73 78
 			.find( "a" )
74 79
 				.first()
75  
-				.addClass( "ui-corner-top" )
  80
+				.addClass( o.corners ? "ui-corner-top" : "" )
76 81
 				.find( ".ui-btn-inner" )
77 82
 					.addClass( "ui-corner-top" );
78 83
 
@@ -80,7 +85,7 @@ $.widget( "mobile.collapsibleset", $.mobile.widget, {
80 85
 			.jqmData( "collapsible-last", true )
81 86
 			.find( "a" )
82 87
 				.first()
83  
-				.addClass( "ui-corner-bottom" )
  88
+				.addClass( o.corners ? "ui-corner-bottom" : "" )
84 89
 				.find( ".ui-btn-inner" )
85 90
 					.addClass( "ui-corner-bottom" );
86 91
 	}

0 notes on commit 4826f29

Please sign in to comment.
Something went wrong with that request. Please try again.