86 lines
3.7 KiB
PHP
Executable File
86 lines
3.7 KiB
PHP
Executable File
</main>
|
|
</div>
|
|
<!-- /#page-content-wrapper -->
|
|
|
|
<!-- Scripts -->
|
|
<script src="https://code.jquery.com/jquery-3.7.1.min.js" integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
|
|
<script src="<?php echo asset('js/summernote-bs5.min.js'); ?>" defer></script>
|
|
<script src="<?php echo asset('js/main.js'); ?>" defer></script>
|
|
|
|
<!-- Script para eliminar el Debug Language List -->
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const debugList = document.getElementById('debug-language-list');
|
|
if (debugList) {
|
|
debugList.remove();
|
|
}
|
|
|
|
// Fix para dropdowns en móvil
|
|
const dropdownToggles = document.querySelectorAll('.dropdown-toggle');
|
|
dropdownToggles.forEach(toggle => {
|
|
toggle.addEventListener('click', function(e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
|
|
// Obtener el elemento dropdown
|
|
const dropdown = this.closest('.dropdown') || this.parentElement;
|
|
const menu = this.nextElementSibling;
|
|
|
|
if (menu && menu.classList.contains('dropdown-menu')) {
|
|
// Toggle la clase 'show'
|
|
if (menu.classList.contains('show')) {
|
|
menu.classList.remove('show');
|
|
this.classList.remove('show');
|
|
this.setAttribute('aria-expanded', 'false');
|
|
} else {
|
|
// Cerrar otros dropdowns
|
|
document.querySelectorAll('.dropdown-menu.show').forEach(m => {
|
|
m.classList.remove('show');
|
|
m.previousElementSibling?.classList.remove('show');
|
|
});
|
|
|
|
menu.classList.add('show');
|
|
this.classList.add('show');
|
|
this.setAttribute('aria-expanded', 'true');
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
// Cerrar dropdowns al hacer clic en un item
|
|
const dropdownItems = document.querySelectorAll('.dropdown-item');
|
|
dropdownItems.forEach(item => {
|
|
item.addEventListener('click', function() {
|
|
// Cerrar todos los dropdowns
|
|
document.querySelectorAll('.dropdown-menu.show').forEach(m => {
|
|
m.classList.remove('show');
|
|
m.previousElementSibling?.classList.remove('show');
|
|
});
|
|
document.querySelectorAll('.dropdown-toggle.show').forEach(t => {
|
|
t.classList.remove('show');
|
|
t.setAttribute('aria-expanded', 'false');
|
|
});
|
|
});
|
|
});
|
|
|
|
// Cerrar dropdowns al hacer clic fuera
|
|
document.addEventListener('click', function(e) {
|
|
if (!e.target.closest('.dropdown') && !e.target.closest('.nav-item.dropdown')) {
|
|
document.querySelectorAll('.dropdown-menu.show').forEach(m => {
|
|
m.classList.remove('show');
|
|
m.previousElementSibling?.classList.remove('show');
|
|
});
|
|
document.querySelectorAll('.dropdown-toggle.show').forEach(t => {
|
|
t.classList.remove('show');
|
|
t.setAttribute('aria-expanded', 'false');
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<script src="/assets/js/translate_frontend.js"></script>
|
|
|
|
</body>
|
|
</html> |