CoreFiles by mySites.guru
default-batch-body.es6.js38 lines, 1,028 bytes, from Joomla_4.0.0-alpha9-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha8
md5
a2d192d5a07e6befa65b1b7af07ea859
sha1
bfcf1a56ee933b11b747575bd883740ee58d0b02
sha256
cc0ec0d61aa0feae30ba8e0713a55e8a996f4439cdba59556805a5547f32de77
/**
* 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
 */
(() => {
  const batchMenu = document.getElementById('batch-menu-id');
  const batchCopyMove = document.getElementById('batch-copy-move');
  let batchSelector;

  const onChange = () => {
    if (batchSelector.value !== 0 || batchSelector.value !== '') {
      batchCopyMove.style.display = 'block';
    } else {
      batchCopyMove.style.display = 'none';
    }
  };

  const onSelect = () => {
    if (batchMenu) {
      batchSelector = batchMenu;
    }

    if (batchCopyMove) {
      batchSelector.addEventListener('change', onChange);
    } // Cleanup


    document.removeEventListener('DOMContentLoaded', onSelect, true);
  }; // Document loaded


  document.addEventListener('DOMContentLoaded', onSelect, true);
})();

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