updated
This commit is contained in:
130
index.html
130
index.html
@@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="es">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
@@ -60,6 +61,7 @@
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
|
||||
.link,
|
||||
a {
|
||||
color: lightblue;
|
||||
@@ -67,6 +69,7 @@
|
||||
}
|
||||
|
||||
@media print {
|
||||
|
||||
.supermesh-indicator,
|
||||
.no_print {
|
||||
display: none;
|
||||
@@ -187,11 +190,12 @@
|
||||
color: white;
|
||||
}
|
||||
|
||||
|
||||
table {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
overflow-x: scroll;
|
||||
line-break: loose;
|
||||
/* max-width: 100%; */
|
||||
max-width: 100%;
|
||||
width: fit-content;
|
||||
/* min-width: 500px; */
|
||||
border: 1px solid black;
|
||||
@@ -241,11 +245,13 @@
|
||||
font-size: x-small;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.activeSCButton {
|
||||
border: 7px dashed beige;
|
||||
color: beige;
|
||||
background: black !important;
|
||||
}
|
||||
|
||||
.btn1.activeSCButton {
|
||||
border-color: #ff0000;
|
||||
color: #ff0000;
|
||||
@@ -285,6 +291,7 @@
|
||||
border-color: #147df5;
|
||||
color: #147df5;
|
||||
}
|
||||
|
||||
hr {
|
||||
border-color: black;
|
||||
border-style: solid;
|
||||
@@ -304,6 +311,7 @@
|
||||
left: 50%;
|
||||
bottom: 30px;
|
||||
}
|
||||
|
||||
#snackbar a {
|
||||
color: lightblue;
|
||||
}
|
||||
@@ -312,10 +320,7 @@
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
href="static/toastr.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link href="static/toastr.min.css" rel="stylesheet" />
|
||||
<!--<link rel="stylesheet" href="static/simplemde.min.css">-->
|
||||
</head>
|
||||
|
||||
@@ -323,9 +328,7 @@
|
||||
<details class="supermesh-indicator">
|
||||
<summary>
|
||||
<b>SuperMesh</b><br />
|
||||
<br /><small id="peerPID" style="font-family: monospace"
|
||||
>PID ??????????</small
|
||||
>
|
||||
<br /><small id="peerPID" style="font-family: monospace">PID ??????????</small>
|
||||
</summary>
|
||||
<ul id="peerList"></ul>
|
||||
<i>Todos los datos están encriptados.</i>
|
||||
@@ -334,31 +337,21 @@
|
||||
<header class="no_print" id="header_hide_query">
|
||||
<details id="LinkAccount_details" open>
|
||||
<summary>
|
||||
<b
|
||||
>TeleSec - <span id="groupId">???</span> - (<span id="peerCount"
|
||||
>?</span
|
||||
>
|
||||
nodos)</b
|
||||
>
|
||||
<b>TeleSec - <span id="groupId">???</span> - (<span id="peerCount">?</span>
|
||||
nodos)</b>
|
||||
</summary>
|
||||
<fieldset id="auth_fieldSet">
|
||||
<legend>Credenciales</legend>
|
||||
<br />
|
||||
<label
|
||||
>Codigo de grupo:<br />
|
||||
<input type="text" id="LinkAccount_group"
|
||||
/></label>
|
||||
<label>Codigo de grupo:<br />
|
||||
<input type="text" id="LinkAccount_group" /></label>
|
||||
<br />
|
||||
<br />
|
||||
<label
|
||||
>Clave secreta:<br />
|
||||
<input type="text" id="LinkAccount_secret"
|
||||
/></label>
|
||||
<label>Clave secreta:<br />
|
||||
<input type="text" id="LinkAccount_secret" /></label>
|
||||
<br /><br />
|
||||
<button
|
||||
type="button"
|
||||
onclick='LinkAccount(document.getElementById("LinkAccount_group").value, document.getElementById("LinkAccount_secret").value, true)'
|
||||
>
|
||||
<button type="button"
|
||||
onclick='LinkAccount(document.getElementById("LinkAccount_group").value, document.getElementById("LinkAccount_secret").value, true)'>
|
||||
Iniciar sesión
|
||||
</button>
|
||||
</fieldset>
|
||||
@@ -400,6 +393,7 @@
|
||||
<!--<script src="static/synchronous.js"></script>-->
|
||||
<!--<script src="static/axe.js"></script>-->
|
||||
<script src="static/toastr.min.js"></script>
|
||||
<script src="static/doublescroll.js"></script>
|
||||
<!--<script src="static/simplemde.min.js"></script>-->
|
||||
<script async>
|
||||
async function getQuota(cb = () => { }) {
|
||||
@@ -545,6 +539,9 @@
|
||||
}
|
||||
</script>
|
||||
<script id="app_logic">
|
||||
function tableScroll(query) {
|
||||
$(query).doubleScroll();
|
||||
}
|
||||
//var secretTokenEl = document.getElementById("secretToken");
|
||||
var groupIdEl = document.getElementById("groupId");
|
||||
var container = document.getElementById("container");
|
||||
@@ -1467,7 +1464,7 @@
|
||||
container.innerHTML = `
|
||||
<h1>Materiales</h1>
|
||||
<button id="${btn_new}">Nuevo Material</button>
|
||||
<table>
|
||||
<table id="scrolltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Referencia</th>
|
||||
@@ -1481,6 +1478,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
`;
|
||||
tableScroll("#scrolltable")
|
||||
var tablebody_EL = document.getElementById(tablebody);
|
||||
var rows = {};
|
||||
function render() {
|
||||
@@ -1582,12 +1580,9 @@
|
||||
var falta = min - act;
|
||||
if (act < min) {
|
||||
var new_tr = document.createElement("span");
|
||||
new_tr.innerHTML = `<b>${
|
||||
data.Nombre || "?"
|
||||
}</b><br>Faltan ${falta || "?"} ${
|
||||
data.Unidad || "?"
|
||||
} <br><i style="font-size: 75%">${
|
||||
data.Ubicacion || "?"
|
||||
new_tr.innerHTML = `<b>${data.Nombre || "?"
|
||||
}</b><br>Faltan ${falta || "?"} ${data.Unidad || "?"
|
||||
} <br><i style="font-size: 75%">${data.Ubicacion || "?"
|
||||
}</i>`;
|
||||
new_tr.className = PAGES["materiales"].navcss;
|
||||
new_tr.style.display = "inline-block";
|
||||
@@ -1645,14 +1640,10 @@
|
||||
.forEach((data) => {
|
||||
if (data.Puntos >= 10) {
|
||||
var new_tr = document.createElement("span");
|
||||
new_tr.innerHTML = `<img src="${
|
||||
data.Foto || ""
|
||||
}" alt="" height="55" style="float: left; margin-right: 5px;"><b>${
|
||||
data.Nombre || "?"
|
||||
}</b><br>Tiene ${
|
||||
data.Puntos || "?"
|
||||
} puntos <br><i style="font-size: 75%">${
|
||||
data.Region || "?"
|
||||
new_tr.innerHTML = `<img src="${data.Foto || ""
|
||||
}" alt="" height="55" style="float: left; margin-right: 5px;"><b>${data.Nombre || "?"
|
||||
}</b><br>Tiene ${data.Puntos || "?"
|
||||
} puntos <br><i style="font-size: 75%">${data.Region || "?"
|
||||
}</i>`;
|
||||
new_tr.className = PAGES["personas"].navcss;
|
||||
new_tr.style.display = "inline-block";
|
||||
@@ -1840,7 +1831,7 @@
|
||||
container.innerHTML = `
|
||||
<h1>Personas</h1>
|
||||
<button id="${btn_new}">Nueva Persona</button>
|
||||
<table>
|
||||
<table id="scrolltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Nombre</th>
|
||||
@@ -1853,6 +1844,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
`;
|
||||
tableScroll("#scrolltable") // id="scrolltable"
|
||||
var tablebody_EL = document.getElementById(tablebody);
|
||||
var rows = {};
|
||||
function render() {
|
||||
@@ -1874,10 +1866,8 @@
|
||||
var btn_comanda = safeuuid();
|
||||
var new_tr = document.createElement("tr");
|
||||
new_tr.innerHTML = `
|
||||
<td class="TextBorder" style="background-color: ${
|
||||
data.SC_Anilla
|
||||
}; text-align: center"><img src="${
|
||||
data.Foto ||
|
||||
<td class="TextBorder" style="background-color: ${data.SC_Anilla
|
||||
}; text-align: center"><img src="${data.Foto ||
|
||||
"static/ico/user_generic.png"
|
||||
}" height="50"> <br> ${data.Nombre || ""}</td>
|
||||
<td>${data.Region || "?"}</td>
|
||||
@@ -2084,7 +2074,7 @@
|
||||
container.innerHTML = `
|
||||
<h1>SuperCafé</h1>
|
||||
<button id="${btn_new}">Nueva comanda</button>
|
||||
<table>
|
||||
<table id="scrolltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Zona</th>
|
||||
@@ -2099,6 +2089,7 @@
|
||||
</table>
|
||||
`;
|
||||
|
||||
tableScroll("#scrolltable") // id="scrolltable"
|
||||
var tablebody_EL = document.getElementById(tablebody);
|
||||
var rows2 = {};
|
||||
function render() {
|
||||
@@ -2147,15 +2138,11 @@
|
||||
}
|
||||
new_tr.innerHTML = `
|
||||
<td>${persona.Region.toUpperCase() || "?"}</td>
|
||||
<td class="TextBorder" style="background-color: ${
|
||||
persona.SC_Anilla
|
||||
}; text-align: center; font-size: 17px;"><img src="${
|
||||
persona.Foto ||
|
||||
<td class="TextBorder" style="background-color: ${persona.SC_Anilla
|
||||
}; text-align: center; font-size: 17px;"><img src="${persona.Foto ||
|
||||
"static/ico/user_generic.png"
|
||||
}" height="50"><br> ${
|
||||
persona.Nombre || ""
|
||||
}<br> <span style="font-size: 25px;">${
|
||||
persona.Puntos || "0"
|
||||
}" height="50"><br> ${persona.Nombre || ""
|
||||
}<br> <span style="font-size: 25px;">${persona.Puntos || "0"
|
||||
} pts.</span></td>
|
||||
<td style="font-size: 17px;">
|
||||
<button id="${btn_Pedido}" class="">Pedido</button>
|
||||
@@ -2163,8 +2150,7 @@
|
||||
<br><button id="${btn_Hecho}" class="">Hecho</button>
|
||||
<br><button id="${btn_Entregado}" class="">Entregado</button>
|
||||
<br><button id="${btn_Pagado}" class="">Pagado</button></td>
|
||||
<td><pre style="font-size: 17px;">${
|
||||
SC_parse(JSON.parse(data.Comanda)) +
|
||||
<td><pre style="font-size: 17px;">${SC_parse(JSON.parse(data.Comanda)) +
|
||||
"<hr>" +
|
||||
data.Notas
|
||||
}</pre></td>
|
||||
@@ -2347,8 +2333,7 @@
|
||||
${Object.entries(SC_Personas)
|
||||
.sort(PERSONAS_Sorter)
|
||||
.map((entry) => {
|
||||
return `<option value="${entry[0]}">${
|
||||
entry[1].Nombre || "?"
|
||||
return `<option value="${entry[0]}">${entry[1].Nombre || "?"
|
||||
}</option>`;
|
||||
})
|
||||
.join("")}
|
||||
@@ -2362,8 +2347,7 @@
|
||||
${Object.entries(SC_Personas)
|
||||
.sort(PERSONAS_Sorter)
|
||||
.map((entry) => {
|
||||
return `<option value="${entry[0]}">${
|
||||
entry[1].Nombre || "?"
|
||||
return `<option value="${entry[0]}">${entry[1].Nombre || "?"
|
||||
}</option>`;
|
||||
})
|
||||
.join("")}
|
||||
@@ -2467,7 +2451,7 @@
|
||||
container.innerHTML = `
|
||||
<h1>Notificaciones</h1>
|
||||
<button id="${btn_new}">Nueva notificación</button>
|
||||
<table>
|
||||
<table id="scrolltable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Fecha</th>
|
||||
@@ -2480,6 +2464,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
`;
|
||||
tableScroll("#scrolltable") // id="scrolltable"
|
||||
var tablebody_EL = document.getElementById(tablebody);
|
||||
var rows = {};
|
||||
function render() {
|
||||
@@ -2502,21 +2487,15 @@
|
||||
var persona_destino = SC_Personas[data.Destino];
|
||||
new_tr.innerHTML = `
|
||||
<td>${data.Fecha || "????-??-??"}</td>
|
||||
<td class="TextBorder" style="background-color: ${
|
||||
persona_origen.SC_Anilla
|
||||
}; text-align: center"><img src="${
|
||||
persona_origen.Foto ||
|
||||
<td class="TextBorder" style="background-color: ${persona_origen.SC_Anilla
|
||||
}; text-align: center"><img src="${persona_origen.Foto ||
|
||||
"static/ico/user_generic.png"
|
||||
}" height="50"><br> ${persona_origen.Nombre || ""}<br> ${
|
||||
persona_origen.Puntos || "?"
|
||||
}" height="50"><br> ${persona_origen.Nombre || ""}<br> ${persona_origen.Puntos || "?"
|
||||
} punto(s)
|
||||
</td><td class="TextBorder" style="background-color: ${
|
||||
persona_destino.SC_Anilla
|
||||
}; text-align: center"><img src="${
|
||||
persona_destino.Foto ||
|
||||
</td><td class="TextBorder" style="background-color: ${persona_destino.SC_Anilla
|
||||
}; text-align: center"><img src="${persona_destino.Foto ||
|
||||
"static/ico/user_generic.png"
|
||||
}" height="50"><br> ${persona_destino.Nombre || ""}<br> ${
|
||||
persona_destino.Puntos || "?"
|
||||
}" height="50"><br> ${persona_destino.Nombre || ""}<br> ${persona_destino.Puntos || "?"
|
||||
} punto(s)</td>
|
||||
<td>${data.Asunto || "?"}</td>
|
||||
`;
|
||||
@@ -2571,4 +2550,5 @@
|
||||
open_page(location.hash.replace("#", ""));
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
83
static/doublescroll.js
Normal file
83
static/doublescroll.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* @name DoubleScroll
|
||||
* @desc displays scroll bar on top and on the bottom of the div
|
||||
* @requires jQuery, jQueryUI
|
||||
*
|
||||
* @author Pawel Suwala - http://suwala.eu/
|
||||
* @version 0.3 (12-03-2014)
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
(function($){
|
||||
$.widget("suwala.doubleScroll", {
|
||||
options: {
|
||||
contentElement: undefined, // Widest element, if not specified first child element will be used
|
||||
topScrollBarMarkup: '<div class="suwala-doubleScroll-scroll-wrapper" style="height: 20px;"><div class="suwala-doubleScroll-scroll" style="height: 20px;"></div></div>',
|
||||
topScrollBarInnerSelector: '.suwala-doubleScroll-scroll',
|
||||
scrollCss: {
|
||||
'overflow-x': 'scroll',
|
||||
'overflow-y':'hidden'
|
||||
},
|
||||
contentCss: {
|
||||
'overflow-x': 'scroll',
|
||||
'overflow-y':'hidden'
|
||||
}
|
||||
},
|
||||
_create : function() {
|
||||
var self = this;
|
||||
var contentElement;
|
||||
|
||||
// add div that will act as an upper scroll
|
||||
var topScrollBar = $($(self.options.topScrollBarMarkup));
|
||||
self.element.before(topScrollBar);
|
||||
|
||||
// find the content element (should be the widest one)
|
||||
if (self.options.contentElement !== undefined && self.element.find(self.options.contentElement).length !== 0) {
|
||||
contentElement = self.element.find(self.options.contentElement);
|
||||
}
|
||||
else {
|
||||
contentElement = self.element.find('>:first-child');
|
||||
}
|
||||
|
||||
// bind upper scroll to bottom scroll
|
||||
topScrollBar.scroll(function(){
|
||||
self.element.scrollLeft(topScrollBar.scrollLeft());
|
||||
});
|
||||
|
||||
// bind bottom scroll to upper scroll
|
||||
self.element.scroll(function(){
|
||||
topScrollBar.scrollLeft(self.element.scrollLeft());
|
||||
});
|
||||
|
||||
// apply css
|
||||
topScrollBar.css(self.options.scrollCss);
|
||||
self.element.css(self.options.contentCss);
|
||||
|
||||
// set the width of the wrappers
|
||||
$(self.options.topScrollBarInnerSelector, topScrollBar).width(contentElement[0].scrollWidth);
|
||||
topScrollBar.width(self.element[0].clientWidth);
|
||||
},
|
||||
refresh: function(){
|
||||
// this should be called if the content of the inner element changed.
|
||||
// i.e. After AJAX data load
|
||||
var self = this;
|
||||
var contentElement;
|
||||
var topScrollBar = self.element.parent().find('.suwala-doubleScroll-scroll-wrapper');
|
||||
|
||||
// find the content element (should be the widest one)
|
||||
if (self.options.contentElement !== undefined && self.element.find(self.options.contentElement).length !== 0) {
|
||||
contentElement = self.element.find(self.options.contentElement);
|
||||
}
|
||||
else {
|
||||
contentElement = self.element.find('>:first-child');
|
||||
}
|
||||
|
||||
// set the width of the wrappers
|
||||
$(self.options.topScrollBarInnerSelector, topScrollBar).width(contentElement[0].scrollWidth);
|
||||
topScrollBar.width(self.element[0].clientWidth);
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
3
sw.js
3
sw.js
@@ -1,4 +1,4 @@
|
||||
var cacheName = 'telesec_2025-05-28_2';
|
||||
var cacheName = 'telesec_2025-05-29_1';
|
||||
|
||||
self.addEventListener('install', event => {
|
||||
event.waitUntil(
|
||||
@@ -9,6 +9,7 @@ self.addEventListener('install', event => {
|
||||
"index.html",
|
||||
"manifest.json",
|
||||
"static/axe.js",
|
||||
"static/doublescroll.js",
|
||||
"static/gun.js",
|
||||
"static/jquery.js",
|
||||
"static/load.js",
|
||||
|
||||
Reference in New Issue
Block a user