dynamic title for settings pages

v1.18.x
psychobunny
parent 2da3b34798
commit 30970d618c

@ -26,6 +26,11 @@
background: #fff;
font-size: 14px;
h1 {
font-size: 35px;
margin-bottom: 50px;
}
label {
font-weight: 700;
}

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

@ -1,17 +1,5 @@
<!-- IMPORT admin/settings/header.tpl -->
<div class="row">
<div class="col-xs-2">
Contents
</div>
<div class="col-xs-10">
<nav class="section-content">
<ul></ul>
</nav>
</div>
</div>
<div class="row">
<div class="col-xs-2 settings-header">
Site Settings

@ -1 +1,13 @@
<div class="settings">
<div class="settings">
<h1 id="settings-title">General Settings</h1>
<div class="row">
<div class="col-xs-2">
Contents
</div>
<div class="col-xs-10">
<nav class="section-content">
<ul></ul>
</nav>
</div>
</div>
Loading…
Cancel
Save