From 4eb6f8c14f274a5ff53abb58bbcd8d2a581a3ea4 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Mon, 3 Sep 2018 14:40:08 +0200 Subject: [PATCH] Add a class to customize the line depending of the status --- tarteaucitron.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tarteaucitron.js b/tarteaucitron.js index d93c020..2779525 100644 --- a/tarteaucitron.js +++ b/tarteaucitron.js @@ -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