[TikiWiki-commits] [Git][tikiwiki/tiki][29.x] [BP][FIX] AutoTOC nested levels and CSS issues

"luci \(@luciash\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <695f99daf912_2c1809488058a@gitlab-sidekiq-low-urgency-cpu-bound-v2-79558dcf5c-qhncn.mail>

luci pushed to branch 29.x at Tiki Wiki CMS Groupware / Tiki


Commits:
82130796 by Yves Ngalamulume at 2026-01-08T11:41:48+00:00
[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

- - - - -


2 changed files:

- lib/jquery_tiki/autoToc.js
- lib/wiki-plugins/wikiplugin_autotoc.php


Changes:

=====================================
lib/jquery_tiki/autoToc.js
=====================================
@@ -327,8 +327,13 @@ 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);
 
@@ -344,8 +349,5 @@ $(function () {
                 window.location.hash = target;
             });
         }
-        $('html, body').stop().animate({
-            'scrollTop': $target.offset().top
-        }, 900, 'swing', function () {});
     });
 });


=====================================
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/8213079640a9f3e36231144b218767086ec91047

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8213079640a9f3e36231144b218767086ec91047
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.