2if (!defined(
'ISLOADEDBYSTEELSHEET')) {
3 die(
'Must be call by steelsheet');
12 font-weight: 700 !important;
16 vertical-align: baseline;
17 border-radius: .25rem;
18 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
21 border-color: rgba(255,255,255,0);
22 box-sizing: border-box;
29.tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
34@media only screen and (max-width: 767px)
36 .tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
45 border-radius: 0.25rem;
52 border-radius: 0.5rem;
59 vertical-align: text-top;
62a.badge:focus, a.badge:hover {
63 text-decoration: none;
66.liste_titre .badge:not(.nochangebackground) {
67 background-color: <?php print $badgeSecondary; ?>;
72 padding: 2px 7px 2px 7px;
73 background-color: #e4e4e4;
82 color: #fff !important;
83 background-color: <?php print $badgePrimary; ?>;
85a.badge-primary.focus, a.badge-primary:focus {
87 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
89a.badge-primary:focus, a.badge-primary:hover {
90 color: #fff !important;
91 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
95.badge-secondary, .tabs .badge {
96 color: #fff !important;
97 background-color: <?php print $badgeSecondary; ?>;
99a.badge-secondary.focus, a.badge-secondary:focus {
101 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
103a.badge-secondary:focus, a.badge-secondary:hover {
104 color: #fff !important;
105 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
110 color: #fff !important;
111 background-color: <?php print $badgeSuccess; ?>;
113a.badge-success.focus, a.badge-success:focus {
115 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
117a.badge-success:focus, a.badge-success:hover {
118 color: #fff !important;
119 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
124 color: #fff !important;
125 background-color: <?php print $badgeDanger; ?>;
127a.badge-danger.focus, a.badge-danger:focus {
129 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
131a.badge-danger:focus, a.badge-danger:hover {
132 color: #fff !important;
133 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
138 color: #fff !important;
139 background-color: <?php print $badgeWarning; ?>;
141a.badge-warning.focus, a.badge-warning:focus {
143 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
145a.badge-warning:focus, a.badge-warning:hover {
146 color: #212529 !important;
147 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
151body[
class*=
"colorblind-"] .badge-warning {
152 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
154body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
155 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
157body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
158 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
163 color: #fff !important;
164 background-color: <?php print $badgeInfo; ?>;
166a.badge-info.focus, a.badge-info:focus {
168 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
170a.badge-info:focus, a.badge-info:hover {
171 color: #fff !important;
172 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
177 color: #212529 !important;
178 background-color: <?php print $badgeLight; ?>;
180a.badge-light.focus, a.badge-light:focus {
182 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
184a.badge-light:focus, a.badge-light:hover {
185 color: #212529 !important;
186 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
191 color: #fff !important;
192 background-color: <?php print $badgeDark; ?>;
194a.badge-dark.focus, a.badge-dark:focus {
196 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
198a.badge-dark:focus, a.badge-dark:hover {
199 color: #fff !important;
200 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
204@media only screen and (max-width: 570px)
209 text-overflow: ellipsis;
216for ($i = 0; $i <= 10; $i++) {
218 _createStatusBadgeCss($i,
'',
"STATUS".$i);
221 _createStatusBadgeCss($i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
224_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
225_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
237function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
239 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
241 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
242 print
"\n/* ".strtoupper($commentLabel).
" */\n";
244 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
246 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
247 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
249 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
250 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
253 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
254 $thisBadgeTextColor =
'#212529';
255 $thisBadgeBackgroundColor =
"";
258 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
259 $thisBadgeTextColor =
'#999999';
261 if (in_array((
string) $statusName, array(
'6'))) {
262 $thisBadgeTextColor =
'#777777';
266 print $cssPrefix.
".badge-status".$statusName.
" {\n";
267 print
" color: ".$thisBadgeTextColor.
" !important;\n";
268 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
269 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
271 if ($thisBadgeBackgroundColor !=
'') {
272 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
276 print $cssPrefix.
".font-status".$statusName.
" {\n";
277 if ($thisBadgeBackgroundColor !=
'') {
278 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
282 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
283 print
" outline: 0;\n";
284 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
288 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
289 print
" color: ".$thisBadgeTextColor.
" !important;\n";
291 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
292 print
" border-color: ".colorDarker($thisBadgeBorderColor, 10).
" !important;\n";
print $langs trans("AuditedSecurityEvents").'</strong >< span class="opacitymedium"></span >< br > status
Or an array listing all the potential status of the object: array: int of the status => translated la...
colorHexToRgb($hex, $alpha=false, $returnArray=false)
colorDarker($hex, $percent)
colorIsLight($stringcolor)
Return true if the color is light.