Skip to content

Commit 022469d

Browse files
aspangaroUltraViolet33uvaldenaire-opendsi
authored
Publish 3.0.6 (#166)
* Fix CSS (badges & Areatabaction) * ChangeLog * fix print_oblyon_menu with noout (#165) Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions> * ChangeLog --------- Co-authored-by: UltraViolet33 <93035200+UltraViolet33@users.noreply.github.com> Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions>
1 parent 7f48f4d commit 022469d

File tree

5 files changed

+109
-87
lines changed

5 files changed

+109
-87
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Changelog ##
22

3+
### Version 3.0.6 - Compatibility 14.0.x - 20.0.x (2024/09/30)
4+
- Fix CSS badges
5+
- Fix CSS for FIX_AREAREF_TABACTION
6+
- Fix print_oblyon_menu function with $noout=1 still prints something (Thanks UltraViolet33 from Easya Solutions)
7+
38
### Version 3.0.5 - Compatibility 14.0.x - 20.0.x (2024/09/01)
49
- Fix Z-index with option FIX_AREAREF_TABACTION activated
510
- Add Use specific landing page to home menu entry (Thanks Christophe from Altairis)

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.5
1+
3.0.6

core/menus/standard/oblyon.lib.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
116116
}
117117
*/
118118

119-
if (is_array($moredata) && ! empty($moredata['searchform'])) // searchform can contains select2 code or link to show old search form or link to switch on search page
119+
if (is_array($moredata) && ! empty($moredata['searchform']) && empty($noout)) // searchform can contains select2 code or link to show old search form or link to switch on search page
120120
{
121121
print "\n";
122122
print "<!-- Begin SearchForm -->\n";
@@ -126,7 +126,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
126126
print "<!-- End SearchForm -->\n";
127127
}
128128

129-
if (is_array($moredata) && ! empty($moredata['bookmarks']))
129+
if (is_array($moredata) && ! empty($moredata['bookmarks']) && empty($noout))
130130
{
131131
print "\n";
132132
print "<!-- Begin Bookmarks -->\n";
@@ -136,7 +136,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
136136
print "<!-- End Bookmarks -->\n";
137137
}
138138

139-
if ( empty($menu_invert) && (getDolGlobalInt('OBLYON_HIDE_LEFTMENU') || $conf->dol_optimize_smallscreen) ) {
139+
if ( empty($menu_invert) && (getDolGlobalInt('OBLYON_HIDE_LEFTMENU') || $conf->dol_optimize_smallscreen) && empty($noout) ) {
140140
print '<div class="pushy-btn" title="'.$langs->trans("ShowLeftMenu").'">&#8801;</div>';
141141
}
142142

themeoblyon/badges.inc.php

+98-81
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
<?php
2-
if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
3-
/* <style type="text/css" > */
4-
/*
5-
Badge style is based on boostrap framework
6-
*/
2+
if (!defined('ISLOADEDBYSTEELSHEET')) {
3+
die('Must be call by steelsheet');
4+
}
5+
?>
6+
/* Badge style is based on boostrap framework */
77

88
.badge {
9-
display: inline-block;
10-
font-size: 80%;
11-
font-weight: 700 !important;
12-
line-height: 1;
13-
text-align: center;
14-
white-space: nowrap;
15-
vertical-align: baseline;
16-
border-radius: .25rem;
17-
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
18-
border-width: 2px;
19-
border-style: solid;
20-
border-color: rgba(255,255,255,0);
21-
box-sizing: border-box;
9+
display: inline-block;
10+
padding: .1em .35em;
11+
font-size: 80%;
12+
font-weight: 700 !important;
13+
line-height: 1;
14+
text-align: center;
15+
white-space: nowrap;
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;
19+
border-width: 2px;
20+
border-style: solid;
21+
border-color: rgba(255,255,255,0);
22+
box-sizing: border-box;
2223
}
2324

2425
.badge-status {
25-
font-size: 1em;
26-
padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */
26+
font-size: 0.95em;
27+
padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */
2728
}
2829
.tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status {
2930
font-size: 1.1em;
@@ -39,81 +40,90 @@
3940
}
4041

4142
.badge-pill, .tabs .badge {
42-
padding-right: .5em;
43-
padding-left: .5em;
44-
border-radius: 0.25rem;
43+
padding-right: .5em;
44+
padding-left: .5em;
45+
border-radius: 0.25rem;
4546
}
4647

4748
.badge-dot {
48-
border-radius: 50%;
49-
padding: 0.45em;
50-
vertical-align: text-top;
49+
padding: 0;
50+
border-radius: 50%;
51+
padding: 0.45em;
52+
vertical-align: text-top;
5153
}
5254

5355
a.badge:focus, a.badge:hover {
54-
text-decoration: none;
56+
text-decoration: none;
5557
}
5658

5759
.liste_titre .badge:not(.nochangebackground) {
58-
background-color: <?php print $badgeSecondary; ?>;
59-
color: #fff;
60+
background-color: <?php print $badgeSecondary; ?>;
61+
color: #fff;
62+
}
63+
64+
span.badgeneutral {
65+
padding: 2px 7px 2px 7px;
66+
background-color: #e4e4e4;
67+
color: #666;
68+
border-radius: 10px;
69+
white-space: nowrap;
6070
}
6171

6272

6373
/* PRIMARY */
6474
.badge-primary{
65-
color: #fff !important;
66-
background-color: <?php print $badgePrimary; ?>;
75+
color: #fff !important;
76+
background-color: <?php print $badgePrimary; ?>;
6777
}
6878
a.badge-primary.focus, a.badge-primary:focus {
69-
outline: 0;
70-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>;
79+
outline: 0;
80+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>;
7181
}
7282
a.badge-primary:focus, a.badge-primary:hover {
73-
color: #fff !important;
74-
background-color: <?php print colorDarker($badgePrimary, 10); ?>;
83+
color: #fff !important;
84+
background-color: <?php print colorDarker($badgePrimary, 10); ?>;
7585
}
7686

7787
/* SECONDARY */
7888
.badge-secondary, .tabs .badge {
79-
color: #fff !important;
80-
background-color: <?php print $badgeSecondary; ?>;
89+
color: #fff !important;
90+
background-color: <?php print $badgeSecondary; ?>;
8191
}
8292
a.badge-secondary.focus, a.badge-secondary:focus {
83-
outline: 0;
84-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>;
93+
outline: 0;
94+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>;
8595
}
8696
a.badge-secondary:focus, a.badge-secondary:hover {
87-
color: #fff !important;
88-
background-color: <?php print colorDarker($badgeSecondary, 10); ?>;
97+
color: #fff !important;
98+
background-color: <?php print colorDarker($badgeSecondary, 10); ?>;
8999
}
90100

91101
/* SUCCESS */
92102
.badge-success {
93-
color: #fff !important;
94-
background-color: <?php print $badgeSuccess; ?>;
103+
color: #fff !important;
104+
background-color: <?php print $badgeSuccess; ?>;
95105
}
96106
a.badge-success.focus, a.badge-success:focus {
97-
outline: 0;
98-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>;
107+
outline: 0;
108+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>;
99109
}
100110
a.badge-success:focus, a.badge-success:hover {
101-
color: #fff !important;
102-
background-color: <?php print colorDarker($badgeSuccess, 10); ?>;
111+
color: #fff !important;
112+
background-color: <?php print colorDarker($badgeSuccess, 10); ?>;
103113
}
104114

105115
/* DANGER */
106116
.badge-danger {
107-
color: #fff !important;
108-
background-color: <?php print $badgeDanger; ?>;
117+
color: #fff !important;
118+
background-color: <?php print $badgeDanger; ?>;
109119
}
110120
a.badge-danger.focus, a.badge-danger:focus {
111-
outline: 0;
112-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>;
121+
outline: 0;
122+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>;
113123
}
114124
a.badge-danger:focus, a.badge-danger:hover {
115-
color: #fff !important;
116-
background-color: <?php print colorDarker($badgeDanger, 10); ?>;
125+
color: #fff !important;
126+
background-color: <?php print colorDarker($badgeDanger, 10); ?>;
117127
}
118128

119129
/* WARNING */
@@ -122,67 +132,68 @@
122132
background-color: <?php print $badgeWarning; ?>;
123133
}
124134
a.badge-warning.focus, a.badge-warning:focus {
125-
outline: 0;
126-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>;
135+
outline: 0;
136+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>;
127137
}
128138
a.badge-warning:focus, a.badge-warning:hover {
129-
color: #212529 !important;
130-
background-color: <?php print colorDarker($badgeWarning, 10); ?>;
139+
color: #212529 !important;
140+
background-color: <?php print colorDarker($badgeWarning, 10); ?>;
131141
}
132142

133143
/* WARNING colorblind */
134-
body[class^="colorblind-"] .badge-warning {
144+
body[class*="colorblind-"] .badge-warning {
135145
background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
136146
}
137-
body[class^="colorblind-"] a.badge-warning.focus,body[class^="colorblind-"] a.badge-warning:focus {
147+
body[class*="colorblind-"] a.badge-warning.focus,body[class^="colorblind-"] a.badge-warning:focus {
138148
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
139149
}
140-
body[class^="colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
150+
body[class*="colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
141151
background-color: <?php print colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
142152
}
143153

144154
/* INFO */
145155
.badge-info {
146-
color: #fff !important;
147-
background-color: <?php print $badgeInfo; ?>;
156+
color: #fff !important;
157+
background-color: <?php print $badgeInfo; ?>;
148158
}
149159
a.badge-info.focus, a.badge-info:focus {
150-
outline: 0;
151-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>;
160+
outline: 0;
161+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>;
152162
}
153163
a.badge-info:focus, a.badge-info:hover {
154-
color: #fff !important;
155-
background-color: <?php print colorDarker($badgeInfo, 10); ?>;
164+
color: #fff !important;
165+
background-color: <?php print colorDarker($badgeInfo, 10); ?>;
156166
}
157167

158168
/* LIGHT */
159169
.badge-light {
160-
color: #212529 !important;
161-
background-color: <?php print $badgeLight; ?>;
170+
color: #212529 !important;
171+
background-color: <?php print $badgeLight; ?>;
162172
}
163173
a.badge-light.focus, a.badge-light:focus {
164-
outline: 0;
165-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>;
174+
outline: 0;
175+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>;
166176
}
167177
a.badge-light:focus, a.badge-light:hover {
168-
color: #212529 !important;
169-
background-color: <?php print colorDarker($badgeLight, 10); ?>;
178+
color: #212529 !important;
179+
background-color: <?php print colorDarker($badgeLight, 10); ?>;
170180
}
171181

172182
/* DARK */
173183
.badge-dark {
174-
color: #fff !important;
175-
background-color: <?php print $badgeDark; ?>;
184+
color: #fff !important;
185+
background-color: <?php print $badgeDark; ?>;
176186
}
177187
a.badge-dark.focus, a.badge-dark:focus {
178-
outline: 0;
179-
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>;
188+
outline: 0;
189+
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>;
180190
}
181191
a.badge-dark:focus, a.badge-dark:hover {
182-
color: #fff !important;
183-
background-color: <?php print colorDarker($badgeDark, 10); ?>;
192+
color: #fff !important;
193+
background-color: <?php print colorDarker($badgeDark, 10); ?>;
184194
}
185195

196+
186197
@media only screen and (max-width: 570px)
187198
{
188199
span.badge.badge-status {
@@ -192,6 +203,7 @@
192203
}
193204
}
194205

206+
195207
/* STATUS BADGES */
196208
<?php
197209
for ($i = 0; $i <= 10; $i++) {
@@ -217,7 +229,6 @@
217229
*/
218230
function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentLabel = '', $cssPrefix = '')
219231
{
220-
221232
global ${$statusVarNamePrefix.'badgeStatus'.$statusName}, ${$statusVarNamePrefix.'badgeStatus_textColor'.$statusName};
222233

223234
if (!empty(${$statusVarNamePrefix.'badgeStatus'.$statusName})) {
@@ -244,23 +255,29 @@ function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentL
244255
$thisBadgeTextColor = '#777777';
245256
}
246257

258+
// badge-statusX
247259
print $cssPrefix.".badge-status".$statusName." {\n";
248260
print " color: ".$thisBadgeTextColor." !important;\n";
249261
if (in_array((string) $statusName, $TBadgeBorderOnly)) {
250262
print " border-color: ".$thisBadgeBorderColor." !important;\n";
251263
}
252-
print " background-color: ".$thisBadgeBackgroundColor." !important;\n";
264+
if ($thisBadgeBackgroundColor != '') {
265+
print " background-color: ".$thisBadgeBackgroundColor." !important;\n";
266+
}
253267
print "}\n";
254268

255269
print $cssPrefix.".font-status".$statusName." {\n";
256-
print " color: ".$thisBadgeBackgroundColor." !important;\n";
270+
if ($thisBadgeBackgroundColor != '') {
271+
print " color: ".$thisBadgeBackgroundColor." !important;\n";
272+
}
257273
print "}\n";
258274

259275
print $cssPrefix.".badge-status".$statusName.".focus, ".$cssPrefix.".badge-status".$statusName.":focus {\n";
260276
print " outline: 0;\n";
261277
print " box-shadow: 0 0 0 0.2rem ".colorHexToRgb($thisBadgeBackgroundColor, 0.5)." !important;\n";
262278
print "}\n";
263279

280+
// badge-statusX:focus
264281
print $cssPrefix.".badge-status".$statusName.":focus, ".$cssPrefix.".badge-status".$statusName.":hover {\n";
265282
print " color: ".$thisBadgeTextColor." !important;\n";
266283
//print " background-color: " . colorDarker($thisBadgeBackgroundColor, 10) . ";\n";

themeoblyon/global.inc.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -2755,9 +2755,9 @@
27552755
position: sticky;
27562756
z-index: 4;
27572757
<?php if (!empty($conf->global->MAIN_MENU_INVERT)) { ?>
2758-
top: 40px;
2758+
top: 42px;
27592759
<?php } else { ?>
2760-
top: 52px;
2760+
top: 42px;
27612761
<?php } ?>
27622762
background: inherit;
27632763
padding-bottom: 20px;

0 commit comments

Comments
 (0)