Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2873 from eddiemonge/patch-1

Some code cleanup
  • Loading branch information...
commit 3e994371043bb1f100ca6b8fdf64f1c78243d117 2 parents 03e63af + c04755d
Ghislain Seguin gseguin authored
Showing with 4 additions and 11 deletions.
  1. +4 −11 js/jquery.mobile.forms.textinput.js
15 js/jquery.mobile.forms.textinput.js
View
@@ -17,20 +17,13 @@ $.widget( "mobile.textinput", $.mobile.widget, {
var input = this.element,
o = this.options,
- theme = o.theme,
- themeclass, focusedEl, clearbtn;
-
- if ( !theme ) {
- theme = $.mobile.getInheritedTheme( this.element, "c" );
- }
-
- themeclass = " ui-body-" + theme;
+ theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
+ themeclass = " ui-body-" + theme,
+ focusedEl, clearbtn;
$( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
- input.addClass("ui-input-text ui-body-"+ theme );
-
- focusedEl = input;
+ focusedEl = input.addClass("ui-input-text ui-body-"+ theme );
// XXX: Temporary workaround for issue 785 (Apple bug 8910589).
// Turn off autocorrect and autocomplete on non-iOS 5 devices
Please sign in to comment.
Something went wrong with that request. Please try again.