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
34 display:
inline-block;
37 font-weight: 700 !important;
41 vertical-align: baseline;
42 border-radius: .25rem;
43 transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
46 border-color: rgba(255,255,255,0);
47 box-sizing: border-box;
54.tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
59@media only screen and (max-width: 767px)
61 .tabBar .arearef .statusref .badge-
status, .tabBar .arearefnobottom .statusref .badge-
status {
67.badge-pill, .tabs .badge {
70 border-radius: 0.25rem;
77 vertical-align: text-top;
80a.badge:focus, a.badge:hover {
81 text-decoration: none;
84.liste_titre .badge:not(.nochangebackground) {
85 background-color: <?php print $badgeSecondary; ?>;
90 padding: 2px 7px 2px 7px;
91 background-color: #e4e4e4;
100 color: #fff !important;
101 background-color: <?php print $badgePrimary; ?>;
103a.badge-primary.focus, a.badge-primary:focus {
105 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgePrimary, 0.5); ?>;
107a.badge-primary:focus, a.badge-primary:hover {
108 color: #fff !important;
109 background-color: <?php print
colorDarker($badgePrimary, 10); ?>;
113.badge-secondary, .tabs .badge {
114 color: #fff !important;
115 background-color: <?php print $badgeSecondary; ?>;
117a.badge-secondary.focus, a.badge-secondary:focus {
119 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSecondary, 0.5); ?>;
121a.badge-secondary:focus, a.badge-secondary:hover {
122 color: #fff !important;
123 background-color: <?php print
colorDarker($badgeSecondary, 10); ?>;
128 color: #fff !important;
129 background-color: <?php print $badgeSuccess; ?>;
131a.badge-success.focus, a.badge-success:focus {
133 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeSuccess, 0.5); ?>;
135a.badge-success:focus, a.badge-success:hover {
136 color: #fff !important;
137 background-color: <?php print
colorDarker($badgeSuccess, 10); ?>;
142 color: #fff !important;
143 background-color: <?php print $badgeDanger; ?>;
145a.badge-danger.focus, a.badge-danger:focus {
147 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDanger, 0.5); ?>;
149a.badge-danger:focus, a.badge-danger:hover {
150 color: #fff !important;
151 background-color: <?php print
colorDarker($badgeDanger, 10); ?>;
156 color: #fff !important;
157 background-color: <?php print $badgeWarning; ?>;
159a.badge-warning.focus, a.badge-warning:focus {
161 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeWarning, 0.5); ?>;
163a.badge-warning:focus, a.badge-warning:hover {
164 color: #212529 !important;
165 background-color: <?php print
colorDarker($badgeWarning, 10); ?>;
169body[
class*=
"colorblind-"] .badge-warning {
170 background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
172body[
class*=
"colorblind-"] a.badge-warning.focus,body[
class^=
"colorblind-"] a.badge-warning:focus {
173 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
175body[
class*=
"colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
176 background-color: <?php print
colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
181 color: #fff !important;
182 background-color: <?php print $badgeInfo; ?>;
184a.badge-info.focus, a.badge-info:focus {
186 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeInfo, 0.5); ?>;
188a.badge-info:focus, a.badge-info:hover {
189 color: #fff !important;
190 background-color: <?php print
colorDarker($badgeInfo, 10); ?>;
195 color: #212529 !important;
196 background-color: <?php print $badgeLight; ?>;
198a.badge-light.focus, a.badge-light:focus {
200 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeLight, 0.5); ?>;
202a.badge-light:focus, a.badge-light:hover {
203 color: #212529 !important;
204 background-color: <?php print
colorDarker($badgeLight, 10); ?>;
209 color: #fff !important;
210 background-color: <?php print $badgeDark; ?>;
212a.badge-dark.focus, a.badge-dark:focus {
214 box-shadow: 0 0 0 0.2rem <?php print
colorHexToRgb($badgeDark, 0.5); ?>;
216a.badge-dark:focus, a.badge-dark:hover {
217 color: #fff !important;
218 background-color: <?php print
colorDarker($badgeDark, 10); ?>;
222@media only screen and (max-width: 570px)
227 text-overflow: ellipsis;
234for ($i = 0; $i <= 10; $i++) {
236 _createStatusBadgeCss((
string) $i,
'',
"STATUS".$i);
239 _createStatusBadgeCss((
string) $i,
'colorblind_deuteranopes_',
"COLORBLIND STATUS".$i,
'body[class*="colorblind-"] ');
242_createStatusBadgeCss(
'1b',
'',
"STATUS1b");
243_createStatusBadgeCss(
'4b',
'',
"STATUS4b");
255function _createStatusBadgeCss($statusName, $statusVarNamePrefix =
'', $commentLabel =
'', $cssPrefix =
'')
257 global ${$statusVarNamePrefix.
'badgeStatus'.$statusName}, ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
259 if (!empty(${$statusVarNamePrefix.
'badgeStatus'.$statusName})) {
260 print
"\n/* ".strtoupper($commentLabel).
" */\n";
262 $thisBadgeBackgroundColor = $thisBadgeBorderColor = ${$statusVarNamePrefix.
'badgeStatus'.$statusName};
264 $TBadgeBorderOnly = array(
'0',
'1b',
'3',
'4b',
'5',
'7',
'10');
265 $thisBadgeTextColor =
colorIsLight(${$statusVarNamePrefix.
'badgeStatus'.$statusName}) ?
'#212529' :
'#ffffff';
267 if (!empty(${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName})) {
268 $thisBadgeTextColor = ${$statusVarNamePrefix.
'badgeStatus_textColor'.$statusName};
271 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
272 $thisBadgeTextColor =
'#212529';
273 $thisBadgeBackgroundColor =
"";
276 if (in_array((
string) $statusName, array(
'0',
'5',
'9'))) {
277 $thisBadgeTextColor =
'#999999';
279 if (in_array((
string) $statusName, array(
'6'))) {
280 $thisBadgeTextColor =
'#777777';
284 print $cssPrefix.
".badge-status".$statusName.
" {\n";
285 print
" color: ".$thisBadgeTextColor.
" !important;\n";
286 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
287 print
" border-color: ".$thisBadgeBorderColor.
" !important;\n";
289 if ($thisBadgeBackgroundColor !=
'') {
290 print
" background-color: ".$thisBadgeBackgroundColor.
" !important;\n";
294 print $cssPrefix.
".font-status".$statusName.
" {\n";
295 if ($thisBadgeBackgroundColor !=
'') {
296 print
" color: ".$thisBadgeBackgroundColor.
" !important;\n";
300 print $cssPrefix.
".badge-status".$statusName.
".focus, ".$cssPrefix.
".badge-status".$statusName.
":focus {\n";
301 print
" outline: 0;\n";
302 print
" box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5).
" !important;\n";
306 print $cssPrefix.
".badge-status".$statusName.
":focus, ".$cssPrefix.
".badge-status".$statusName.
":hover {\n";
307 print
" color: ".$thisBadgeTextColor.
" !important;\n";
309 if (in_array((
string) $statusName, $TBadgeBorderOnly)) {
310 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.