CoreFiles by mySites.guru
admin-actionlogs-default.es6.js35 lines, 998 bytes, from Joomla_4.0.0-beta6-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta5
md5
8520c5bd031dc56a98c4b5cb860fea43
sha1
225035cf122693e9b1fb17ac16af38d6d90ea7b7
sha256
54acb483b0772da634b153ca160ee3274a65ba86a45dc3d4c94349cd49b1f61f
/**
* 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.submitbutton = task => {
  'use strict';

  if (task === 'actionlogs.exportLogs') {
    Joomla.submitform(task, document.getElementById('exportForm'));
    return;
  }

  if (task === 'actionlogs.exportSelectedLogs') {
    // Get id of selected action logs item and pass it to export form hidden input
    const cids = [];
    const elements = [].slice.call(document.querySelectorAll("input[name='cid[]']:checked"));

    if (elements.length) {
      elements.forEach(element => {
        cids.push(element.value);
      });
    }

    document.exportForm.cids.value = cids.join(',');
    Joomla.submitform(task, document.getElementById('exportForm'));
    return;
  }

  Joomla.submitform(task);
};

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.