X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/h5p/h5plib/v124/joubel/editor/scripts
home
/
cbholdings
/
pasukulu
/
h5p
/
h5plib
/
v124
/
joubel
/
editor
/
scripts
/
📁
..
📄
h5p-hub-client.js
(331.61 KB)
📄
h5peditor-av.js
(21.38 KB)
📄
h5peditor-boolean.js
(1.99 KB)
📄
h5peditor-coordinates.js
(5.1 KB)
📄
h5peditor-dimensions.js
(4.26 KB)
📄
h5peditor-editor.js
(18.25 KB)
📄
h5peditor-file-uploader.js
(3.69 KB)
📄
h5peditor-file.js
(8.54 KB)
📄
h5peditor-form.js
(14 KB)
📄
h5peditor-fullscreen-bar.js
(2.7 KB)
📄
h5peditor-group.js
(10.39 KB)
📄
h5peditor-html.js
(17.01 KB)
📄
h5peditor-image-popup.js
(12.1 KB)
📄
h5peditor-image.js
(8.09 KB)
📄
h5peditor-init.js
(3.72 KB)
📄
h5peditor-library-list-cache.js
(3.38 KB)
📄
h5peditor-library-selector.js
(9.97 KB)
📄
h5peditor-library.js
(16.98 KB)
📄
h5peditor-list-editor.js
(10.4 KB)
📄
h5peditor-list.js
(9.08 KB)
📄
h5peditor-metadata-author-widget.js
(3.91 KB)
📄
h5peditor-metadata-changelog-widget.js
(7.5 KB)
📄
h5peditor-metadata.js
(14.66 KB)
📄
h5peditor-none.js
(918 B)
📄
h5peditor-number.js
(4.79 KB)
📄
h5peditor-pre-save.js
(3.62 KB)
📄
h5peditor-select.js
(3.24 KB)
📄
h5peditor-selector-hub.js
(7.76 KB)
📄
h5peditor-selector-legacy.js
(3.11 KB)
📄
h5peditor-semantic-structure.js
(7.39 KB)
📄
h5peditor-text.js
(3.15 KB)
📄
h5peditor-textarea.js
(2.68 KB)
📄
h5peditor.js
(53.53 KB)
Editing: h5peditor-selector-legacy.js
/* global ns */ /** * @class * @alias H5PEditor.SelectorLegacy */ ns.SelectorLegacy = function (libraries, selectedLibrary, changeLibraryDialog) { var self = this; H5P.EventDispatcher.call(this); var defaultLibraryParameterized = selectedLibrary ? selectedLibrary.replace('.', '-').toLowerCase() : undefined; this.currentLibrary = selectedLibrary; var options = '<option value="-">-</option>'; for (var i = 0; i < libraries.length; i++) { var library = libraries[i]; var libraryName = ns.libraryToString(library); // Never deny editing existing content // For new content deny old or restricted libs. if (selectedLibrary === libraryName || ((library.restricted === undefined || !library.restricted) && library.isOld !== true ) ) { options += '<option value="' + libraryName + '"'; if (libraryName === selectedLibrary || library.name === defaultLibraryParameterized) { options += ' selected="selected"'; } if (library.tutorialUrl !== undefined) { options += ' data-tutorial-url="' + library.tutorialUrl + '"'; } if (library.exampleUrl !== undefined) { options += ' data-example-url="' + library.exampleUrl + '"'; } options += '>' + library.title + (library.isOld===true ? ' (deprecated)' : '') + '</option>'; } } this.$selector = ns.$('' + '<select name="h5peditor-library" title="' + ns.t('core', 'selectLibrary') + '"' + '>' + options + '</select>' ).change(function () { // Use timeout to avoid bug in Chrome >44, when confirm is used inside change event. // Ref. https://code.google.com/p/chromium/issues/detail?id=525629 setTimeout(function () { if (!self.currentLibrary) { self.currentLibrary = self.$selector.val(); self.trigger('selected'); return; } self.currentLibrary = self.$selector.val(); changeLibraryDialog.show(self.$selector.offset().top); }, 0); }); }; /** * Reset selector to provided library * * @param {string} library * @param {Object} params * @param {Object} metadata */ ns.SelectorLegacy.prototype.resetSelection = function (library, params, metadata) { this.$selector.val(library); this.currentParams = params; this.currentMetadata = metadata; this.currentLibrary = library; }; /** * Get currently selected library. * * @returns {string} */ ns.SelectorLegacy.prototype.getSelectedLibrary = function (next) { var that = this; var $option = this.$selector.find(':selected'); next({ uberName: that.currentLibrary, tutorialUrl: $option.data('tutorial-url'), exampleUrl: $option.data('example-url') }); }; /** * Load new params into legacy selector * * @returns {undefined} */ ns.SelectorLegacy.prototype.getParams = function () { return this.currentParams; }; /** * Load new metadata into legacy selector * * @returns {undefined} */ ns.SelectorLegacy.prototype.getMetadata = function () { return this.currentMetadata; }; /** * Returns the html element for the hub * * @return {HTMLElement} */ ns.SelectorLegacy.prototype.getElement = function () { return this.$selector.get(0); };
Upload File
Create Folder