]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Change Where am I to Where is this on left sidebar
[rails.git] / app / assets / javascripts / index.js
index 9e386d54bf2bccef0b56c1e331d3fef0494c35dc..085b615c7244f66214f2cddee69f89400c28d3d0 100644 (file)
@@ -54,7 +54,7 @@ $(document).ready(function () {
 
         if (xhr.getResponseHeader('X-Page-Title')) {
           var title = xhr.getResponseHeader('X-Page-Title');
-          document.title = decodeURIComponent(escape(title));
+          document.title = decodeURIComponent(title);
         }
 
         $('head')
@@ -148,7 +148,8 @@ $(document).ready(function () {
     }
   }
 
-  $('.leaflet-control .control-button').tooltip({placement: 'left', container: 'body'});
+  var placement = $('html').attr('dir') === 'rtl' ? 'right' : 'left';
+  $('.leaflet-control .control-button').tooltip({placement: placement, container: 'body'});
 
   var expiry = new Date();
   expiry.setYear(expiry.getFullYear() + 10);