CoreFiles by mySites.guru
admin-select-modal-es5.js35 lines, 1,212 bytes, from Joomla_4.3.3-Stable-Full_Package.zip
Raw History Compare with 4.3.2
md5
f614ee3c8feb7bbd06b24baa555d5cfd
sha1
86cc20d0b507029979aba69d93ab970ab8c9f034
sha256
a2561e086590189df37c46951c1a2d29fcce5dfca2dc7ccdef198f5732a0a681
(function () {
  'use strict';

  /**
   * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   */

  (function (document) {
    document.addEventListener('DOMContentLoaded', function () {
      var elems = document.querySelectorAll('#new-modules-list a.select-link');
      elems.forEach(function (elem) {
        elem.addEventListener('click', function (_ref) {
          var currentTarget = _ref.currentTarget,
            target = _ref.target;
          var targetElem = currentTarget;

          // There is some bug with events in iframe where currentTarget is "null"
          // => prevent this here by bubble up
          if (!targetElem) {
            targetElem = target;
            if (targetElem && !targetElem.classList.contains('select-link')) {
              targetElem = targetElem.parentNode;
            }
          }
          var functionName = targetElem.getAttribute('data-function');
          if (functionName && typeof window.parent[functionName] === 'function') {
            window.parent[functionName](targetElem);
          }
        });
      });
    });
  })(document);

})();

The same content is in 57 releases, Joomla 4.3.0-alpha1 to 5.0.0-alpha1. See them all, or every version of this file.