mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 08:28:52 +00:00
Website: Fix responsibilities list showing up on non departmental handbook page. (#23546)
Closes: #23504 Changes: - Updated the handbook page script to make sure lists of responsibilities only appear on departmental handbook pages.
This commit is contained in:
parent
bf4ba76e02
commit
0893acaa89
1 changed files with 2 additions and 2 deletions
|
|
@ -124,11 +124,11 @@ parasails.registerPage('basic-handbook', {
|
|||
ol.style.counterReset = 'custom-counter ' + startValue;
|
||||
});
|
||||
// Add links to the responsibilities under the responsibilities heading.
|
||||
if($('#responsibilities')){
|
||||
if($('h2#responsibilities')){
|
||||
let responsibilitiesLinksHtml = '<ul>\n';
|
||||
$('h3').each((unused, el)=>{ responsibilitiesLinksHtml += '<li><a href="#'+_.escape($(el).attr('id'))+'">'+_.escape($(el).text())+'</a></li>\n'; });
|
||||
responsibilitiesLinksHtml+= '</ul>';
|
||||
$('#responsibilities + p').after(responsibilitiesLinksHtml);
|
||||
$('h2#responsibilities + p').after(responsibilitiesLinksHtml);
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue