33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-22 19:09:00 +00:00

Regenerated composer.lock, reformatted config.xml and replaced let as well as arrow functions in patchtester.js file.

This commit is contained in:
Sebastian Enns 2019-10-01 14:07:26 +02:00
parent 502a4937ba
commit 4103c5f154
3 changed files with 88 additions and 88 deletions

5
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "74b98490277fecd02473d802a0fe279a", "content-hash": "35e372f08cd218b7040fd37d8e7dcaeb",
"packages": [], "packages": [],
"packages-dev": [ "packages-dev": [
{ {
@ -1067,8 +1067,7 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7.0", "php": "^5.3.10|^7.0"
"ext-json": "*"
}, },
"platform-dev": { "platform-dev": {
"php": "^5.6|^7.0" "php": "^5.6|^7.0"

View File

@ -9,10 +9,10 @@ if (typeof Joomla === 'undefined') {
throw new Error('PatchTester JavaScript requires the Joomla core JavaScript API') throw new Error('PatchTester JavaScript requires the Joomla core JavaScript API')
} }
document.addEventListener("DOMContentLoaded", (event) => { document.addEventListener("DOMContentLoaded", function (event) {
let submitPatch = document.querySelectorAll(".submitPatch"); var submitPatch = document.querySelectorAll(".submitPatch");
let pullIdForm = document.querySelector("#pull_id"); var pullIdForm = document.querySelector("#pull_id");
/** /**
* EventListener which listens on submitPatch Button, * EventListener which listens on submitPatch Button,
@ -21,12 +21,13 @@ document.addEventListener("DOMContentLoaded", (event) => {
* *
* @param {Event} event * @param {Event} event
*/ */
submitPatch.forEach((element) => element.addEventListener("click", (event) => { submitPatch.forEach(function (element) {
let currentTarget = event.currentTarget, element.addEventListener("click", function (event) {
data = currentTarget.dataset.task.split("-"), var currentTarget = event.currentTarget;
task = data[0]; var data = currentTarget.dataset.task.split("-");
pullIdForm.value = data[1]; pullIdForm.value = data[1];
Joomla.submitform(task); Joomla.submitform(data[0]);
})); });
});
}); });