refactorizacion v4.8 index
This commit is contained in:
+10
-9
@@ -398,6 +398,15 @@ function closeModal(modalId) {
|
||||
const el = document.getElementById('step-' + id);
|
||||
if (el) el.classList.add('active');
|
||||
|
||||
const backBtn = document.getElementById('global-quiz-back-btn');
|
||||
if (backBtn) {
|
||||
if (id == 1 || id === '1' || id === 'result') {
|
||||
backBtn.style.display = 'none';
|
||||
} else {
|
||||
backBtn.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
updateProgress(id);
|
||||
updateIndicator(id);
|
||||
}
|
||||
@@ -415,15 +424,7 @@ function closeModal(modalId) {
|
||||
}
|
||||
|
||||
function updateIndicator(id) {
|
||||
const label = document.getElementById('quiz-step-indicator');
|
||||
if (!label) return;
|
||||
|
||||
let text = '';
|
||||
if (id === 'result') text = '¡Orientación lista!';
|
||||
else if (['2a', '2b', '2c', '2d'].includes(String(id))) text = 'Paso 2 de 4';
|
||||
else text = 'Paso ' + id + ' de 4';
|
||||
|
||||
label.textContent = text;
|
||||
// El indicador de pasos (Paso X de 4) fue removido del HTML a petición del usuario.
|
||||
}
|
||||
|
||||
function renderResult(ans) {
|
||||
|
||||
Reference in New Issue
Block a user