[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/media/com_associations/js/ -> admin-associations-modal.js (source)

   1  /**
   2   * @copyright   (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   3   * @license     GNU General Public License version 2 or later; see LICENSE.txt
   4   */
   5  Joomla = window.Joomla || {};
   6  
   7  ((Joomla, document) => {
   8  
   9    document.addEventListener('DOMContentLoaded', () => {
  10      const targetAssociation = window.parent.document.getElementById('target-association');
  11      const links = [].slice.call(document.querySelectorAll('.select-link'));
  12      links.forEach(item => {
  13        item.addEventListener('click', ({
  14          target
  15        }) => {
  16          targetAssociation.src = `$targetAssociation.getAttribute('data-editurl')}&task=$targetAssociation.getAttribute('data-item')}.edit&id=$parseInt(target.getAttribute('data-id'), 10)}`;
  17          window.parent.Joomla.Modal.getCurrent().close();
  18        });
  19      });
  20    });
  21  })(Joomla, document);


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer