mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
dynamic title for settings pages
This commit is contained in:
@@ -9,6 +9,11 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user