diff --git a/detail.php b/detail.php index bedee99..e1df231 100755 --- a/detail.php +++ b/detail.php @@ -229,7 +229,7 @@ include('tpl/favicon_tiles.php'); <div class="container"> <div class="row"> <div class="col-xs-12"> - <div class="breadcrumbs" data-do="<?php echo $ACT ?>"> + <div class="breadcrumbs" data-do="<?php echo tpl_getLang('image_detail') ?>"> <div class="togglelink page_main-content"> <a href="#"><span class="sr-out"><?php echo tpl_getLang('a11y_sidebartoggle') ?></span></a> diff --git a/js/breadcrumb.js b/js/breadcrumb.js index 510c837..7825584 100644 --- a/js/breadcrumb.js +++ b/js/breadcrumb.js @@ -1,18 +1,30 @@ /** * Sets up the breadcrumb behaviour (adds do / ACT status information) + * or adds tpl_getLang('image_detail') on detail template */ -jQuery(function () { - var $breadcrumb = jQuery('.breadcrumbs'); - if (!$breadcrumb.length) return; +(function($) { - /** - * add ACT status to breadcrumb (if not show) - * - */ - 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); - } -}); + 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); diff --git a/js/plugins/bookcreator.js b/js/plugins/bookcreator.js new file mode 100644 index 0000000..742091f --- /dev/null +++ b/js/plugins/bookcreator.js @@ -0,0 +1,24 @@ +/** + * prevents Uncaught TypeError in detail template if bookcreator plug-in is installed + * + */ +(function($) { + + + var debugBookCreatorOnDetailTemplate = function(){ + + var $detail = $('#dokuwiki__detail'); + if (!$detail.length) return; + + if(JSINFO.bookcreator === undefined) { + JSINFO.bookcreator = {}; + JSINFO.bookcreator.areToolsVisible = false; + } + }; + + $(function(){ + debugBookCreatorOnDetailTemplate(); + }); + + +})(jQuery); diff --git a/js/plugins/folded.js b/js/plugins/folded.js new file mode 100644 index 0000000..2f954c2 --- /dev/null +++ b/js/plugins/folded.js @@ -0,0 +1,25 @@ +/** + * prevents Uncaught TypeError in detail template if folded plug-in is installed + * + */ +(function($) { + + + var debugFoldedOnDetailTemplate = function(){ + + var $detail = $('#dokuwiki__detail'); + if (!$detail.length) return; + + if(JSINFO.plugin_folded === undefined) { + JSINFO.plugin_folded = {}; + JSINFO.plugin_folded.reveal = ''; + JSINFO.plugin_folded.hide = ''; + } + }; + + $(function(){ + debugFoldedOnDetailTemplate(); + }); + + +})(jQuery); diff --git a/lang/de/lang.php b/lang/de/lang.php index 77a8751..723c3fe 100755 --- a/lang/de/lang.php +++ b/lang/de/lang.php @@ -46,6 +46,7 @@ $lang['userpage'] = 'Benutzer-Seite'; $lang['meta_data'] = 'Meta Daten des Bildes'; $lang['osm_zoom_link_text'] = 'größere Karte anzeigen'; $lang['osm_zoom_link_title'] = 'externer Link - öffnet in neuem Fenster'; +$lang['image_detail'] = 'Detailinformationen zum Bild'; /** diff --git a/lang/en/lang.php b/lang/en/lang.php index 3b01cd1..fd0eab7 100755 --- a/lang/en/lang.php +++ b/lang/en/lang.php @@ -47,6 +47,8 @@ $lang['userpage'] = 'User page'; $lang['meta_data'] = 'Meta Data'; $lang['osm_zoom_link_text'] = 'view larger map'; $lang['osm_zoom_link_title'] = 'external link opens new window'; +$lang['image_detail'] = 'image details'; + /** diff --git a/script.js b/script.js index ed8b13e..11e9ce9 100755 --- a/script.js +++ b/script.js @@ -3,8 +3,9 @@ /* DOKUWIKI:include js/plugins/do_tasks.js */ /* DOKUWIKI:include js/plugins/qc.js */ +/* DOKUWIKI:include js/plugins/bookcreator.js */ +/* DOKUWIKI:include js/plugins/folded.js */ /* DOKUWIKI:include js/meta-box.js */ /* DOKUWIKI:include js/sidebar.js */ /* DOKUWIKI:include js/breadcrumb.js */ -