diff options
author | Richard D. Worth <rdworth@gmail.com> | 2010-05-26 15:08:37 -0400 |
---|---|---|
committer | Richard D. Worth <rdworth@gmail.com> | 2010-05-26 15:08:37 -0400 |
commit | 202ddd0c58933e80b60373690412d2103b60388b (patch) | |
tree | e22001e7001c0f9ca65de46801cc0eb2fbcf80f8 /ui | |
parent | e815e7c1e49632651052e80e2360fde1a43b0f80 (diff) | |
download | jquery-ui-202ddd0c58933e80b60373690412d2103b60388b.tar.gz jquery-ui-202ddd0c58933e80b60373690412d2103b60388b.zip |
Button: Removed ui-button-text-icon class. Added ui-button-text-icon-primary and ui-button-text-icon-secondary classes. Fixed #5382 - Button: specifying only a secondary icon for the button widget locates the icon on the left
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.button.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 83f14f4c9..8176c3321 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -16,7 +16,7 @@ var lastActive, baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", stateClasses = "ui-state-hover ui-state-active ", - typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon ui-button-text-only", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", formResetHandler = function( event ) { $( ":ui-button", event.target.form ).each(function() { var inst = $( this ).data( "button" ); @@ -288,7 +288,7 @@ $.widget( "ui.button", { multipleIcons = icons.primary && icons.secondary; if ( icons.primary || icons.secondary ) { buttonElement.addClass( "ui-button-text-icon" + - ( multipleIcons ? "s" : "" ) ); + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); if ( icons.primary ) { buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); } @@ -298,7 +298,7 @@ $.widget( "ui.button", { if ( !this.options.text ) { buttonElement .addClass( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ) - .removeClass( "ui-button-text-icons ui-button-text-icon" ); + .removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" ); if ( !this.hasTitle ) { buttonElement.attr( "title", buttonText ); } |