SPR-753: add ACT mode as node to breadcrumb
This commit is contained in:
parent
e6265a933f
commit
2eac3d457e
3 changed files with 20 additions and 1 deletions
18
js/breadcrumb.js
Normal file
18
js/breadcrumb.js
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
2
main.php
2
main.php
|
|
@ -236,7 +236,7 @@ $classWideContent = ($ACT === "show") ? "": "wide-content ";
|
||||||
<?php
|
<?php
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="breadcrumbs">
|
<div class="breadcrumbs" data-do="<?php echo $ACT?>">
|
||||||
|
|
||||||
<div class="togglelink page_main-content">
|
<div class="togglelink page_main-content">
|
||||||
<a href="#">< ><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
|
<a href="#">< ><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle')?></span></a>
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@
|
||||||
|
|
||||||
/* DOKUWIKI:include js/meta-box.js */
|
/* DOKUWIKI:include js/meta-box.js */
|
||||||
/* DOKUWIKI:include js/sidebar.js */
|
/* DOKUWIKI:include js/sidebar.js */
|
||||||
|
/* DOKUWIKI:include js/breadcrumb.js */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue