From da5233e0c743de972d401d5040253534c7bd62cb Mon Sep 17 00:00:00 2001 From: Brian McMurray Date: Tue, 13 Sep 2011 13:21:26 -0400 Subject: [PATCH] If the data-iconpos attribute is manually set on the radios in a horizontal controlgroup, allow the icons to be placed. Known problem that if you set iconpos='notext' that the buttons aren't useful and appear broken. --- js/jquery.mobile.forms.checkboxradio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.forms.checkboxradio.js b/js/jquery.mobile.forms.checkboxradio.js index 7196b70e737..1137a24f351 100644 --- a/js/jquery.mobile.forms.checkboxradio.js +++ b/js/jquery.mobile.forms.checkboxradio.js @@ -21,7 +21,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, { inputtype = input.attr( "type" ), checkedState = inputtype + "-on", uncheckedState = inputtype + "-off", - icon = input.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState, + icon = input.parents( ":jqmData(type='horizontal')" ).length ? (input.parents( ":jqmData(iconpos)" ).length ? uncheckedState : undefined) : uncheckedState, activeBtn = icon ? "" : " " + $.mobile.activeBtnClass, checkedClass = "ui-" + checkedState + activeBtn, uncheckedClass = "ui-" + uncheckedState,