4if (!defined(
'ISLOADEDBYSTEELSHEET')) {
5 die(
'Must be called by steelsheet');
10@phan-var-force string $badgePrimary
11@phan-var-force string $badgeSecondary
12@phan-var-force string $badgeSuccess
13@phan-var-force string $badgeDanger
14@phan-var-force string $badgeWarning
15@phan-var-force string $badgeInfo
16@phan-var-force string $badgeLight
17@phan-var-force string $badgeDark
18@phan-var-force string $colorblind_deuteranopes_badgeWarning
27 display:
inline-block;
30 font-weight: 700 !important;
34 vertical-align: baseline;
35 border-radius: .25rem;
36 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
39 border-color: rgba(255,255,255,0);
40 box-sizing: border-box;
47.tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
52@media only screen and (max-width: 767px)
54 .tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
60.badge-pill, .tabs .badge {
63 border-radius: 0.25rem;
70 vertical-align: unset;
73a.badge:focus, a.badge:hover {
74 text-decoration: none;
77.liste_titre .badge:not(.nochangebackground) {
78 background-color: <?php print $badgeSecondary; ?>;
83 padding: 2px 7px 2px 7px;
84 background-color: #e4e4e4;
93 color: #fff !important;
94 background-color: <?php print $badgePrimary; ?>;
96a.badge-primary.focus, a.badge-primary:focus {
98 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
100a.badge-primary:focus, a.badge-primary:hover {
101 color: #fff !important;
102 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
106.badge-secondary, .tabs .badge {
107 color: #fff !important;
108 background-color: <?php print $badgeSecondary; ?>;
110a.badge-secondary.focus, a.badge-secondary:focus {
112 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
114a.badge-secondary:focus, a.badge-secondary:hover {
115 color: #fff !important;
116 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
121 color: #fff !important;
122 background-color: <?php print $badgeSuccess; ?>;
124a.badge-success.focus, a.badge-success:focus {
126 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
128a.badge-success:focus, a.badge-success:hover {
129 color: #fff !important;
130 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
135 color: #fff !important;
136 background-color: <?php print $badgeDanger; ?>;
138a.badge-danger.focus, a.badge-danger:focus {
140 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
142a.badge-danger:focus, a.badge-danger:hover {
143 color: #fff !important;
144 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
149 color: #fff !important;
150 background-color: <?php print $badgeWarning; ?>;
152a.badge-warning.focus, a.badge-warning:focus {
154 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
156a.badge-warning:focus, a.badge-warning:hover {
157 color: #212529 !important;
158 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
162body[
class*=
"colorblind-"] .badge-warning {
163 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
165body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
166 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
168body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
169 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
174 color: #fff !important;
175 background-color: <?php print $badgeInfo; ?>;
177a.badge-info.focus, a.badge-info:focus {
179 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
181a.badge-info:focus, a.badge-info:hover {
182 color: #fff !important;
183 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
188 color: #212529 !important;
189 background-color: <?php print $badgeLight; ?>;
191a.badge-light.focus, a.badge-light:focus {
193 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
195a.badge-light:focus, a.badge-light:hover {
196 color: #212529 !important;
197 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
202 color: #fff !important;
203 background-color: <?php print $badgeDark; ?>;
205a.badge-dark.focus, a.badge-dark:focus {
207 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
209a.badge-dark:focus, a.badge-dark:hover {
210 color: #fff !important;
211 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
215@media only screen and (max-width: 570px)
220 text-overflow: ellipsis;
227for ($i = 0; $i <= 10; $i++) {
229 _createStatusBadgeCss((
string) $i,
'',
"STATUS".$i);
232 _createStatusBadgeCss((
string) $i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
235_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
236_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
247function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
249 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
251 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
252 print
"\n/* ".strtoupper($commentLabel).
" */\n";
254 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
257 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
258 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
260 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
261 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
264 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
265 $thisBadgeTextColor =
'#212529';
266 $thisBadgeBackgroundColor =
"#fff";
269 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
270 $thisBadgeTextColor =
'#999999';
272 if (in_array((
string) $statusName, array(
'6'))) {
273 $thisBadgeTextColor =
'#777777';
277 print $cssPrefix.
".badge-status".$statusName.
" {\n";
278 print
" color: ".$thisBadgeTextColor.
" !important;\n";
279 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
280 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
282 if ($thisBadgeBackgroundColor !=
'') {
283 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
287 print $cssPrefix.
".font-status".$statusName.
" {\n";
288 if ($thisBadgeBackgroundColor !=
'') {
289 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
294 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
295 print
" outline: 0;\n";
296 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
299 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
300 print
" color: ".$thisBadgeTextColor.
" !important;\n";
302 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
303 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.