Skip to content

Commit

Permalink
meh…
Browse files Browse the repository at this point in the history
  • Loading branch information
dgrammatiko committed Oct 13, 2019
1 parent b20e7bb commit 5acdf71
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@
* @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.submitbutton = function(task) {
if (task === "actionlogs.exportLogs") {
Joomla.submitform(task, document.getElementById("exportForm"));
Joomla.submitbutton = (task) => {
'use strict';

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

return;
}

if (task === "actionlogs.exportSelectedLogs") {
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"));
document.exportForm.cids.value = cids.join(',');
Joomla.submitform(task, document.getElementById('exportForm'));

return;
}
Expand Down

0 comments on commit 5acdf71

Please sign in to comment.