Merge pull request 'test' (#11) from test into master
gitea/worker-time-control/pipeline/head This commit looks good
Details
gitea/worker-time-control/pipeline/head This commit looks good
Details
Reviewed-on: #11 Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
dde4b8757a
|
@ -7,6 +7,13 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
function setEvents() {
|
function setEvents() {
|
||||||
|
const heartEl = document.querySelector('body > h1 > span');
|
||||||
|
heartEl.addEventListener('click', function() {
|
||||||
|
const key = prompt('Introduce la clave');
|
||||||
|
if (key === null) return
|
||||||
|
localStorage.setItem('vnKey', key);
|
||||||
|
});
|
||||||
|
|
||||||
$(".btnnum").on("click", function () {
|
$(".btnnum").on("click", function () {
|
||||||
pin += parseInt($(this).children().html());
|
pin += parseInt($(this).children().html());
|
||||||
$("#txtPin").text(pin);
|
$("#txtPin").text(pin);
|
||||||
|
|
|
@ -19,6 +19,11 @@ function printError(msg){
|
||||||
$.ajaxPrefilter(function(xhr) {
|
$.ajaxPrefilter(function(xhr) {
|
||||||
var orgErrorHandler = xhr.error;
|
var orgErrorHandler = xhr.error;
|
||||||
|
|
||||||
|
var key = localStorage.getItem('vnKey');
|
||||||
|
if (key) {
|
||||||
|
xhr.jsonData.push(key)
|
||||||
|
}
|
||||||
|
|
||||||
Object.assign(xhr, {
|
Object.assign(xhr, {
|
||||||
url: `${urlBase}/workerTimeControl/${xhr.urlPath}`,
|
url: `${urlBase}/workerTimeControl/${xhr.urlPath}`,
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "es.verdnatura.worker-time-control",
|
"name": "es.verdnatura.worker-time-control",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
Loading…
Reference in New Issue