Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 29e7bd5ffb2660c615a0e7ec6f086453c59d953a 1 parent 4e3617a
@Wilto Wilto authored
Showing with 13 additions and 3 deletions.
  1. +13 −3 js/jquery.mobile.buttonMarkup.js
View
16 js/jquery.mobile.buttonMarkup.js
@@ -70,20 +70,30 @@ $.fn.buttonMarkup = function( options ) {
buttonClass = "ui-btn ui-btn-up-" + o.theme;
buttonClass += o.inline ? " ui-btn-inline" : "";
buttonClass += o.shadow ? " ui-shadow" : "";
- buttonClass += o.iconpos? " ui-btn-icon-" + o.iconpos : "";
buttonClass += o.corners ? " ui-btn-corner-all" : "";
if ( o.mini !== undefined ) {
// Used to control styling in headers/footers, where buttons default to `mini` style.
buttonClass += o.mini ? " ui-mini" : " ui-fullsize";
}
-
+
if ( o.icon ) {
o.icon = "ui-icon-" + o.icon;
o.iconpos = o.iconpos || "left";
iconClass = "ui-icon " + o.icon;
- iconClass += o.iconshadow ? " ui-icon-shadow" : "";
+
+ if ( o.iconshadow ) {
+ iconClass += " ui-icon-shadow";
+ }
+ }
+
+ if ( o.iconpos ) {
+ buttonClass += " ui-btn-icon-" + o.iconpos;
+
+ if ( o.iconpos == "notext" && !el.attr( "title" ) ) {
+ el.attr( "title", el.getEncodedText() );
+ }
}
innerClass += o.corners ? " ui-btn-corner-all" : "";
Please sign in to comment.
Something went wrong with that request. Please try again.