From c0ac3881388d9e9f4bd72eac7f26bbe2787e1229 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 3 Nov 2022 15:20:34 +0000 Subject: [PATCH] Bug 31818: Enable table elements in keyboard shortcuts popover This patch updates the whitelist for the popover to ensrue our shortcuts table displays To test: 1 - Open the advanced cataloging editor 2 - Click 'Keyboard shortcuts' 3 - Is empty, be sad 4 - Apply patch 5 - Reload 6 - Click it again 7 - Shortcuts! Signed-off-by: Andrew Fuerste-Henry Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit e4079d17f383950ed135e2c43cf8a302bb9cba78) Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index cdd32c3c0a..5603b498b0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -1300,6 +1300,15 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr }, }); + // Whitelist table elements to ensure popover displays all the info + $.fn.popover.Constructor.DEFAULTS.whiteList.table = []; + $.fn.popover.Constructor.DEFAULTS.whiteList.tr = []; + $.fn.popover.Constructor.DEFAULTS.whiteList.td = []; + $.fn.popover.Constructor.DEFAULTS.whiteList.div = []; + $.fn.popover.Constructor.DEFAULTS.whiteList.tbody = []; + $.fn.popover.Constructor.DEFAULTS.whiteList.thead = []; + // https://getbootstrap.com/docs/3.4/javascript/#popovers + $('#show-shortcuts').popover({ html: true, placement: 'bottom', -- 2.39.5