[TikiWiki-commits] [Git][tikiwiki/tiki][27.x] [BP][FIX] AutoTOC nested levels and CSS issues
"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6964f63ab92db_2becb99072692@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f7d6469f9-c5sff.mail> |
luci pushed to branch 27.x at Tiki Wiki CMS Groupware / Tiki
Commits:
98b626b0 by Yves Ngalamulume at 2026-01-12T13:18:48+00:00
[BP][FIX] AutoTOC nested levels and CSS issues
---
* [BP][FIX] AutoTOC nested levels and CSS issues
---
* [BP][FIX] AutoTOC nested levels and CSS issues
---
* [FIX] Correction of typing errors
* [FIX] Conflict resolution
* [FIX] Conflict resolution
* Fix AutoTOC nested levels and CSS issues
* [FIX] AutoTOC nested levels and CSS issues
* [FIX] AutoTOC nested levels and CSS issues
* [FIX] AutoTOC nested levels and CSS issues
* [FIX] AutoTOC nested levels and CSS issues
---
* Enhance AutoTOC click handling: add active class management and smooth scrolling
* Use Bootstrap theme colors in AutoTOC CSS
* Fix AutoTOC nested levels and CSS issues
* [FIX] AutoTOC nested levels and CSS issues
See merge request tikiwiki/tiki!9243
See merge request tikiwiki/tiki!9248
See merge request tikiwiki/tiki!9326
See merge request tikiwiki/tiki!9348
- - - - -
2 changed files:
- lib/jquery_tiki/autoToc.js
- lib/wiki-plugins/wikiplugin_autotoc.php
Changes:
=====================================
lib/jquery_tiki/autoToc.js
=====================================
@@ -314,16 +314,18 @@ function countHeadings(children) {
$(function () {
$.genAutoToc();
- $('#autotoc a[href^="#"]').on('click', function (e) {
+ $('#autotoc').on('click', 'a[href^="#"]', function (e) {
e.preventDefault();
+ $('#autotoc a').removeClass('active');
+ $(this).addClass('active');
+ $('#autotoc li').removeClass('open');
+ $(this).parents('li').addClass('open');
+
var target = this.hash;
var $target = $(target);
if (typeof parentNode !== 'undefined') {
var parent = document.querySelector(target).parentNode;
$('.tabs a[href="#'+parent.id+'"]').tab('show');
}
- $('html, body').stop().animate({
- 'scrollTop': $target.offset().top
- }, 900, 'swing', function () {});
});
});
\ No newline at end of file
=====================================
lib/wiki-plugins/wikiplugin_autotoc.php
=====================================
@@ -188,7 +188,7 @@ function wikiplugin_autotoc($data, $params)
text-decoration: none;
background-color: transparent;
border-left-width: 1px;
- border-left-style: solid; // #0075ff;
+ border-left-style: solid;
}');
return "<div id='autotoc'></div>";
@@ -211,7 +211,7 @@ function wikiplugin_autotoc($data, $params)
text-decoration: none;
background-color: transparent;
border-left-style: solid;
- bordr-left-width: 1px; // #0075ff;
+ border-left-width: 1px;
}
#autotoc .nav-link.active,
@@ -221,11 +221,10 @@ function wikiplugin_autotoc($data, $params)
font-weight: bold;
background-color: transparent;
border-left-style: solid;
- border-left-width: 2px;// solid #0075ff;
+ border-left-width: 2px;
}
#autotoc .nav-link + ul {
- display: none;
padding-bottom: 10px;
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/98b626b00826e7d9ee187d7848a7df9c86583c0d
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/98b626b00826e7d9ee187d7848a7df9c86583c0d
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs