Изменения документа Make All Tables Sortable Macro
Редактировал(а) Coluns 19.11.2023
Сводка
-
Объекты (2 изменено, 0 добавлено, 0 удалено)
Подробности
- XWiki.JavaScriptExtension[0]
-
- Код
-
... ... @@ -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]
-
- Кэшировано
-
... ... @@ -1,1 +1,0 @@ 1 -Нет - Описание
-
... ... @@ -1,1 +1,1 @@ 1 -Makes all tables in the content of the current page sort eable.1 +Makes all tables in the content of the current page sortable. - Асинхронная отрисовка
-
... ... @@ -1,1 +1,0 @@ 1 -Нет