mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 01:18:42 +00:00
Website: Add links to responsibilities headings on department handbook pages. (#23159)
Closes: #22995 Changes: - Updated the handbook's page script to add an unordered list of links to headings for responsibilities on department handbook pages.
This commit is contained in:
parent
d694d0572f
commit
f916871b37
1 changed files with 7 additions and 0 deletions
|
|
@ -123,6 +123,13 @@ parasails.registerPage('basic-handbook', {
|
|||
let startValue = parseInt(ol.getAttribute('start'), 10) - 1;
|
||||
ol.style.counterReset = 'custom-counter ' + startValue;
|
||||
});
|
||||
// Add links to the responsibilities under the responsibilities heading.
|
||||
if($('#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);
|
||||
}
|
||||
},
|
||||
|
||||
// ╦╔╗╔╔╦╗╔═╗╦═╗╔═╗╔═╗╔╦╗╦╔═╗╔╗╔╔═╗
|
||||
|
|
|
|||
Loading…
Reference in a new issue