MediaWiki:Common.js: mudanças entre as edições
Aparência
Sem resumo de edição |
Sem resumo de edição |
||
| Linha 14: | Linha 14: | ||
/* Tabela NR 04 Anexo 1 */ | /* Tabela NR 04 Anexo 1 */ | ||
$(function() { | $(function() { | ||
// | // Clique no Nível 2 abre o Nível 3 | ||
$('.linha-nivel-2').on('click', function() { | $('.linha-nivel-2').on('click', function() { | ||
$(this).nextUntil('.linha-nivel-2').filter('.linha-nivel-3').toggleClass('show'); | |||
$(this).nextUntil('.linha-nivel-2').filter('.linha-nivel-3'). | |||
}); | }); | ||
// | // Clique no Nível 3 abre o Nível 4 | ||
$('.linha-nivel-3').on('click', function() { | $('.linha-nivel-3').on('click', function(e) { | ||
// | // Impede que o clique no 3 dispare ações no 2 (se necessário) | ||
$(this).nextUntil('.linha-nivel-3').filter('.linha-nivel-4'). | e.stopPropagation(); | ||
$(this).nextUntil('.linha-nivel-3').filter('.linha-nivel-4').toggleClass('show'); | |||
}); | }); | ||
}); | }); | ||
Edição das 21h28min de 14 de julho de 2026
/* Página Normas - Texto Principal Lógica para Ativação de Notas Explicativas no texto de Norma/Anexo */
$(document).ready(function() {
// Varre todas as notas sobrescritas que possuem conteúdo vindo do banco
$('.item-nr .nota-sup').each(function() {
var textoNota = $(this).text().trim();
// Se a nota contiver texto (ex: [1]), transforma esse texto no Tooltip oficial
if (textoNota && textoNota !== "[]") {
$(this).attr('title', 'Nota Explicativa ' + textoNota);
}
});
});
/* Tabela NR 04 Anexo 1 */
$(function() {
// Clique no Nível 2 abre o Nível 3
$('.linha-nivel-2').on('click', function() {
$(this).nextUntil('.linha-nivel-2').filter('.linha-nivel-3').toggleClass('show');
});
// Clique no Nível 3 abre o Nível 4
$('.linha-nivel-3').on('click', function(e) {
// Impede que o clique no 3 dispare ações no 2 (se necessário)
e.stopPropagation();
$(this).nextUntil('.linha-nivel-3').filter('.linha-nivel-4').toggleClass('show');
});
});