Skip to content
This repository
Browse code

Fixes #3792, fixes #3801 - Fixes regression introduced by 86af00b.

  • Loading branch information...
commit 29e7bd5ffb2660c615a0e7ec6f086453c59d953a 1 parent 4e3617a
Mat Marquis authored March 12, 2012

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

  1. 16  js/jquery.mobile.buttonMarkup.js
16  js/jquery.mobile.buttonMarkup.js
@@ -70,20 +70,30 @@ $.fn.buttonMarkup = function( options ) {
70 70
 		buttonClass = "ui-btn ui-btn-up-" + o.theme;
71 71
 		buttonClass += o.inline ? " ui-btn-inline" : "";
72 72
 		buttonClass += o.shadow ? " ui-shadow" : "";
73  
-		buttonClass += o.iconpos? " ui-btn-icon-" + o.iconpos : "";
74 73
 		buttonClass += o.corners ? " ui-btn-corner-all" : "";
75 74
 
76 75
 		if ( o.mini !== undefined ) {
77 76
 			// Used to control styling in headers/footers, where buttons default to `mini` style.
78 77
 			buttonClass += o.mini ? " ui-mini" : " ui-fullsize";
79 78
 		}
80  
-
  79
+		
81 80
 		if ( o.icon ) {
82 81
 			o.icon = "ui-icon-" + o.icon;
83 82
 			o.iconpos = o.iconpos || "left";
84 83
 
85 84
 			iconClass = "ui-icon " + o.icon;
86  
-			iconClass += o.iconshadow ? " ui-icon-shadow" : "";
  85
+
  86
+			if ( o.iconshadow ) {
  87
+				iconClass += " ui-icon-shadow";
  88
+			}
  89
+		}
  90
+
  91
+		if ( o.iconpos ) {
  92
+			buttonClass += " ui-btn-icon-" + o.iconpos;
  93
+
  94
+			if ( o.iconpos == "notext" && !el.attr( "title" ) ) {
  95
+				el.attr( "title", el.getEncodedText() );
  96
+			}
87 97
 		}
88 98
     
89 99
 		innerClass += o.corners ? " ui-btn-corner-all" : "";

0 notes on commit 29e7bd5

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