]> git.openstreetmap.org Git - rails.git/commitdiff
Eliminate interpolation in edit JS
authorJohn Firebaugh <john.firebaugh@gmail.com>
Sat, 29 Sep 2012 16:20:05 +0000 (09:20 -0700)
committerTom Hughes <tom@compton.nu>
Sun, 30 Sep 2012 10:57:24 +0000 (11:57 +0100)
app/views/site/edit.html.erb

index f99f17f1e7dcf7d062f2b38d0378d545914a3c64..abbb5918f64e2c8d7bc72e27f87e528f307de4cf 100644 (file)
     $("#tabnav").hide();
 
     $("#content").css("top", "0px");
-    <% if t('html.dir') == "ltr" -%>
-    $("#content").css("left", "0px");
-    <% else -%>
-    $("#content").css("right", "0px");
-    <% end -%>
+    if ($("html").attr("dir") == "ltr") {
+      $("#content").css("left", "0px");
+    } else {
+      $("#content").css("right", "0px");
+    }
 
     handleResize();
   }
     $("#tabnav").show();
 
     $("#content").css("top", "30px");
-    <% if t('html.dir') == "ltr" -%>
-    $("#content").css("left", "185px");
-    <% else -%>
-    $("#content").css("right", "185px");
-    <% end -%>
+    if ($("html").attr("dir") == "ltr") {
+      $("#content").css("left", "185px");
+    } else {
+      $("#content").css("right", "185px");
+    }
 
     handleResize();
   }