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);
}
});

View file

@ -236,7 +236,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
<?php
?>
<div class="breadcrumbs">
<div class="breadcrumbs" data-do="<?php echo $ACT?>">
<div class="togglelink page_main-content">
<a href="#">&lt; &gt;<span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>

View file

@ -5,3 +5,4 @@
/* DOKUWIKI:include js/meta-box.js */
/* DOKUWIKI:include js/sidebar.js */
/* DOKUWIKI:include js/breadcrumb.js */