summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-11-17 14:07:21 -0700
committerChad Kieffer <ckieffer@gmail.com>2009-11-17 14:07:21 -0700
commit2935816fb3989af6a2a2439b99173240e8a6147c (patch)
tree6f6f8c474435bbd76e8e0dc9df27232b03dcc84f /lib/gallery.common.js
parentade642cff4a4ca810f468723b04efc6f229916d8 (diff)
Swap sides for rounded corners for short forms when RTL language is in use.
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 9aaac1ce..0bd14915 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -179,8 +179,15 @@
var button = $(this).find("input[type=submit]");
$(".g-short-form").addClass("ui-helper-clearfix");
- $(".g-short-form input[type=text]").addClass("ui-corner-left");
- $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right");
+
+ // Place button's on the left for RTL languages
+ if ($(".rtl").length) {
+ $(".g-short-form input[type=text]").addClass("ui-corner-right");
+ $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-left");
+ } else {
+ $(".g-short-form input[type=text]").addClass("ui-corner-left");
+ $(".g-short-form input[type=submit]").addClass("ui-state-default ui-corner-right");
+ }
// Set the input value equal to label text
if (input.val() == "") {