CoreFiles by mySites.guru
admin-associations-modal.es6.js27 lines, 993 bytes, from Joomla_4.0.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta
md5
d2298f3dbbc8aa2e65e9d2165af19d51
sha1
c6b6a31cd5fe17090a13e4e3b32302fa87172193
sha256
25d4cfd06b0ba41403a56d3513f5ff5876e3a2d2984368937cd927662d370135
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
Joomla = window.Joomla || {};

((Joomla, document) => {
  'use strict';

  document.addEventListener('DOMContentLoaded', () => {
    const targetAssociation = window.parent.document.getElementById('target-association');
    const links = [].slice.call(document.querySelectorAll('.select-link'));
    links.forEach(item => {
      item.addEventListener('click', ({
        target
      }) => {
        targetAssociation.src = `${targetAssociation.getAttribute('data-editurl')}&task=${targetAssociation.getAttribute('data-item')}.edit&id=${parseInt(target.getAttribute('data-id'), 10)}`;
        window.parent.Joomla.Modal.getCurrent().close();
      });
    });
  });
})(Joomla, document);

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.