CoreFiles by mySites.guru
admin-template-toggle-assignment.es6.js28 lines, 817 bytes, from Joomla_4.0.0-alpha10-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha9
md5
9d225b9f0dca63c377da2bcd8478f530
sha1
f80ca43250c1da27f29606bdfa9bf5103830762a
sha256
ef3f4d4a38de8ab69a3def8cfbd2478e0a025ec66a28525b33429e32a802614f
/**
* 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 - 2019 Open Source Matters, Inc. All rights reserved.
 * @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'));
    const value = checkBoxes[0].checked;
    checkBoxes.forEach(checkBox => {
      checkBox.checked = !value;
    });
  };

  Joomla.toggleMenutype = a => {
    const checkBox = [].slice.call(document.getElementsByClassName(a));
    const value = checkBox[0].checked;
    checkBox.forEach(element => {
      element.checked = !value;
    });
  };
})(Joomla);

The same content is in 2 releases, Joomla 4.0.0-alpha10 to 4.0.0-alpha11. See them all, or every version of this file.