From b9a518f1c72ccd4fa13bf7500d7b6c9f815e954d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 13 Apr 2018 15:37:30 +0200 Subject: [js_stupidtable] Decollapse on sort (slx-decollapse tables) --- modules-available/js_stupidtable/clientscript.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules-available/js_stupidtable/clientscript.js b/modules-available/js_stupidtable/clientscript.js index 453e6375..0baa1546 100644 --- a/modules-available/js_stupidtable/clientscript.js +++ b/modules-available/js_stupidtable/clientscript.js @@ -142,6 +142,14 @@ // More reliable method of forcing a redraw $table.css("display"); + // OpenSLX -- decollapse table if we try to sort it + var $decol = $table.find('.slx-decollapse'); + if ($decol.length > 0) { + $decol.click(); + $decol.remove(); + if ($table.stupidtable.settings.will_manually_build_table) $table.stupidtable_build(); + } + // Run sorting asynchronously on a timout to force browser redraw after // `beforetablesort` callback. Also avoids locking up the browser too much. setTimeout(function() { -- cgit v1.2.3-55-g7522