Add a class to customize the line depending of the status

This commit is contained in:
Amauri CHAMPEAUX 2018-09-03 14:40:08 +02:00 committed by GitHub
parent 51433bf1ff
commit 4eb6f8c14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -660,10 +660,16 @@ var tarteaucitron = {
tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark);
tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark);
tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', gray);
document.getElementById(key + 'Line').classList.add('tarteaucitronIsAllowed');
document.getElementById(key + 'Line').classList.remove('tarteaucitronIsDenied');
} else if (status === false) {
tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark);
tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray);
tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', redDark);
document.getElementById(key + 'Line').classList.remove('tarteaucitronIsAllowed');
document.getElementById(key + 'Line').classList.add('tarteaucitronIsDenied');
}
// check if all services are allowed