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

Commit

Permalink
Checkboxradio: Theme inheritance via CSS. Don't add btn theme class u…
Browse files Browse the repository at this point in the history
…nless it a theme has been set.
  • Loading branch information
jaspermdegroot committed May 14, 2013
1 parent 3650c85 commit cac84d1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions js/widgets/forms/checkboxradio.js
Expand Up @@ -46,10 +46,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
}

// Establish options
// If there's no selected theme check the data attr
if ( !o.theme ) {
o.theme = "a";
}
o.mini = inheritAttr( input, "mini" ) || o.mini;

// Expose for other methods
Expand Down Expand Up @@ -201,7 +197,9 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, $.extend( {
},

_setTheme: function( value ) {
this.label.removeClass( "ui-btn-" + this.options.theme ).addClass( "ui-btn-" + value );
if ( value ) {
this.label.removeClass( "ui-btn-" + this.options.theme ).addClass( "ui-btn-" + value );
}
},

_setMini: function( value ) {
Expand Down

0 comments on commit cac84d1

Please sign in to comment.