CoreFiles by mySites.guru
admin-actionlogs-default.js35 lines, 1,010 bytes, from Joomla_4.0.0-beta7-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta6
md5
b93341c7c487ee607178b4a5c7dcc08b
sha1
a79003a4de1f89bb70255d261401a6753742e120
sha256
5894228f164f709a861cd14daf0f918f9c6e518ecfbc726e3b0be511bbde921e
/**
* 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 = function (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
    var cids = [];
    var elements = [].slice.call(document.querySelectorAll("input[name='cid[]']:checked"));

    if (elements.length) {
      elements.forEach(function (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.