PageSourceSearch

https://maping.glaciaresargentinos.gob.ar:8443/visor_ing_v112025/src/js/components/config-tool/configWindow.js

js glaciaresargentinos.gob.ar collected 2026-09-24 22:19:45 UTC 2,291 bytes, 74 lines download raw bytes

1class configWindow {
2  constructor() {}
3
4  createComponent() {
5    const configWrapper = document.createElement("div");
6    configWrapper.id = "configWrapper";
7    configWrapper.style = "top: 100px; left: 1000px; position: absolute;";
8    configWrapper.innerHTML = app.configToolMain.name;
9
10    let btncloseConfig = document.createElement("a");
11    btncloseConfig.id = "btnClose-config";
12    btncloseConfig.href = "javascript:void(0)";
13    btncloseConfig.style = "float:right; color:#676767; overflow-y:auto;";
14    btncloseConfig.innerHTML = '<i class="fa fa-times"></i>';
15    btncloseConfig.onclick = () => {
16      configWrapper.remove();
17    };
18    configWrapper.appendChild(btncloseConfig);
19
20    const configWindow = document.createElement("div");
21    configWindow.id = "configWindow";
22    configWrapper.appendChild(configWindow);
23
24    // Crear el formulario
25    const form = document.createElement("form");
26    form.id = "configForm";
27
28    const tools = app.tools;
29    for (const key in tools) {
30      if (
31        tools.hasOwnProperty(key) &&
32        tools[key].hasOwnProperty("isActive") &&
33        tools[key].isActive == true
34      ) {
35        const label = document.createElement("label");
36        label.htmlFor = key;
37        label.innerText = tools[key].name;
38
39        const checkbox = document.createElement("input");
40        checkbox.type = "checkbox";
41        checkbox.id = key;
42        checkbox.name = tools[key].name;
43        checkbox.checked = tools[key].isActive;
44
45        form.appendChild(checkbox);
46        form.appendChild(label);
47        form.appendChild(document.createElement("br"));
48      }
49    }
50
51    // Añadir botón de submit
52    const submitButton = document.createElement("button");
53    submitButton.type = "submit";
54    submitButton.innerText = "Aceptar";
55    submitButton.onclick = (e) => {
56      e.preventDefault();
57      const checkboxes = form.querySelectorAll("input[type='checkbox']");
58      checkboxes.forEach((checkbox) => {
59        app.tools[checkbox.id].isActive = checkbox.checked;
60      });
61    };
62
63    form.appendChild(submitButton);
64    configWindow.appendChild(form);
65
66    document.body.appendChild(configWrapper);
67
68    $("#configWrapper").draggable({
69      scroll: false,
70      cancel: "#configWindow",
71      containment: "body",
72    });
73  }
74}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.