Update page title when switching to the front page view
authorTom Hughes <tom@compton.nu>
Mon, 9 Dec 2013 09:28:13 +0000 (09:28 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 9 Dec 2013 09:28:13 +0000 (09:28 +0000)
Fixes https://trac.openstreetmap.org/ticket/5063

app/assets/javascripts/index.js
config/i18n-js.yml

index 0f2971f2c9e6b26c6f1af9f86d861581badc5b66..d7a14c31209c98f26f32d7ae7cabb05969b231b7 100644 (file)
@@ -223,6 +223,7 @@ $(document).ready(function () {
       $("#content").addClass("overlay-sidebar");
       map.invalidateSize({pan: false})
         .panBy([-350, 0], {animate: false});
+      document.title = I18n.t('layouts.project_name.title');
     };
 
     page.load = function() {
@@ -232,6 +233,7 @@ $(document).ready(function () {
     page.popstate = function() {
       $("#content").addClass("overlay-sidebar");
       map.invalidateSize({pan: false});
+      document.title = I18n.t('layouts.project_name.title');
     };
 
     page.unload = function() {
index 4882a4357c4a7f56cb38983e5b34581d3fff2ca3..e93d15e2f06063954e59d9cddee219c4d09e0728 100644 (file)
@@ -31,3 +31,4 @@ translations:
     - "*.site.index.remote_failed"
     - "*.site.sidebar.search_results"
     - "*.diary_entry.edit.marker_text"
+    - "*.layouts.project_name.title"