SPR-753: add ACT mode as node to breadcrumb

This commit is contained in:
Jana Deutschländer 2017-02-22 16:48:42 +01:00
commit 2eac3d457e
3 changed files with 20 additions and 1 deletions

18
js/breadcrumb.js Normal file
View file

@ -0,0 +1,18 @@
/**
* Sets up the breadcrumb behaviour (adds do / ACT status information)
*/
jQuery(function () {
const $breadcrumb = jQuery('.breadcrumbs');
if (!$breadcrumb.length) return;
/**
* add ACT status to breadcrumb (if not show)
*
*/
const mode = $breadcrumb.attr('data-do');
if(mode && mode.indexOf('show') !== 0){
var markup = '<bdi lang="en"><span class="curid"> : <strong>' + mode + '</strong></span></bdi>';
$breadcrumb.find('p').append(markup);
}
});