From 524dcc2b5ce6bcb0f4ad0e9f328d516eaea8052b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Kr=C3=B6g?= Date: Sun, 28 Apr 2024 01:51:58 +0200 Subject: [PATCH] Fix formatted sql in grid should be inline text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The css expects all table cells to have a wrapping span, but the wrapping was only done when no span existed in the cell. If the formatting is done before the wrapping there already exist nested spans and no top-level span is created. In this case the style that makes the sql displayed inline did not apply. Signed-off-by: Maximilian Krög --- js/src/makegrid.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/makegrid.js b/js/src/makegrid.js index 2041567284..662384d20c 100644 --- a/js/src/makegrid.js +++ b/js/src/makegrid.js @@ -2188,7 +2188,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid // wrap all truncated data cells with span indicating the original length // todo update the original length after a grid edit - $(t).find('td.data.truncated:not(:has(span))') + $(t).find('td.data.truncated:not(:has(>span))') .filter(function () { return $(this).data('originallength') !== undefined; }) @@ -2198,7 +2198,7 @@ var makeGrid = function (t, enableResize, enableReorder, enableVisib, enableGrid }); // wrap remaining cells, except actions cell, with span - $(t).find('th, td:not(:has(span))') + $(t).find('th, td:not(:has(>span))') .wrapInner(''); // create grid elements