Browse Source

Add a class to customize the line depending of the status

Amauri CHAMPEAUX 6 năm trước cách đây
mục cha
commit
4eb6f8c14f
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      tarteaucitron.js

+ 6 - 0
tarteaucitron.js

@@ -660,10 +660,16 @@ var tarteaucitron = {
                 tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark);
                 tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark);
                 tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark);
                 tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark);
                 tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', gray);
                 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) {
             } else if (status === false) {
                 tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark);
                 tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark);
                 tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray);
                 tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray);
                 tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', redDark);
                 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
             // check if all services are allowed