]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Replace use of I18n in javascript with OSM.i18n
[rails.git] / app / assets / javascripts / index.js
index b79c3308888904bfb02b6457a6de7775e42c64fb..3924316c175739d8f4884fb727a3b44f896e427f 100644 (file)
@@ -245,7 +245,7 @@ $(function () {
       })
       .catch(() => {
         // eslint-disable-next-line no-alert
-        alert(I18n.t("site.index.remote_failed"));
+        alert(OSM.i18n.t("site.index.remote_failed"));
       });
 
     function sendRemoteEditCommand(url) {
@@ -266,7 +266,7 @@ $(function () {
       .removeAttr("title")
       .tooltip({
         placement: "bottom",
-        title: I18n.t("javascripts.edit_help")
+        title: OSM.i18n.t("javascripts.edit_help")
       })
       .tooltip("show");
 
@@ -280,7 +280,7 @@ $(function () {
 
     page.pushstate = page.popstate = function () {
       map.setSidebarOverlaid(true);
-      document.title = I18n.t("layouts.project_name.title");
+      document.title = OSM.i18n.t("layouts.project_name.title");
     };
 
     page.load = function () {
@@ -398,7 +398,7 @@ $(function () {
     }
   });
 
-  $(document).on("click", "#sidebar_content .btn-close", function () {
+  $(document).on("click", "#sidebar .sidebar-close-controls button", function () {
     OSM.router.route("/" + OSM.formatHash(map));
   });
 });