dokuwiki-template-bootstrap3 icon indicating copy to clipboard operation
dokuwiki-template-bootstrap3 copied to clipboard

bootsrap3 TOC not working perfectly with other plugins for TOC (possible solution inside)

Open bobdeh opened this issue 7 years ago • 1 comments

Description

Plugins "TOC Tweaking assortment" and "inlinetoc" still don't work perfectly with bootstrap3 TOC

See also #271

Steps to Reproduce bug with "TOC Tweaking assortment"

Insert inlineTOC with "TOC Tweaking assortment" Expected behavior: bootstrap3 TOC should disappear.

Actual behavior: bootstrap3 TOC stays open because the javascript only looks for inline TOC added with "inlinetoc" plugin.

Steps to Reproduce bug with "inlinetoc" plugin.

Insert inlineTOC with "inlinetoc" plugin. Expected behavior: bootstrap3 TOC should disappear.

Actual behavior: bootstrap3 TOC only becomes invisible. Its parent DIV keeps width and causes problems when a picture i aligned right on top of the page.

My personal workaround

Change /bootstrap3/js/plugins/inlinetoc.js : Some lines might be obsolete

var $toc = jQuery('#dw__toc, #dokuwiki__toc'), // DokuWiki TOC
$toc2 = jQuery('div.inlinetoc2'); // InlineTOC Plugin
var $toc3 = jQuery('#dw__inlinetoc');

// InlineTOC Plugin
if ($toc2.length && $toc.length) {
$toc.css('display', 'none');
$toc.css('width', '0');
$toc.parent().css('position', 'absolute');
$toc.parent().css('float', 'none');
$toc2.addClass('panel panel-default');
}
if ($toc3.length && $toc.length) {
$toc.css('display', 'none');
$toc.css('width', '0');
$toc.parent().css('position', 'absolute');
$toc.parent().css('float', 'none');
$toc3.addClass('panel panel-default');
}`
...


bobdeh avatar Jan 03 '17 17:01 bobdeh

This doesn't seem to be a universal work around. I am personally having issues in my wiki Inline TOC should be in the ":rightsidebar" but it shows only sometimes with no clear predictable behavior. Sometimes it is on the sidebar, sometimes it's just in the page, reloading the page sometimes changes it.

cgalo5758 avatar Apr 15 '19 23:04 cgalo5758