0 Votes
Last modified by QUIS Admin on 2024/06/18 12:07

From version 1.1
edited by QUIS Admin
on 2023/01/06 19:34
Change comment: Install extension [org.xwiki.contrib:macro-sortabletables/1.0]
To version 3.1
edited by QUIS Admin
on 2024/06/18 12:07
Change comment: Install extension [org.xwiki.contrib:macro-sortabletables/1.1]

Summary

Details

XWiki.JavaScriptExtension[0]
Code
... ... @@ -16,9 +16,14 @@
16 16   }
17 17  
18 18   $$("#xwikicontent table").each(function(table) {
19 - if (table.getAttribute('class') !== null && table.getAttribute('class').indexOf('xwiki-livetable') >= 0) {
20 - // ignore livetables; they take care of themselves
21 - return;
19 + var tableClass = table.getAttribute('class')
20 + if (tableClass !== null) {
21 + if (tableClass.indexOf('xwiki-livetable') >= 0 || tableClass.indexOf('nosort') >= 0) {
22 + // ignore livetables; they take care of themselves
23 + // also skip all tabes with a class containing "nosort"
24 + // which servers as a marker that these tables should not be sorted
25 + return;
26 + }
22 22   }
23 23   tableCounter++;
24 24   if (macro_sortabletables_sortable) {
XWiki.WikiMacroClass[0]
Cached
... ... @@ -1,1 +1,0 @@
1 -No
Macro description
... ... @@ -1,1 +1,1 @@
1 -Makes all tables in the content of the current page sorteable.
1 +Makes all tables in the content of the current page sortable.
Asynchronous rendering
... ... @@ -1,1 +1,0 @@
1 -No