From 40bda722c9f98ad735804d4a8df275b9839110d5 Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 29 Oct 2015 15:47:00 -0400 Subject: [PATCH] fix acp title on ajaxify --- public/src/admin/admin.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js index 88998bc5f6..eb45ccc2e1 100644 --- a/public/src/admin/admin.js +++ b/public/src/admin/admin.js @@ -69,6 +69,14 @@ $('#main-page-title').text(menu.text() + (menu.parents('.menu-item').children('a').text() === 'Settings' ? ' Settings' : '')); } }); + + var acpPath = url.replace('admin/', '').split('/'); + acpPath.forEach(function(path, i) { + acpPath[i] = path.charAt(0).toUpperCase() + path.slice(1); + }); + acpPath = acpPath.join(' > '); + + document.title = (url === 'admin/general/dashboard' ? 'Dashboard' : acpPath) + ' | NodeBB Admin Control Panel'; } function setupRestartLinks() {