/* global $, APP */ /** * Base class for overlay components - the components which are displayed on * top of the application with semi-transparent background covering the whole * screen. */ export default class Overlay{ /** * Creates new Overlay instance. */ constructor() { /** * * @type {jQuery} */ this.$overlay = null; } /** * Template method which should be used by subclasses to provide the overlay * content. The contents provided by this method are later subject to * the translation using {@link APP.translation.translateElement}. * @return {string} HTML representation of the overlay dialog contents. * @private */ _buildOverlayContent() { return ''; } /** * Constructs the HTML body of the overlay dialog. * * @param isLightOverlay indicates that this will be a light overlay look * and feel. */ buildOverlayHtml(isLightOverlay) { let overlayContent = this._buildOverlayContent(); let containerClass = isLightOverlay ? "overlay__container-light" : "overlay__container"; this.$overlay = $(`