Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
************************************************/

// Dolibarr environment *************************
$res = 0;
$res = 0;
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
if (empty($res) && !empty($_SERVER['CONTEXT_DOCUMENT_ROOT'])) {
$res = @include $_SERVER['CONTEXT_DOCUMENT_ROOT'].'/main.inc.php';
Expand Down
12 changes: 6 additions & 6 deletions core/menus/standard/oblyon.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
if ($usemenuhider || empty($leftmenu) || $leftmenu=="users")
{
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("Users"), 1, $user->hasRight('user', 'user', 'lire') || $user->admin);
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight('user', 'user', 'creer') || $user->admin) && !(!empty($conf->multicompany->enabled) && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')), '', 'home');
$newmenu->add("/user/card.php?leftmenu=users&action=create", $langs->trans("NewUser"), 2, ($user->hasRight('user', 'user', 'creer') || $user->admin) && !(isModEnabled('multicompany') && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')), '', 'home');
$newmenu->add("/user/list.php?leftmenu=users", $langs->trans("ListOfUsers"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
$newmenu->add("/user/hierarchy.php?leftmenu=users", $langs->trans("HierarchicView"), 2, $user->hasRight('user', 'user', 'lire') || $user->admin);
if ((float) DOL_VERSION < 22.0 || getDolGlobalString('CATEGORY_EDIT_IN_MENU_NOT_IN_POPUP')) {
Expand All @@ -879,8 +879,8 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
$newmenu->add("/categories/index.php?leftmenu=users&type=7", $langs->trans("UsersCategoriesShort"), 2, $user->hasRight('categorie', 'lire'), '', $mainmenu, 'cat');
}
}
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(!empty($conf->multicompany->enabled) && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')));
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('user', 'group_advance', 'write') : $user->hasRight('user', 'user', 'creer')) || $user->admin) && !(!empty($conf->multicompany->enabled) && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')));
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("Groups"), 1, ($user->hasRight('user', 'user', 'lire') || $user->admin) && !(isModEnabled('multicompany') && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')));
$newmenu->add("/user/group/card.php?leftmenu=users&action=create", $langs->trans("NewGroup"), 2, ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('user', 'group_advance', 'write') : $user->hasRight('user', 'user', 'creer')) || $user->admin) && !(isModEnabled('multicompany') && !empty($user->entity) && getDolGlobalString('MULTICOMPANY_TRANSVERSE_MODE')));
$newmenu->add("/user/group/list.php?leftmenu=users", $langs->trans("ListOfGroups"), 2, ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('user', 'group_advance', 'read'): $user->hasRight('user', 'user', 'lire')) || $user->admin));
}
}
Expand Down Expand Up @@ -2292,10 +2292,10 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta
$reshook = $hookmanager->executeHooks('menuLeftMenuItems', $parameters, $hook_items); // Note that $action and $object may have been modified by some hooks

if (is_numeric($reshook)) {
if ($reshook == 0 && !empty($hookmanager->results)) {
$menu_array[] = $hookmanager->results; // add
if ($reshook == 0 && !empty($hookmanager->resArray)) {
$menu_array[] = $hookmanager->resArray; // add
} elseif ($reshook == 1) {
$menu_array = $hookmanager->results; // replace
$menu_array = $hookmanager->resArray; // replace
}
}

Expand Down
48 changes: 28 additions & 20 deletions core/menus/standard/oblyon_menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,44 +58,48 @@ function __construct($db, $type_user) {
* @return void
*/
function loadMenu($forcemainmenu='',$forceleftmenu='') {
// On sauve en session le menu principal choisi
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
// We save into session the main menu selected
if (GETPOSTISSET("mainmenu")) {
$_SESSION["mainmenu"] = GETPOST("mainmenu", 'aZ09');
}
if (GETPOSTISSET("idmenu")) {
$_SESSION["idmenu"] = GETPOSTINT("idmenu");
}

// Read mainmenu and leftmenu that define which menu to show
if (isset($_GET["mainmenu"])) {
if (GETPOSTISSET("mainmenu")) {
// On sauve en session le menu principal choisi
$mainmenu=$_GET["mainmenu"];
$_SESSION["mainmenu"]=$mainmenu;
$_SESSION["leftmenuopened"]="";
$mainmenu = GETPOST("mainmenu", 'aZ09');
$_SESSION["mainmenu"] = $mainmenu;
$_SESSION["leftmenuopened"] = "";
} else {
// On va le chercher en session si non defini par le lien
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
$mainmenu = isset($_SESSION["mainmenu"]) ? $_SESSION["mainmenu"] : '';
}
if (! empty($forcemainmenu)) $mainmenu=$forcemainmenu;
if (!empty($forcemainmenu)) $mainmenu = $forcemainmenu;

if (isset($_GET["leftmenu"])) {
if (GETPOSTISSET("leftmenu")) {
// On sauve en session le menu principal choisi
$leftmenu=$_GET["leftmenu"];
$_SESSION["leftmenu"]=$leftmenu;
$leftmenu = GETPOST("leftmenu", 'aZ09');
$_SESSION["leftmenu"] = $leftmenu;

if ($_SESSION["leftmenuopened"]==$leftmenu) { // To collapse
if ($_SESSION["leftmenuopened"] == $leftmenu) { // To collapse
//$leftmenu="";
$_SESSION["leftmenuopened"]="";
$_SESSION["leftmenuopened"] = "";
} else {
$_SESSION["leftmenuopened"]=$leftmenu;
$_SESSION["leftmenuopened"] = $leftmenu;
}
} else {
// On va le chercher en session si non defini par le lien
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
$leftmenu = isset($_SESSION["leftmenu"]) ? $_SESSION["leftmenu"] : '';
}
if (! empty($forceleftmenu)) $leftmenu=$forceleftmenu;
if (!empty($forceleftmenu)) $leftmenu = $forceleftmenu;

require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
$tabMenu=array();
$menuArbo = new Menubase($this->db,'oblyon');
$tabMenu = array();
$menuArbo = new Menubase($this->db, 'oblyon');
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'oblyon', $tabMenu);
$this->tabMenu=$tabMenu;
$this->tabMenu = $tabMenu;
}


Expand Down Expand Up @@ -128,10 +132,14 @@ public function showmenu($mode, $moredata=null)
}
if ($mode == 'left') {
print_left_oblyon_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata, $this->type_user);
}
if ($mode == 'leftdropdown') {
print_left_oblyon_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 1, '', '', $moredata, $this->type_user);
}
}
else
{
$conf->global->MAIN_SHOW_LOGO = 0;
if ($mode == 'top') {
print_left_oblyon_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata, $this->type_user);
}
Expand Down
Binary file added img/iconfad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/iconfal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/iconfar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/iconfas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/iconfat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions themeoblyon/btn.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
box-shadow: unset !important;
}

.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete {
.butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active, .buttonDelete, .cke_dialog_ui_button_cancel, .ui-button {
background: <?php print $colorButtonDelete1; ?> !important;
color: #ffffff;
}

.butActionDelete:hover {
.butActionDelete:hover, .cke_dialog_ui_button_cancel:hover, .ui-button:hover, .ui-button:focus {
background: <?php print $colorButtonDelete2; ?> !important;
-webkit-box-shadow: 0px 1px 4px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
box-shadow: 0px 1px 4px 1px rgba(50, 50, 50, 0.4), 0px 0px 0px rgba(60,60,60,0.1);
Expand Down
74 changes: 55 additions & 19 deletions themeoblyon/dropdown.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
font-size: 14px;
text-align: left;
list-style: none;
background-color: <?php print (isset($bgcolor)) ? $bgcolor : '#fff' ?>;
background-color: var(--bgcolor);
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid var(--colorboxstatsborder);
Expand Down Expand Up @@ -126,9 +126,9 @@

.dropdown-menu > .user-header{
<?php if (getDolGlobalString('MAIN_MENU_INVERT')) { ?>
background-color: <?php print $bgnavtop_hover; ?>;
background-color: var(--bgnavtop_hover);
<?php } else { ?>
background-color: <?php print $bgnavleft_hover; ?>;
background-color: var(--bgnavleft_hover);
<?php } ?>
}

Expand All @@ -138,9 +138,9 @@

.dropdown-menu > .user-footer {
<?php if (getDolGlobalString('MAIN_MENU_INVERT')) { ?>
background-color: <?php print $bgnavtop_hover; ?>;
background-color: var(--bgnavtop_hover);
<?php } else { ?>
background-color: <?php print $bgnavleft_hover; ?>;
background-color: var(--bgnavleft_hover);
<?php } ?>
padding: 10px;
}
Expand Down Expand Up @@ -179,9 +179,9 @@
-webkit-border-radius: 0;
border-radius: 0;
<?php if (getDolGlobalString('MAIN_MENU_INVERT')) { ?>
background-color: <?php print $bgnavtop; ?>;
background-color: var(--bgnavtop);
<?php } else { ?>
background-color: <?php print $bgnavleft; ?>;
background-color: var(--bgnavleft);
<?php } ?>
}
.dropdown-body::-webkit-scrollbar-track {
Expand Down Expand Up @@ -260,7 +260,7 @@
}

.dropdown-menu a.top-menu-dropdown-link {
color: <?php echo (isset($colorfline)) ? $colorfline : '#212529' ?> !important;
color: var(--colorfline) !important;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
Expand All @@ -274,7 +274,7 @@
padding: .25rem 1.5rem .25rem 1rem;
clear: both;
font-weight: 400;
color: <?php echo (isset($colorfline)) ? $colorfline : '#212529' ?> !important;
color: var(--colorfline) !important;
text-align: inherit;
background-color: transparent;
border: 0;
Expand All @@ -300,11 +300,11 @@
.dropdown-item.active, .dropdown-item:hover, .dropdown-item:focus, .dropdown-menu a.top-menu-dropdown-link:hover {
text-decoration: none;
<?php if (getDolGlobalString('MAIN_MENU_INVERT')) { ?>
background-color: <?php print $bgnavtop; ?>;
color: <?php echo (isset($bgnavtop_txt)) ? $bgnavtop_txt : 'white' ?> !important;
background-color: var(--bgnavtop);
color: var(--bgnavtop_txt) !important;
<?php } else { ?>
background-color: <?php print $bgnavleft; ?>;
color: <?php echo (isset($bgnavleft_txt)) ? $bgnavleft_txt : 'white' ?> !important;
background-color: var(--bgnavleft);
color: var(--bgnavleft_txt) !important;
<?php } ?>
}
/*
Expand All @@ -317,7 +317,7 @@
font-size: 14px;
line-height: 16px;
box-sizing: border-box;
color: <?php echo (isset($colorfline)) ? $colorfline : '#575756' ?>;
color: var(--colorfline);
background-color: transparent;
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");
background-repeat: no-repeat;
Expand All @@ -330,7 +330,7 @@
transform-style: preserve-3d;
}
.dropdown-search-input::placeholder {
color: color(<?php echo (isset($colorfline)) ? $colorfline : '#575756' ?> a(0.8));
color: color(var(--colorfline) a(0.8));
letter-spacing: 1.5px;
}
.hidden-search-result{
Expand Down Expand Up @@ -377,7 +377,7 @@
}

div.quickadd a:hover, div.quickadd a:active {
color: <?php print $bgnavtop_txt; ?>;
color: var(--bgnavtop_txt);
}

div.quickaddblock {
Expand Down Expand Up @@ -416,15 +416,22 @@
}
.dropdown-content .butAction {
background: none;
color: #000 !important;
color: var(--colortext) !important;
}
.dropdown-content a.butAction {
display: flex;
background-color: unset !important;
}
.dropdown-content .butAction:hover {
.dropdown-content .butAction:hover, .dropdown-content a.butAction:hover {
box-shadow: none;
text-decoration: underline;
text-decoration: none;
<?php if (getDolGlobalString('MAIN_MENU_INVERT')) { ?>
background-color: var(--bgnavtop_hover) !important;
color: var(--bgnavtop_txt) !important;
<?php } else { ?>
background-color: var(--bgnavleft_hover) !important;
color: var(--bgnavleft_txt) !important;
<?php } ?>
}
.dropdown-content .butActionRefused {
margin-left: 0;
Expand All @@ -434,6 +441,21 @@

.dropdown-holder.open .dropdown-content {
display: block;
background-color: var(--bgcolor) !important;
color: var(--colortext) !important;
}

/* dropdown --up variant */
.dropdown-holder.--up .dropdown-content {
bottom: auto;
top: 0;
transform: translateY(-100%);
}

/* dropdown --left variant */
.dropdown-holder.--left .dropdown-content {
right: auto;
left: 12px;
}

/** dropdown arrow used to clearly identify parent button of dropdown*/
Expand All @@ -451,6 +473,20 @@
transform: rotate(0deg);
}

/* dropdown --up arrow variant */
.dropdown-holder.--up.open .dropdown-content::before {
top: auto;
bottom: calc(var(--triangleBorderSize) * -1);
border-width: 0 var(--triangleBorderSize) var(--triangleBorderSize) var(--triangleBorderSize);
transform: rotate(180deg);
}

/* dropdown --left arrow variant */
.dropdown-holder.--left.open .dropdown-content::before {
right: auto;
left: 12px;
}

/*
* Responsive
*/
Expand Down
Empty file added themeoblyon/font.css
Empty file.
Binary file added themeoblyon/fonts/oblyon-icons.eot
Binary file not shown.
Loading