Index: openacs-4/packages/xowiki/tcl/personal-notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/personal-notification-procs.tcl,v diff -u -r1.1.2.7 -r1.1.2.8 --- openacs-4/packages/xowiki/tcl/personal-notification-procs.tcl 26 Jun 2022 19:29:50 -0000 1.1.2.7 +++ openacs-4/packages/xowiki/tcl/personal-notification-procs.tcl 22 Oct 2023 15:53:45 -0000 1.1.2.8 @@ -196,6 +196,15 @@ # # provided via get_parameters # + + # Create Bootstrap3/5 compatible attributes + if {[::xowiki::CSS toolkit] eq "bootstrap5"} { + set data_attribute "data-bs" + set close_button_css "btn-close" + } else { + set data_attribute "data" + set close_button_css "close" + } template::add_body_script -script [subst { var inclass_exam_messages_ts = \[\]; @@ -220,8 +229,8 @@ if (inclass_exam_messages_ts.indexOf(data.ts) == -1) { var alert = 'alert-' + data.urgency; block = '
'; inclass_exam_messages_ts.push(data.ts); @@ -231,7 +240,7 @@ el.innerHTML += block; } }); - document.querySelectorAll('a.close').forEach(function(e) { + document.querySelectorAll('a.$close_button_css').forEach(function(e) { //console.log('register dismiss handler ts '+ e.dataset.ts); e.removeEventListener('click', inclass_exam_dismiss_handler); e.addEventListener('click', inclass_exam_dismiss_handler);