5if (!defined(
'ISLOADEDBYSTEELSHEET')) {
6 die(
'Must be call by steelsheet');
20@phan-var-force string $badgePrimary
21@phan-var-force string $badgeSecondary
22@phan-var-force string $badgeSuccess
23@phan-var-force string $badgeDanger
24@phan-var-force string $badgeWarning
25@phan-var-force string $badgeInfo
26@phan-var-force string $badgeLight
27@phan-var-force string $badgeDark
28@phan-var-force string $colorblind_deuteranopes_badgeWarning
37 display:
inline-block;
40 font-weight: 700 !important;
44 vertical-align: baseline;
45 border-radius: .25rem;
46 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
49 border-color: rgba(255,255,255,0);
50 box-sizing: border-box;
57.tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
62@media only screen and (max-width: 767px)
64 .tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
73 border-radius: 0.25rem;
80 border-radius: 0.5rem;
87 vertical-align: text-top;
90a.badge:focus, a.badge:hover {
91 text-decoration: none;
94.liste_titre .badge:not(.nochangebackground) {
95 background-color: <?php print $badgeSecondary; ?>;
100 padding: 2px 7px 2px 7px;
101 background-color: #e4e4e4;
110 color: #fff !important;
111 background-color: <?php print $badgePrimary; ?>;
113a.badge-primary.focus, a.badge-primary:focus {
115 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
117a.badge-primary:focus, a.badge-primary:hover {
118 color: #fff !important;
119 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
123.badge-secondary, .tabs .badge {
124 color: #fff !important;
125 background-color: <?php print $badgeSecondary; ?>;
127a.badge-secondary.focus, a.badge-secondary:focus {
129 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
131a.badge-secondary:focus, a.badge-secondary:hover {
132 color: #fff !important;
133 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
138 color: #fff !important;
139 background-color: <?php print $badgeSuccess; ?>;
141a.badge-success.focus, a.badge-success:focus {
143 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
145a.badge-success:focus, a.badge-success:hover {
146 color: #fff !important;
147 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
152 color: #fff !important;
153 background-color: <?php print $badgeDanger; ?>;
155a.badge-danger.focus, a.badge-danger:focus {
157 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
159a.badge-danger:focus, a.badge-danger:hover {
160 color: #fff !important;
161 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
166 color: #fff !important;
167 background-color: <?php print $badgeWarning; ?>;
169a.badge-warning.focus, a.badge-warning:focus {
171 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
173a.badge-warning:focus, a.badge-warning:hover {
174 color: #212529 !important;
175 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
179body[
class*=
"colorblind-"] .badge-warning {
180 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
182body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
183 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
185body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
186 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
191 color: #fff !important;
192 background-color: <?php print $badgeInfo; ?>;
194a.badge-info.focus, a.badge-info:focus {
196 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
198a.badge-info:focus, a.badge-info:hover {
199 color: #fff !important;
200 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
205 color: #212529 !important;
206 background-color: <?php print $badgeLight; ?>;
208a.badge-light.focus, a.badge-light:focus {
210 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
212a.badge-light:focus, a.badge-light:hover {
213 color: #212529 !important;
214 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
219 color: #fff !important;
220 background-color: <?php print $badgeDark; ?>;
222a.badge-dark.focus, a.badge-dark:focus {
224 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
226a.badge-dark:focus, a.badge-dark:hover {
227 color: #fff !important;
228 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
232@media only screen and (max-width: 570px)
237 text-overflow: ellipsis;
244for ($i = 0; $i <= 10; $i++) {
246 _createStatusBadgeCss((
string) $i,
'',
"STATUS".$i);
249 _createStatusBadgeCss((
string) $i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
252_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
253_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
265function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
267 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
269 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
270 print
"\n/* ".strtoupper($commentLabel).
" */\n";
272 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
274 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
275 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
277 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
278 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
281 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
282 $thisBadgeTextColor =
'#212529';
283 $thisBadgeBackgroundColor =
"";
286 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
287 $thisBadgeTextColor =
'#999999';
289 if (in_array((
string) $statusName, array(
'6'))) {
290 $thisBadgeTextColor =
'#777777';
294 print $cssPrefix.
".badge-status".$statusName.
" {\n";
295 print
" color: ".$thisBadgeTextColor.
" !important;\n";
296 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
297 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
299 if ($thisBadgeBackgroundColor !=
'') {
300 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
304 print $cssPrefix.
".font-status".$statusName.
" {\n";
305 if ($thisBadgeBackgroundColor !=
'') {
306 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
310 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
311 print
" outline: 0;\n";
312 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
316 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
317 print
" color: ".$thisBadgeTextColor.
" !important;\n";
319 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
320 print
" border-color: ".colorDarker($thisBadgeBorderColor, 10).
" !important;\n";
print $langs trans("Ref").' m titre as m m statut as 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.