dokuwiki-template-sprintdoc.../js/breadcrumb.js
Jana Deutschländer 4e86a8f0c2 SPR-930: pseudo state for breadcrumb on detail template
SPR-814: prevent Uncaught TypeErrors of JSINFO in detail template
2017-04-20 12:50:16 +02:00

30 lines
763 B
JavaScript

/**
* Sets up the breadcrumb behaviour (adds do / ACT status information)
* or adds tpl_getLang('image_detail') on detail template
*/
(function($) {
var setBreadcrumbSuffix = function(){
var $breadcrumb = $('.breadcrumbs');
if (!$breadcrumb.length) return;
/**
* add ACT status to breadcrumb (if not show)
* or tpl_getLang('image_detail') on detail.php
*/
var 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);
}
};
$(function(){
setBreadcrumbSuffix();
});
})(jQuery);