main header title + better logic

This commit is contained in:
psychobunny
2015-08-20 13:21:12 -04:00
parent 744a7d4210
commit c6282e289a
5 changed files with 12 additions and 7 deletions

View File

@@ -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();