From ca01909c0c0107ad641ec97009f2489bdd59dac4 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 22 Mar 2023 11:10:40 +0000 Subject: [PATCH] Bug 33318: Fix JS errors on advanced cataloguing editor This patch reverts bug 31818 Test plan: 1. Checkout 21.11.x 2. Set the EnableAdvancedCatalogingEditor syspref = 'Enable' 3. Go to Cataloguing > Advanced editor 4. Notice the advanced editor is stuck on 'Loading, please wait' 5. Right click > Inspect > Console 6. Notice there is a JS error: "Uncaught TypeError: $.fn.popover.Constructor.DEFAULTS.whiteList is undefined" 7. Apply patch 8. Restart services 9. Refresh the advanced editor 10. Notice it is not stuck on 'Loading, please wait' 11. Right click > Inspect > Console 12. Notice the JS error is no longer showing 13. Click on 'Keyboard shortcuts' and confirm it contains content - that is what bug 31818 was aiming to fix Sponsored-by: Toi Ohomai Institute of Technology, New Zealand Signed-off-by: David Nind Signed-off-by: Nick Clemens --- .../intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 --------- 1 file changed, 9 deletions(-) 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 6ef42705a6..e0a26ca213 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -1300,15 +1300,6 @@ 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.30.2