From c6282e289a0f6ebf938bd65f05c9932584f0b3fb Mon Sep 17 00:00:00 2001 From: psychobunny Date: Thu, 20 Aug 2015 13:21:12 -0400 Subject: [PATCH] main header title + better logic --- public/less/admin/header.less | 9 +++++++++ public/src/admin/admin.js | 2 ++ public/src/admin/settings.js | 5 ----- src/views/admin/partials/menu.tpl | 1 + src/views/admin/settings/header.tpl | 2 -- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/public/less/admin/header.less b/public/less/admin/header.less index 597e142764..24199f4ca2 100644 --- a/public/less/admin/header.less +++ b/public/less/admin/header.less @@ -6,6 +6,15 @@ margin-bottom: 50px; font-size: 16px; + #main-page-title { + position: absolute; + left: 48px; + bottom: 17px; + color: #aaa; + font-size: 47px; + font-weight: 300; + } + > ul { list-style-type: none; padding: 0px; diff --git a/public/src/admin/admin.js b/public/src/admin/admin.js index da266b8e9b..765589da3c 100644 --- a/public/src/admin/admin.js +++ b/public/src/admin/admin.js @@ -75,6 +75,8 @@ menu .parent().addClass('active') .parents('.menu-item').addClass('active'); + + $('#main-page-title').text(menu.text() + (menu.parents('.menu-item').children('a').text() === 'Settings' ? ' Settings' : '')); } }); } diff --git a/public/src/admin/settings.js b/public/src/admin/settings.js index 03c07ac019..07fe9311ad 100644 --- a/public/src/admin/settings.js +++ b/public/src/admin/settings.js @@ -9,11 +9,6 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) { }; Settings.populateTOC = function() { - var title = ajaxify.currentPage - .replace('admin/settings/', '') - .replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); - - $('#settings-title').text(title + ' Settings'); $('.settings-header').each(function() { var header = $(this).text(), anchor = header.toLowerCase().replace(/ /g, '-').trim(); diff --git a/src/views/admin/partials/menu.tpl b/src/views/admin/partials/menu.tpl index eaa7111465..537b5e3f37 100644 --- a/src/views/admin/partials/menu.tpl +++ b/src/views/admin/partials/menu.tpl @@ -1,4 +1,5 @@