SPR-930: pseudo state for breadcrumb on detail template
SPR-814: prevent Uncaught TypeErrors of JSINFO in detail template
This commit is contained in:
parent
6db1065031
commit
4e86a8f0c2
7 changed files with 80 additions and 15 deletions
|
@ -229,7 +229,7 @@ include('tpl/favicon_tiles.php');
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12">
|
<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">
|
<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>
|
||||||
|
|
|
@ -1,18 +1,30 @@
|
||||||
/**
|
/**
|
||||||
* Sets up the breadcrumb behaviour (adds do / ACT status information)
|
* Sets up the breadcrumb behaviour (adds do / ACT status information)
|
||||||
|
* or adds tpl_getLang('image_detail') on detail template
|
||||||
*/
|
*/
|
||||||
jQuery(function () {
|
(function($) {
|
||||||
var $breadcrumb = jQuery('.breadcrumbs');
|
|
||||||
if (!$breadcrumb.length) return;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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);
|
||||||
|
|
24
js/plugins/bookcreator.js
Normal file
24
js/plugins/bookcreator.js
Normal file
|
@ -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);
|
25
js/plugins/folded.js
Normal file
25
js/plugins/folded.js
Normal file
|
@ -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);
|
|
@ -46,6 +46,7 @@ $lang['userpage'] = 'Benutzer-Seite';
|
||||||
$lang['meta_data'] = 'Meta Daten des Bildes';
|
$lang['meta_data'] = 'Meta Daten des Bildes';
|
||||||
$lang['osm_zoom_link_text'] = 'größere Karte anzeigen';
|
$lang['osm_zoom_link_text'] = 'größere Karte anzeigen';
|
||||||
$lang['osm_zoom_link_title'] = 'externer Link - öffnet in neuem Fenster';
|
$lang['osm_zoom_link_title'] = 'externer Link - öffnet in neuem Fenster';
|
||||||
|
$lang['image_detail'] = 'Detailinformationen zum Bild';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -47,6 +47,8 @@ $lang['userpage'] = 'User page';
|
||||||
$lang['meta_data'] = 'Meta Data';
|
$lang['meta_data'] = 'Meta Data';
|
||||||
$lang['osm_zoom_link_text'] = 'view larger map';
|
$lang['osm_zoom_link_text'] = 'view larger map';
|
||||||
$lang['osm_zoom_link_title'] = 'external link opens new window';
|
$lang['osm_zoom_link_title'] = 'external link opens new window';
|
||||||
|
$lang['image_detail'] = 'image details';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3,8 +3,9 @@
|
||||||
|
|
||||||
/* DOKUWIKI:include js/plugins/do_tasks.js */
|
/* DOKUWIKI:include js/plugins/do_tasks.js */
|
||||||
/* DOKUWIKI:include js/plugins/qc.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/meta-box.js */
|
||||||
/* DOKUWIKI:include js/sidebar.js */
|
/* DOKUWIKI:include js/sidebar.js */
|
||||||
/* DOKUWIKI:include js/breadcrumb.js */
|
/* DOKUWIKI:include js/breadcrumb.js */
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue