Skip to content
This repository
Browse code

Textinput: Allow to set option mini programmatically. Fixes #4070.

  • Loading branch information...
commit fc15e839d557db2d2abe01bfa9e5545d2c9298c5 1 parent 320cbf4
Jasper de Groot authored November 08, 2012

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

  1. 6  js/widgets/forms/textinput.js
6  js/widgets/forms/textinput.js
@@ -12,6 +12,7 @@ define( [ "jquery", "../../jquery.mobile.core", "../../jquery.mobile.widget", ".
12 12
 $.widget( "mobile.textinput", $.mobile.widget, {
13 13
 	options: {
14 14
 		theme: null,
  15
+		mini: false,
15 16
 		// This option defaults to true on iOS devices.
16 17
 		preventFocusZoom: /iPhone|iPad|iPod/.test( navigator.platform ) && navigator.userAgent.indexOf( "AppleWebKit" ) > -1,
17 18
 		initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type])",
@@ -26,8 +27,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
26 27
 			o = this.options,
27 28
 			theme = o.theme || $.mobile.getInheritedTheme( this.element, "c" ),
28 29
 			themeclass  = " ui-body-" + theme,
29  
-			mini = input.jqmData( "mini" ) === true,
30  
-			miniclass = mini ? " ui-mini" : "",
  30
+			miniclass = o.mini ? " ui-mini" : "",
31 31
 			focusedEl, clearbtn;
32 32
 
33 33
 		function toggleClear() {
@@ -74,7 +74,7 @@ $.widget( "mobile.textinput", $.mobile.widget, {
74 74
 					iconpos: "notext",
75 75
 					corners: true,
76 76
 					shadow: true,
77  
-					mini: mini
  77
+					mini: o.mini
78 78
 				});
79 79
 
80 80
 			toggleClear();

0 notes on commit fc15e83

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