Skip to content
This repository
Browse code

Merge pull request #2873 from eddiemonge/patch-1

Some code cleanup
  • Loading branch information...
commit 3e994371043bb1f100ca6b8fdf64f1c78243d117 2 parents 03e63af + c04755d
Ghislain Seguin authored October 27, 2011

Showing 1 changed file with 4 additions and 11 deletions. Show diff stats Hide diff stats

  1. 15  js/jquery.mobile.forms.textinput.js
15  js/jquery.mobile.forms.textinput.js
@@ -17,20 +17,13 @@ $.widget( "mobile.textinput", $.mobile.widget, {
17 17
 
18 18
 		var input = this.element,
19 19
 			o = this.options,
20  
-			theme = o.theme,
21  
-			themeclass, focusedEl, clearbtn;
22  
-
23  
-		if ( !theme ) {
24  
-			theme = $.mobile.getInheritedTheme( this.element, "c" );
25  
-		}
26  
-
27  
-		themeclass = " ui-body-" + theme;
  20
+			theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
  21
+			themeclass  = " ui-body-" + theme,
  22
+			focusedEl, clearbtn;
28 23
 
29 24
 		$( "label[for='" + input.attr( "id" ) + "']" ).addClass( "ui-input-text" );
30 25
 
31  
-		input.addClass("ui-input-text ui-body-"+ theme );
32  
-
33  
-		focusedEl = input;
  26
+		focusedEl = input.addClass("ui-input-text ui-body-"+ theme );
34 27
 
35 28
 		// XXX: Temporary workaround for issue 785 (Apple bug 8910589).
36 29
 		//      Turn off autocorrect and autocomplete on non-iOS 5 devices

0 notes on commit 3e99437

Please sign in to comment.
Something went wrong with that request. Please try again.