]> source.dussan.org Git - jquery-ui.git/commitdiff
Button: Fixed RTL detection to default to LTR. Fixes #7697 - Buttonset: Incorrect...
authorScott González <scott.gonzalez@gmail.com>
Tue, 6 Sep 2011 15:00:42 +0000 (11:00 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 6 Sep 2011 15:01:23 +0000 (11:01 -0400)
(cherry picked from commit 08450c3b2dfa652c7866653af93566c9bfa2f2cb)

ui/jquery.ui.button.js

index f7c7486e622002d2ac907eafa4a2999710c8f9fd..7774ab9378bd7798db53abb66582bedff6de3be7 100644 (file)
@@ -377,7 +377,7 @@ $.widget( "ui.buttonset", {
        },
        
        refresh: function() {
-               var ltr = this.element.css( "direction" ) === "ltr";
+               var rtl = this.element.css( "direction" ) === "rtl";
                
                this.buttons = this.element.find( this.options.items )
                        .filter( ":ui-button" )
@@ -391,10 +391,10 @@ $.widget( "ui.buttonset", {
                        })
                                .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
                                .filter( ":first" )
-                                       .addClass( ltr ? "ui-corner-left" : "ui-corner-right" )
+                                       .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
                                .end()
                                .filter( ":last" )
-                                       .addClass( ltr ? "ui-corner-right" : "ui-corner-left" )
+                                       .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
                                .end()
                        .end();
        },