From: Tom Hughes Date: Mon, 9 Dec 2013 09:28:13 +0000 (+0000) Subject: Update page title when switching to the front page view X-Git-Tag: live~4560 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/24893c0936d4634e2caf0225e920a6d4c19b164c?hp=de9d26c7dfd8f5b5403846e54a1f2678fdbaf7a2 Update page title when switching to the front page view Fixes https://trac.openstreetmap.org/ticket/5063 --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 0f2971f2c..d7a14c312 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -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() { diff --git a/config/i18n-js.yml b/config/i18n-js.yml index 4882a4357..e93d15e2f 100644 --- a/config/i18n-js.yml +++ b/config/i18n-js.yml @@ -31,3 +31,4 @@ translations: - "*.site.index.remote_failed" - "*.site.sidebar.search_results" - "*.diary_entry.edit.marker_text" + - "*.layouts.project_name.title"