CoreFiles by mySites.guru
admin-associations-modal.js20 lines, 835 bytes, from Joomla_4.4.1-Stable-Full_Package.zip
Raw History Compare with 4.4.0
md5
1e12a0a762df5d5fe43fa1bbf27a2b83
sha1
86553a91f242cbb738ff7847acee83a715437ebb
sha256
3a8f9ab22774757a8a507cde88a5e6cbb3615f0766ae7c9dac6c19260755352f
/**
 * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
Joomla = window.Joomla || {};
((Joomla, document) => {

  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 214 releases, Joomla 4.3.0-alpha1 to 6.3.0-alpha1. See them all, or every version of this file.