CoreFiles by mySites.guru
admin-template-toggle-assignment.es6.js26 lines, 759 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
6ed10269029b4d11e8ff7e4ef52aec3f
sha1
5d27e3245d54c14acca49b0913a713f1963b72b9
sha256
06c6262345b5c4cbf7f635915f09b1eeb54fd7177c9267594f0cc41737f3640e
/**
* PLEASE DO NOT MODIFY THIS FILE. WORK ON THE ES6 VERSION.
* OTHERWISE YOUR CHANGES WILL BE REPLACED ON THE NEXT BUILD.
**/

/**
 * @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 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.