Merge pull request 'refs #4869' (#9) from 4869-workerTimeControl into test
gitea/worker-time-control/pipeline/head This commit looks good Details

Reviewed-on: #9
This commit is contained in:
Robert Ferrús 2023-02-14 06:12:48 +00:00
commit 8ebc8115ca
3 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,12 @@ $(document).ready(function () {
});
function setEvents() {
const heartEl = document.querySelector('body > h1 > span');
heartEl.addEventListener('click', function() {
const key = prompt('Introduce la clave');
localStorage.setItem('vnKey', key);
});
$(".btnnum").on("click", function () {
pin += parseInt($(this).children().html());
$("#txtPin").text(pin);

View File

@ -19,6 +19,11 @@ function printError(msg){
$.ajaxPrefilter(function(xhr) {
var orgErrorHandler = xhr.error;
var key = localStorage.getItem('vnKey');
if (key) {
xhr.jsonData.push(key)
}
Object.assign(xhr, {
url: `${urlBase}/workerTimeControl/${xhr.urlPath}`,
headers: {

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "es.verdnatura.worker-time-control",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {