Skip to content

Commit

Permalink
MDL-75669 theme_boost: Fix Bootstrap related JS
Browse files Browse the repository at this point in the history
  • Loading branch information
roland04 committed Nov 29, 2024
1 parent 1f50445 commit cb6be31
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 113 deletions.
4 changes: 2 additions & 2 deletions calendar/amd/build/popover.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion calendar/amd/build/popover.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions calendar/amd/src/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @since 4.0
*/

import 'theme_boost/popover';
import Popover from 'theme_boost/bootstrap/popover';
import jQuery from 'jquery';
import * as CalendarSelectors from 'core_calendar/selectors';

Expand All @@ -36,12 +36,11 @@ const isPopoverAvailable = (dateContainer) => {
};

const isPopoverConfigured = new Map();

// TODO: Refactor this to use the new Popover class.
const showPopover = target => {
const dateContainer = target.closest(CalendarSelectors.elements.dateContainer);
if (!isPopoverConfigured.has(dateContainer)) {
const dateEle = jQuery(target);
dateEle.popover({
const config = {
trigger: 'manual',
placement: 'top',
html: true,
Expand All @@ -56,7 +55,8 @@ const showPopover = target => {
return content.html();
},
'animation': false,
});
};
new Popover(target, config);

isPopoverConfigured.set(dateContainer, true);
}
Expand Down
Loading

0 comments on commit cb6be31

Please sign in to comment.