Skip to content

Commit

Permalink
Publish 3.0.6 (#166)
Browse files Browse the repository at this point in the history
* Fix CSS (badges & Areatabaction)

* ChangeLog

* fix print_oblyon_menu with noout (#165)

Co-authored-by: Ulysse Valdenaire <[email protected]>

* ChangeLog

---------

Co-authored-by: UltraViolet33 <[email protected]>
Co-authored-by: Ulysse Valdenaire <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent 7f48f4d commit 022469d
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 87 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Changelog ##

### Version 3.0.6 - Compatibility 14.0.x - 20.0.x (2024/09/30)
- Fix CSS badges
- Fix CSS for FIX_AREAREF_TABACTION
- Fix print_oblyon_menu function with $noout=1 still prints something (Thanks UltraViolet33 from Easya Solutions)

### Version 3.0.5 - Compatibility 14.0.x - 20.0.x (2024/09/01)
- Fix Z-index with option FIX_AREAREF_TABACTION activated
- Add Use specific landing page to home menu entry (Thanks Christophe from Altairis)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.5
3.0.6
6 changes: 3 additions & 3 deletions core/menus/standard/oblyon.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
}
*/

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
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
{
print "\n";
print "<!-- Begin SearchForm -->\n";
Expand All @@ -126,7 +126,7 @@ function print_oblyon_menu($db, $atarget, $type_user = 0, &$tabMenu, &$menu, $no
print "<!-- End SearchForm -->\n";
}

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

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

Expand Down
179 changes: 98 additions & 81 deletions themeoblyon/badges.inc.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
<?php
if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
/* <style type="text/css" > */
/*
Badge style is based on boostrap framework
*/
if (!defined('ISLOADEDBYSTEELSHEET')) {
die('Must be call by steelsheet');
}
?>
/* Badge style is based on boostrap framework */

.badge {
display: inline-block;
font-size: 80%;
font-weight: 700 !important;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25rem;
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
border-width: 2px;
border-style: solid;
border-color: rgba(255,255,255,0);
box-sizing: border-box;
display: inline-block;
padding: .1em .35em;
font-size: 80%;
font-weight: 700 !important;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25rem;
transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
border-width: 2px;
border-style: solid;
border-color: rgba(255,255,255,0);
box-sizing: border-box;
}

.badge-status {
font-size: 1em;
padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */
font-size: 0.95em;
padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */
}
.tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status {
font-size: 1.1em;
Expand All @@ -39,81 +40,90 @@
}

.badge-pill, .tabs .badge {
padding-right: .5em;
padding-left: .5em;
border-radius: 0.25rem;
padding-right: .5em;
padding-left: .5em;
border-radius: 0.25rem;
}

.badge-dot {
border-radius: 50%;
padding: 0.45em;
vertical-align: text-top;
padding: 0;
border-radius: 50%;
padding: 0.45em;
vertical-align: text-top;
}

a.badge:focus, a.badge:hover {
text-decoration: none;
text-decoration: none;
}

.liste_titre .badge:not(.nochangebackground) {
background-color: <?php print $badgeSecondary; ?>;
color: #fff;
background-color: <?php print $badgeSecondary; ?>;
color: #fff;
}

span.badgeneutral {
padding: 2px 7px 2px 7px;
background-color: #e4e4e4;
color: #666;
border-radius: 10px;
white-space: nowrap;
}


/* PRIMARY */
.badge-primary{
color: #fff !important;
background-color: <?php print $badgePrimary; ?>;
color: #fff !important;
background-color: <?php print $badgePrimary; ?>;
}
a.badge-primary.focus, a.badge-primary:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgePrimary, 0.5); ?>;
}
a.badge-primary:focus, a.badge-primary:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgePrimary, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgePrimary, 10); ?>;
}

/* SECONDARY */
.badge-secondary, .tabs .badge {
color: #fff !important;
background-color: <?php print $badgeSecondary; ?>;
color: #fff !important;
background-color: <?php print $badgeSecondary; ?>;
}
a.badge-secondary.focus, a.badge-secondary:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSecondary, 0.5); ?>;
}
a.badge-secondary:focus, a.badge-secondary:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgeSecondary, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgeSecondary, 10); ?>;
}

/* SUCCESS */
.badge-success {
color: #fff !important;
background-color: <?php print $badgeSuccess; ?>;
color: #fff !important;
background-color: <?php print $badgeSuccess; ?>;
}
a.badge-success.focus, a.badge-success:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeSuccess, 0.5); ?>;
}
a.badge-success:focus, a.badge-success:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgeSuccess, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgeSuccess, 10); ?>;
}

/* DANGER */
.badge-danger {
color: #fff !important;
background-color: <?php print $badgeDanger; ?>;
color: #fff !important;
background-color: <?php print $badgeDanger; ?>;
}
a.badge-danger.focus, a.badge-danger:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDanger, 0.5); ?>;
}
a.badge-danger:focus, a.badge-danger:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgeDanger, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgeDanger, 10); ?>;
}

/* WARNING */
Expand All @@ -122,67 +132,68 @@
background-color: <?php print $badgeWarning; ?>;
}
a.badge-warning.focus, a.badge-warning:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeWarning, 0.5); ?>;
}
a.badge-warning:focus, a.badge-warning:hover {
color: #212529 !important;
background-color: <?php print colorDarker($badgeWarning, 10); ?>;
color: #212529 !important;
background-color: <?php print colorDarker($badgeWarning, 10); ?>;
}

/* WARNING colorblind */
body[class^="colorblind-"] .badge-warning {
body[class*="colorblind-"] .badge-warning {
background-color: <?php print $colorblind_deuteranopes_badgeWarning; ?>;
}
body[class^="colorblind-"] a.badge-warning.focus,body[class^="colorblind-"] a.badge-warning:focus {
body[class*="colorblind-"] a.badge-warning.focus,body[class^="colorblind-"] a.badge-warning:focus {
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($colorblind_deuteranopes_badgeWarning, 0.5); ?>;
}
body[class^="colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
body[class*="colorblind-"] a.badge-warning:focus, a.badge-warning:hover {
background-color: <?php print colorDarker($colorblind_deuteranopes_badgeWarning, 10); ?>;
}

/* INFO */
.badge-info {
color: #fff !important;
background-color: <?php print $badgeInfo; ?>;
color: #fff !important;
background-color: <?php print $badgeInfo; ?>;
}
a.badge-info.focus, a.badge-info:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeInfo, 0.5); ?>;
}
a.badge-info:focus, a.badge-info:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgeInfo, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgeInfo, 10); ?>;
}

/* LIGHT */
.badge-light {
color: #212529 !important;
background-color: <?php print $badgeLight; ?>;
color: #212529 !important;
background-color: <?php print $badgeLight; ?>;
}
a.badge-light.focus, a.badge-light:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeLight, 0.5); ?>;
}
a.badge-light:focus, a.badge-light:hover {
color: #212529 !important;
background-color: <?php print colorDarker($badgeLight, 10); ?>;
color: #212529 !important;
background-color: <?php print colorDarker($badgeLight, 10); ?>;
}

/* DARK */
.badge-dark {
color: #fff !important;
background-color: <?php print $badgeDark; ?>;
color: #fff !important;
background-color: <?php print $badgeDark; ?>;
}
a.badge-dark.focus, a.badge-dark:focus {
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>;
outline: 0;
box-shadow: 0 0 0 0.2rem <?php print colorHexToRgb($badgeDark, 0.5); ?>;
}
a.badge-dark:focus, a.badge-dark:hover {
color: #fff !important;
background-color: <?php print colorDarker($badgeDark, 10); ?>;
color: #fff !important;
background-color: <?php print colorDarker($badgeDark, 10); ?>;
}


@media only screen and (max-width: 570px)
{
span.badge.badge-status {
Expand All @@ -192,6 +203,7 @@
}
}


/* STATUS BADGES */
<?php
for ($i = 0; $i <= 10; $i++) {
Expand All @@ -217,7 +229,6 @@
*/
function _createStatusBadgeCss($statusName, $statusVarNamePrefix = '', $commentLabel = '', $cssPrefix = '')
{

global ${$statusVarNamePrefix.'badgeStatus'.$statusName}, ${$statusVarNamePrefix.'badgeStatus_textColor'.$statusName};

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

// badge-statusX
print $cssPrefix.".badge-status".$statusName." {\n";
print " color: ".$thisBadgeTextColor." !important;\n";
if (in_array((string) $statusName, $TBadgeBorderOnly)) {
print " border-color: ".$thisBadgeBorderColor." !important;\n";
}
print " background-color: ".$thisBadgeBackgroundColor." !important;\n";
if ($thisBadgeBackgroundColor != '') {
print " background-color: ".$thisBadgeBackgroundColor." !important;\n";
}
print "}\n";

print $cssPrefix.".font-status".$statusName." {\n";
print " color: ".$thisBadgeBackgroundColor." !important;\n";
if ($thisBadgeBackgroundColor != '') {
print " color: ".$thisBadgeBackgroundColor." !important;\n";
}
print "}\n";

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

// badge-statusX:focus
print $cssPrefix.".badge-status".$statusName.":focus, ".$cssPrefix.".badge-status".$statusName.":hover {\n";
print " color: ".$thisBadgeTextColor." !important;\n";
//print " background-color: " . colorDarker($thisBadgeBackgroundColor, 10) . ";\n";
Expand Down
4 changes: 2 additions & 2 deletions themeoblyon/global.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2755,9 +2755,9 @@
position: sticky;
z-index: 4;
<?php if (!empty($conf->global->MAIN_MENU_INVERT)) { ?>
top: 40px;
top: 42px;
<?php } else { ?>
top: 52px;
top: 42px;
<?php } ?>
background: inherit;
padding-bottom: 20px;
Expand Down

0 comments on commit 022469d

Please sign in to comment.