Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
new [2026/06/15 07:58] – créée madumnew [2026/06/15 08:18] (Version actuelle) – madum
Ligne 1: Ligne 1:
-<!DOCTYPE html> +<html>
-<html lang="fr" data-bs-theme="light">+
  
-<head> 
-    <meta charset="UTF-8"> 
-    <title>Migration Tool - Marin Dumont</title> 
-    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"> 
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script> 
-    <style> 
-        body { 
-            padding-top: 70px; 
-            transition: background-color 0.3s; 
-        } 
  
-        .card { +<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> 
-            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
-        } +
- +
-        .btn-copy { +
-            font-size: 0.8em; +
-            margin-left: 5px; +
-            padding: 0px 5px; +
-        } +
- +
-        .flash-msg { +
-            color: #198754; +
-            font-weight: bold; +
-            margin-left: 5px; +
-            opacity: 0; +
-            transition: opacity 0.5s; +
-        } +
-    </style> +
-</head> +
- +
-<body> +
- +
-    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top"> +
-        <div class="container-fluid"> +
-            <a class="navbar-brand" href="#">MigrationTool</a> +
-            <div class="collapse navbar-collapse"> +
-                <ul class="navbar-nav me-auto mb-2 mb-lg-0"> +
-                    <li class="nav-item dropdown"> +
-                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">Mantis</a> +
-                        <ul class="dropdown-menu"> +
-                            <li><a class="dropdown-item" +
-                                    href="https://srv-mantis.cpasbru.be/mantisbt/bug_report_page.php" +
-                                    target="_blank">Créer un ticket</a></li> +
-                            <li><a class="dropdown-item" href="https://srv-mantis.cpasbru.be/mantisbt/my_view_page.php" +
-                                    target="_blank">Ma vue</a></li> +
-                        </ul> +
-                    </li> +
-                    <li class="nav-item"><a class="nav-link" href="https://srv-spx.cpasbru.be/ESS/" +
-                            target="_blank">Pointeuse</a></li> +
-                    <li class="nav-item"><a class="nav-link" href="https://intranet.cpasbru.be/drupal/fr" +
-                            target="_blank">Intranet</a></li> +
-                    <li class="nav-item"><a class="nav-link" href="http://srv-del-cont1.cpasbru.be/Director/" +
-                            target="_blank">Director</a></li> +
-                </ul> +
-                <div class="d-flex"> +
-                    <button class="btn btn-outline-light btn-sm" onclick="toggleTheme()" id="theme-btn">Thème +
-                        Sombre</button> +
-                </div> +
-            </div> +
-        </div> +
-    </nav>+
  
-    <div class="container card p-4">+<div class="dw-html-content"> 
 +    <div class="card">
         <h2 class="mb-4 text-primary">Migration Tool v3.3 (Compatible Firefox)</h2>         <h2 class="mb-4 text-primary">Migration Tool v3.3 (Compatible Firefox)</h2>
  
         <input type="file" id="file-picker" webkitdirectory directory multiple class="d-none">         <input type="file" id="file-picker" webkitdirectory directory multiple class="d-none">
-        <button onclick="document.getElementById('file-picker').click()" class="btn btn-outline-primary mb-3">Charger le +        <button onclick="document.getElementById('file-picker').click()" class="btn btn-outline-primary mb-3">Charger le dossier des Waves</button>
-            dossier des Waves</button>+
         <div id="statut-global" class="fw-bold mb-3"></div>         <div id="statut-global" class="fw-bold mb-3"></div>
  
Ligne 95: Ligne 35:
         </table>         </table>
     </div>     </div>
 +</div>
  
-    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> +<script> 
-    <script> +    let filesData = [];
-        let filesData = [];+
  
-        // Gestion du chargement via input type="file" +    document.getElementById('file-picker').addEventListener('change', async (event) => { 
-        document.getElementById('file-picker').addEventListener('change', async (event) => { +        filesData = Array.from(event.target.files).filter(f => f.name.match(/^Wave [1-4] - SIM - HRA - NTT\.xlsx$/)); 
-            filesData = Array.from(event.target.files).filter(f => f.name.match(/^Wave [1-4] - SIM - HRA - NTT\.xlsx$/)); +        document.getElementById('statut-global').innerText = `✔ ${filesData.length} fichiers chargés.`; 
-            document.getElementById('statut-global').innerText = `✔ ${filesData.length} fichiers chargés.`; +    });
-        });+
  
-        function toggleTheme() { +    function creerCellule(texte) { 
-            const html = document.documentElement; +        const td = document.createElement('td'); 
-            const btn = document.getElementById('theme-btn'); +        td.innerHTML = `<div class="d-flex align-items-center"><span class="text-truncate">${texte}</span><button class="btn btn-sm btn-outline-info btn-copy" onclick="copyToClipboard('${texte}', this)">📋</button><span class="flash-msg">✓</span></div>`; 
-            const isLight = html.getAttribute('data-bs-theme') === 'light'; +        return td; 
-            html.setAttribute('data-bs-theme', isLight ? 'dark' : 'light'); +    }
-            btn.innerText = isLight ? "Thème Sombre" : "Thème Clair"; +
-        }+
  
-        function creerCellule(texte) { +    function copyToClipboard(text, element) { 
-            const td = document.createElement('td'); +        navigator.clipboard.writeText(text); 
-            td.innerHTML = `<div class="d-flex align-items-center"><span class="text-truncate">${texte}</span><button class="btn btn-sm btn-outline-info btn-copy" onclick="copyToClipboard('${texte}', this)">📋</button><span class="flash-msg">✓</span></div>`; +        const flash = element.parentElement.querySelector('.flash-msg'); 
-            return td; +        flash.style.opacity = "1"; 
-        }+        setTimeout(() => { flash.style.opacity = "0"; }, 2000); 
 +    }
  
-        function copyToClipboard(text, element) { +    function effacer() { 
-            navigator.clipboard.writeText(text); +        document.getElementById('result-body').innerHTML = ""; 
-            const flash = element.parentElement.querySelector('.flash-msg'); +    }
-            flash.style.opacity = "1"; +
-            setTimeout(() => { flash.style.opacity = "0"; }, 2000); +
-        }+
  
-        function effacer() { +    async function rechercher() { 
-            document.getElementById('result-body').innerHTML = ""; +        const tbody = document.getElementById('result-body'); 
-        }+        tbody.innerHTML = ""; 
 +        const idQ = document.getElementById('id-in').value.toLowerCase(); 
 +        const prenomQ = document.getElementById('prenom-in').value.toLowerCase(); 
 +        const nomQ = document.getElementById('nom-in').value.toLowerCase();
  
-        async function rechercher() { +        for (let file of filesData) { 
-            const tbody = document.getElementById('result-body'); +            const data = await file.arrayBuffer(); 
-            tbody.innerHTML = ""; +            const wb = XLSX.read(data, { type: 'array' }); 
-            const idQ = document.getElementById('id-in').value.toLowerCase(); +            const json = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);
-            const prenomQ = document.getElementById('prenom-in').value.toLowerCase(); +
-            const nomQ = document.getElementById('nom-in').value.toLowerCase();+
  
-            for (let file of filesData) { +            json.forEach(row => { 
-                const data = await file.arrayBuffer(); +                const email = String(row['Email address'] || '').toLowerCase(); 
-                const wb = XLSX.read(data, { type: 'array' }); +                const parts = email.split('@')[0].split('.'); 
-                const json = XLSX.utils.sheet_to_json(wb.Sheets[wb.SheetNames[0]]);+                const prenom = parts[0] || ""; 
 +                const nom = parts[1] || "";
  
-                json.forEach(row => { +                if (String(row.ID || '').toLowerCase().includes(idQ) && 
-                    const email = String(row['Email address'] || '').toLowerCase(); +                    prenom.toLowerCase().includes(prenomQ) && 
-                    const parts = email.split('@')[0].split('.'); +                    nom.toLowerCase().includes(nomQ)) {
-                    const prenom = parts[0] || ""; +
-                    const nom = parts[1] || "";+
  
-                    if (String(row.ID || '').toLowerCase().includes(idQ) && +                    const tr = document.createElement('tr'); 
-                        prenom.toLowerCase().includes(prenomQ) && +                    tr.appendChild(creerCellule(file.name)); 
-                        nom.toLowerCase().includes(nomQ)) { +                    tr.appendChild(creerCellule(String(row.ID))); 
- +                    tr.appendChild(creerCellule(row.Name || (nom.toUpperCase() + ' ' + prenom))); 
-                        const tr = document.createElement('tr'); +                    tr.appendChild(creerCellule(row['Email address'] || '')); 
-                        tr.appendChild(creerCellule(file.name)); +                    tbody.appendChild(tr); 
-                        tr.appendChild(creerCellule(String(row.ID))); +                } 
-                        tr.appendChild(creerCellule(row.Name || (nom.toUpperCase() + ' ' + prenom))); +            });
-                        tr.appendChild(creerCellule(row['Email address'] || '')); +
-                        tbody.appendChild(tr); +
-                    } +
-                }); +
-            }+
         }         }
-    </script> +    } 
-</body> +</script>
 </html> </html>