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

"Jean-Marc Kadimba \(@jmkadimba\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6964c0c2d89c7_2c180df87777f@gitlab-sidekiq-low-urgency-cpu-bound-v2-7fc4d66885-c8fp5.mail>

Jean-Marc Kadimba pushed to branch 28.x at Tiki Wiki CMS Groupware / Tiki


Commits:
9fba7070 by Yves Ngalamulume at 2026-01-12T11:30:05+02:00
[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

- - - - -


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/9fba7070f50f02fbf01ab2205c204ba5a0747b26

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/9fba7070f50f02fbf01ab2205c204ba5a0747b26
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.