X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/h5p/h5plib/v124/joubel/core/js
home
/
cbholdings
/
pasukulu
/
h5p
/
h5plib
/
v124
/
joubel
/
core
/
js
/
📁
..
📄
h5p-action-bar.js
(2.87 KB)
📄
h5p-confirmation-dialog.js
(12.21 KB)
📄
h5p-content-type.js
(1.26 KB)
📄
h5p-content-upgrade-process.js
(9.37 KB)
📄
h5p-content-upgrade-worker.js
(1.47 KB)
📄
h5p-content-upgrade.js
(11.29 KB)
📄
h5p-data-view.js
(11.95 KB)
📄
h5p-display-options.js
(1.28 KB)
📄
h5p-embed.js
(1.93 KB)
📄
h5p-event-dispatcher.js
(6.29 KB)
📄
h5p-hub-registration.js
(161.72 KB)
📄
h5p-hub-sharing.js
(235.33 KB)
📄
h5p-library-details.js
(10.7 KB)
📄
h5p-library-list.js
(4.22 KB)
📄
h5p-resizer.js
(3.57 KB)
📄
h5p-tooltip.js
(6.98 KB)
📄
h5p-utils.js
(12.51 KB)
📄
h5p-version.js
(926 B)
📄
h5p-x-api-event.js
(8.55 KB)
📄
h5p-x-api.js
(3.64 KB)
📄
h5p.js
(86.33 KB)
📄
jquery.js
(88.08 KB)
📄
request-queue.js
(11.41 KB)
📁
settings
Editing: h5p-action-bar.js
/** * @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('<ul class="h5p-actions"></ul>'); /** * 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('<li/>', { 'class': 'h5p-button h5p-noselect h5p-' + (customClass ? customClass : type), appendTo: $actions }); const $actionButton = H5P.jQuery('<button/>', { tabindex: 0, 'aria-label': H5P.t(type + 'Description'), html: H5P.t(type), on: { click: handler, keypress: function (e) { if (e.which === 32) { handler(); e.preventDefault(); // (since return false will block other inputs) } } }, appendTo: $actionList }); H5P.Tooltip($actionButton.get(0)); hasActions = true; }; // Register action bar buttons if (displayOptions.export || displayOptions.copy) { // Add export button addActionButton('reuse', 'export'); } if (displayOptions.copyright) { addActionButton('copyrights'); } if (displayOptions.embed) { addActionButton('embed'); } if (displayOptions.icon) { // Add about H5P button icon const $h5pLogo = H5P.jQuery('<li><a class="h5p-link" href="http://h5p.org" target="_blank" aria-label="' + H5P.t('h5pDescription') + '"></a></li>').appendTo($actions); H5P.Tooltip($h5pLogo.find('.h5p-link').get(0)); hasActions = true; } /** * Returns a reference to the dom element * * @return {H5P.jQuery} */ self.getDOMElement = function () { return $actions; }; /** * Does the actionbar contain actions? * * @return {Boolean} */ self.hasActions = function () { return hasActions; }; } ActionBar.prototype = Object.create(EventDispatcher.prototype); ActionBar.prototype.constructor = ActionBar; return ActionBar; })(H5P.jQuery, H5P.EventDispatcher);
Upload File
Create Folder