Update index.html
Browse files- index.html +49 -0
index.html
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>POZO DE JACOB CRISTO VIVE DE ANTÓN</title>
|
|
|
7 |
<style>
|
8 |
body {
|
9 |
font-family: Arial, sans-serif;
|
@@ -66,6 +67,9 @@
|
|
66 |
#footer {
|
67 |
font-size: 12px;
|
68 |
margin-top: 0px;
|
|
|
|
|
|
|
69 |
}
|
70 |
</style>
|
71 |
<link rel="icon" href="https://ia800509.us.archive.org/8/items/tcvl_20231025/TCVL%20%281%29.png" alt="Nuevo ícono"/>
|
@@ -247,11 +251,56 @@
|
|
247 |
<td contenteditable="true"></td>
|
248 |
</tr>
|
249 |
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
250 |
<button id="addRow">Agregar Fila</button>
|
251 |
<button id="printPDF">Imprimir PDF</button>
|
252 |
<p style="font-size: 10px; opacity: 0.5;">Equipo Digital Cristo Vive Por JairNay ❤️ Puerco-Frito-V15-2023</p>
|
253 |
</form>
|
254 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
document.addEventListener('DOMContentLoaded', function () {
|
256 |
const addRowButton = document.getElementById('addRow');
|
257 |
const printPDFButton = document.getElementById('printPDF');
|
|
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
<title>POZO DE JACOB CRISTO VIVE DE ANTÓN</title>
|
7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
|
8 |
<style>
|
9 |
body {
|
10 |
font-family: Arial, sans-serif;
|
|
|
67 |
#footer {
|
68 |
font-size: 12px;
|
69 |
margin-top: 0px;
|
70 |
+
}
|
71 |
+
#addCellIcon, #removeCellIcon, #addRowIcon, #removeRowIcon {
|
72 |
+
cursor: pointer;
|
73 |
}
|
74 |
</style>
|
75 |
<link rel="icon" href="https://ia800509.us.archive.org/8/items/tcvl_20231025/TCVL%20%281%29.png" alt="Nuevo ícono"/>
|
|
|
251 |
<td contenteditable="true"></td>
|
252 |
</tr>
|
253 |
</table>
|
254 |
+
<div id="icons">
|
255 |
+
<i id="addCellIcon" class="fas fa-plus" title="Agregar celda"></i>
|
256 |
+
<i id="removeCellIcon" class="fas fa-minus" title="Quitar celda"></i>
|
257 |
+
<i id="addRowIcon" class="fas fa-plus" title="Agregar fila"></i>
|
258 |
+
<i id="removeRowIcon" class="fas fa-minus" title="Quitar fila"></i>
|
259 |
+
</div>
|
260 |
<button id="addRow">Agregar Fila</button>
|
261 |
<button id="printPDF">Imprimir PDF</button>
|
262 |
<p style="font-size: 10px; opacity: 0.5;">Equipo Digital Cristo Vive Por JairNay ❤️ Puerco-Frito-V15-2023</p>
|
263 |
</form>
|
264 |
<script>
|
265 |
+
document.addEventListener('DOMContentLoaded', function () {
|
266 |
+
const donationTable = document.getElementById('donationTable');
|
267 |
+
const addCellIcon = document.getElementById('addCellIcon');
|
268 |
+
const removeCellIcon = document.getElementById('removeCellIcon');
|
269 |
+
const addRowIcon = document.getElementById('addRowIcon');
|
270 |
+
const removeRowIcon = document.getElementById('removeRowIcon');
|
271 |
+
|
272 |
+
addCellIcon.addEventListener('click', () => {
|
273 |
+
// Agregar celda
|
274 |
+
donationTable.rows[0].insertCell(-1).outerHTML = "<th contenteditable='true'></th>";
|
275 |
+
for (let i = 1; i < donationTable.rows.length; i++) {
|
276 |
+
donationTable.rows[i].insertCell(-1).outerHTML = "<td contenteditable='true'></td>";
|
277 |
+
}
|
278 |
+
});
|
279 |
+
|
280 |
+
removeCellIcon.addEventListener('click', () => {
|
281 |
+
// Quitar celda
|
282 |
+
for (let i = 0; i < donationTable.rows.length; i++) {
|
283 |
+
const cells = donationTable.rows[i].cells;
|
284 |
+
if (cells.length > 1) {
|
285 |
+
cells[cells.length - 1].remove();
|
286 |
+
}
|
287 |
+
}
|
288 |
+
});
|
289 |
+
|
290 |
+
addRowIcon.addEventListener('click', () => {
|
291 |
+
// Agregar fila
|
292 |
+
const newRow = donationTable.insertRow(-1);
|
293 |
+
for (let i = 0; i < donationTable.rows[0].cells.length; i++) {
|
294 |
+
newRow.insertCell(-1).outerHTML = "<td contenteditable='true'></td>";
|
295 |
+
}
|
296 |
+
});
|
297 |
+
|
298 |
+
removeRowIcon.addEventListener('click', () => {
|
299 |
+
// Quitar fila
|
300 |
+
if (donationTable.rows.length > 2) {
|
301 |
+
donationTable.deleteRow(-1);
|
302 |
+
}
|
303 |
+
});
|
304 |
document.addEventListener('DOMContentLoaded', function () {
|
305 |
const addRowButton = document.getElementById('addRow');
|
306 |
const printPDFButton = document.getElementById('printPDF');
|