mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-27 15:23:59 +00:00
Fixed a glitch in the icon class name generation. It was adding ui-icon-ui-icon-checkbox-off to the checkbox icon element (2x ui-icon) and similar to radio icon element
This commit is contained in:
parent
9c3ebe07ea
commit
ffdab6ff32
1 changed files with 7 additions and 5 deletions
|
|
@ -16,10 +16,12 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
||||||
//filter works though.
|
//filter works though.
|
||||||
label = input.closest("form,fieldset,:jqmData(role='page')").find("label").filter('[for="' + input[0].id + '"]'),
|
label = input.closest("form,fieldset,:jqmData(role='page')").find("label").filter('[for="' + input[0].id + '"]'),
|
||||||
inputtype = input.attr( "type" ),
|
inputtype = input.attr( "type" ),
|
||||||
checkedClass = "ui-"+ inputtype + "-on",
|
checkedState = inputtype + "-on",
|
||||||
uncheckedClass = "ui-"+ inputtype + "-off",
|
uncheckedState = inputtype + "-off",
|
||||||
checkedicon = "ui-icon-" + inputtype + "-on",
|
checkedClass = "ui-"+ checkedState,
|
||||||
uncheckedicon = "ui-icon-" + inputtype + "-off";
|
uncheckedClass = "ui-"+ uncheckedState,
|
||||||
|
checkedicon = "ui-icon-" + checkedState,
|
||||||
|
uncheckedicon = "ui-icon-" + uncheckedState;
|
||||||
|
|
||||||
if ( inputtype != "checkbox" && inputtype != "radio" ) { return; }
|
if ( inputtype != "checkbox" && inputtype != "radio" ) { return; }
|
||||||
|
|
||||||
|
|
@ -41,7 +43,7 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
|
||||||
label
|
label
|
||||||
.buttonMarkup({
|
.buttonMarkup({
|
||||||
theme: this.options.theme,
|
theme: this.options.theme,
|
||||||
icon: this.element.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedicon,
|
icon: this.element.parents( ":jqmData(type='horizontal')" ).length ? undefined : uncheckedState,
|
||||||
shadow: false
|
shadow: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue