CoreFiles by mySites.guru
admin-template-toggle-assignment.js28 lines, 847 bytes, from Joomla_4.0.0-alpha11-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha10
md5
3b0ba5eb4a476dd529dacc10614554b2
sha1
45620c14637935166ecd767b7cff5719d9669feb
sha256
5898fde9f0f25061f22f73930e9e3e9c633d0b501590cb660466753e5755b350
/**
* 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 || {};

(function (Joomla) {
  Joomla.toggleAll = function () {
    var checkBoxes = [].slice.call(document.querySelectorAll('.chk-menulink'));
    var value = checkBoxes[0].checked;
    checkBoxes.forEach(function (checkBox) {
      checkBox.checked = !value;
    });
  };

  Joomla.toggleMenutype = function (a) {
    var checkBox = [].slice.call(document.getElementsByClassName(a));
    var value = checkBox[0].checked;
    checkBox.forEach(function (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.