Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
[controlgroup] New option: "corners": boolean: default: true
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Schulhof committed Nov 7, 2012
1 parent c1eef14 commit f242daa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion js/widgets/controlgroup.js
Expand Up @@ -14,6 +14,7 @@ define( [ "jquery",
$.widget( "mobile.controlgroup", $.mobile.widget, {
options: {
shadow: false,
corners: true,
excludeInvisible: true,
type: "vertical",
mini: false,
Expand Down Expand Up @@ -73,6 +74,12 @@ define( [ "jquery",
this.refresh();
},

_setCorners: function( value ) {
this.element.toggleClass( "ui-corner-all", value );
this.options.corners = value;
this.refresh();
},

_setShadow: function( value ) {
this.element.toggleClass( "ui-shadow", value );
},
Expand All @@ -87,7 +94,9 @@ define( [ "jquery",
.not( '.ui-slider-handle' ),
corners = [ true, true ];

if ( els.length > 1 ) {
if ( !this.options.corners ) {
corners = [ false, false ];
} else if ( els.length > 1 ) {
corners = ( this.options.type === "horizontal" ? [ "left", "right" ] : [ "top", "bottom" ] );
}

Expand Down

0 comments on commit f242daa

Please sign in to comment.