CoreFiles by mySites.guru
admin-template-toggle-assignment.js20 lines, 630 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
1b86423ed91bd3c839c918c2722b3a08
sha1
a4c9eea9866836e5463a4937a923822961016c55
sha256
c40b4659b1182cf0b2aa70632857e2fab06a64a5ded478d710e89d540004b7f1
/**
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

Joomla = window.Joomla || {};
(Joomla => {
  Joomla.toggleAll = () => {
    const checkBoxes = [].slice.call(document.querySelectorAll('.chk-menulink'));
    checkBoxes.forEach(checkBox => {
      checkBox.checked = !checkBox.checked;
    });
  };
  Joomla.toggleMenutype = a => {
    const checkBox = [].slice.call(document.getElementsByClassName(`menutype-${a}`));
    checkBox.forEach(element => {
      element.checked = !element.checked;
    });
  };
})(Joomla);

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