diff options
author | Doug Neiner <doug@pixelgraphics.us> | 2011-05-12 01:51:05 -0400 |
---|---|---|
committer | Doug Neiner <doug@pixelgraphics.us> | 2011-05-12 01:51:05 -0400 |
commit | 50a4186ef949ecaf7ab4977048160820587218d2 (patch) | |
tree | 8af97084eeac69674e96e1b18dcd8245ccab5ca2 /ui/jquery.ui.button.js | |
parent | c89bbc1839ec7bcbb2834dc2a148bade2a538217 (diff) | |
download | jquery-ui-50a4186ef949ecaf7ab4977048160820587218d2.tar.gz jquery-ui-50a4186ef949ecaf7ab4977048160820587218d2.zip |
Button: Added rtl detection so corner classes would properly be applied to buttonsets. Fixed #6796. jQueryui - buttonset on rtl
Diffstat (limited to 'ui/jquery.ui.button.js')
-rw-r--r-- | ui/jquery.ui.button.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index 031ac2091..06d2ad6bb 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -352,6 +352,8 @@ $.widget( "ui.buttonset", { }, refresh: function() { + var ltr = this.element.css( "direction" ) === "ltr"; + this.buttons = this.element.find( this.options.items ) .filter( ":ui-button" ) .button( "refresh" ) @@ -364,10 +366,10 @@ $.widget( "ui.buttonset", { }) .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) .filter( ":first" ) - .addClass( "ui-corner-left" ) + .addClass( ltr ? "ui-corner-left" : "ui-corner-right" ) .end() .filter( ":last" ) - .addClass( "ui-corner-right" ) + .addClass( ltr ? "ui-corner-right" : "ui-corner-left" ) .end() .end(); }, |