/* 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; /** * Indicates if this overlay should use the light look & feel or the * standard one. * @type {boolean} */ this.isLightOverlay = false; } /** * 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. * @protected */ _buildOverlayContent() { return ''; } /** * Constructs the HTML body of the overlay dialog. * * @private */ _buildOverlayHtml() { let overlayContent = this._buildOverlayContent(); let containerClass = this.isLightOverlay ? "overlay__container-light" : "overlay__container"; this.$overlay = $(`