4if (!defined(
'ISLOADEDBYSTEELSHEET')) {
5 die(
'Must be call by steelsheet');
8@phan-var-force string $badgePrimary
9@phan-var-force string $badgeSecondary
10@phan-var-force string $badgeSuccess
11@phan-var-force string $badgeDanger
12@phan-var-force string $badgeWarning
13@phan-var-force string $badgeInfo
14@phan-var-force string $badgeLight
15@phan-var-force string $badgeDark
16@phan-var-force string $colorblind_deuteranopes_badgeWarning
22 display:
inline-block;
25 font-weight: 700 !important;
29 vertical-align: baseline;
30 border-radius: .25rem;
31 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
34 border-color: rgba(255,255,255,0);
35 box-sizing: border-box;
42.tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
47@media only screen and (max-width: 767px)
49 .tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
55.badge-pill, .tabs .badge {
58 border-radius: 0.25rem;
65 vertical-align: text-top;
68a.badge:focus, a.badge:hover {
69 text-decoration: none;
72.liste_titre .badge:not(.nochangebackground) {
73 background-color: <?php print $badgeSecondary; ?>;
78 padding: 2px 7px 2px 7px;
79 background-color: #e4e4e4;
88 color: #fff !important;
89 background-color: <?php print $badgePrimary; ?>;
91a.badge-primary.focus, a.badge-primary:focus {
93 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
95a.badge-primary:focus, a.badge-primary:hover {
96 color: #fff !important;
97 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
101.badge-secondary, .tabs .badge {
102 color: #fff !important;
103 background-color: <?php print $badgeSecondary; ?>;
105a.badge-secondary.focus, a.badge-secondary:focus {
107 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
109a.badge-secondary:focus, a.badge-secondary:hover {
110 color: #fff !important;
111 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
116 color: #fff !important;
117 background-color: <?php print $badgeSuccess; ?>;
119a.badge-success.focus, a.badge-success:focus {
121 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
123a.badge-success:focus, a.badge-success:hover {
124 color: #fff !important;
125 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
130 color: #fff !important;
131 background-color: <?php print $badgeDanger; ?>;
133a.badge-danger.focus, a.badge-danger:focus {
135 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
137a.badge-danger:focus, a.badge-danger:hover {
138 color: #fff !important;
139 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
144 color: #fff !important;
145 background-color: <?php print $badgeWarning; ?>;
147a.badge-warning.focus, a.badge-warning:focus {
149 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
151a.badge-warning:focus, a.badge-warning:hover {
152 color: #212529 !important;
153 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
157body[
class*=
"colorblind-"] .badge-warning {
158 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
160body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
161 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
163body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
164 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
169 color: #fff !important;
170 background-color: <?php print $badgeInfo; ?>;
172a.badge-info.focus, a.badge-info:focus {
174 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
176a.badge-info:focus, a.badge-info:hover {
177 color: #fff !important;
178 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
183 color: #212529 !important;
184 background-color: <?php print $badgeLight; ?>;
186a.badge-light.focus, a.badge-light:focus {
188 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
190a.badge-light:focus, a.badge-light:hover {
191 color: #212529 !important;
192 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
197 color: #fff !important;
198 background-color: <?php print $badgeDark; ?>;
200a.badge-dark.focus, a.badge-dark:focus {
202 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
204a.badge-dark:focus, a.badge-dark:hover {
205 color: #fff !important;
206 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
210@media only screen and (max-width: 570px)
215 text-overflow: ellipsis;
222for ($i = 0; $i <= 10; $i++) {
224 _createStatusBadgeCss((
string) $i,
'',
"STATUS".$i);
227 _createStatusBadgeCss((
string) $i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
230_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
231_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
243function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
245 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
247 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
248 print
"\n/* ".strtoupper($commentLabel).
" */\n";
250 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
252 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
253 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
255 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
256 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
259 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
260 $thisBadgeTextColor =
'#212529';
261 $thisBadgeBackgroundColor =
"";
264 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
265 $thisBadgeTextColor =
'#999999';
267 if (in_array((
string) $statusName, array(
'6'))) {
268 $thisBadgeTextColor =
'#777777';
272 print $cssPrefix.
".badge-status".$statusName.
" {\n";
273 print
" color: ".$thisBadgeTextColor.
" !important;\n";
274 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
275 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
277 if ($thisBadgeBackgroundColor !=
'') {
278 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
282 print $cssPrefix.
".font-status".$statusName.
" {\n";
283 if ($thisBadgeBackgroundColor !=
'') {
284 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
288 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
289 print
" outline: 0;\n";
290 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
294 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
295 print
" color: ".$thisBadgeTextColor.
" !important;\n";
297 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
298 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.