/** * @class * @augments H5P.EventDispatcher * @param {Object} displayOptions * @param {boolean} displayOptions.export Triggers the display of the 'Download' button * @param {boolean} displayOptions.copyright Triggers the display of the 'Copyright' button * @param {boolean} displayOptions.embed Triggers the display of the 'Embed' button * @param {boolean} displayOptions.icon Triggers the display of the 'H5P icon' link */ H5P.ActionBar = (function ($, EventDispatcher) { "use strict"; function ActionBar(displayOptions) { EventDispatcher.call(this); /** @alias H5P.ActionBar# */ var self = this; var hasActions = false; // Create action bar var $actions = H5P.jQuery(''); /** * Helper for creating action bar buttons. * * @private * @param {string} type * @param {string} customClass Instead of type class */ var addActionButton = function (type, customClass) { /** * Handles selection of action */ var handler = function () { self.trigger(type); }; const $actionList = H5P.jQuery('
  • ', { 'class': 'h5p-button h5p-noselect h5p-' + (customClass ? customClass : type), appendTo: $actions }); const $actionButton = H5P.jQuery('