From d4edb1fdf09d1f1fb1956de3b5ddce1933c08728 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 10 Jul 2023 13:37:56 +0200 Subject: [PATCH] Fix CSS & Add new constaht to hide PROJECT_HIDE_MENU_TASKS_ACTIVITY --- htdocs/custom/oblyon/CHANGELOG.md | 4 + htdocs/custom/oblyon/VERSION | 2 +- .../oblyon/core/menus/standard/oblyon.lib.php | 18 +-- htdocs/theme/oblyon/global.inc.php | 129 +++++++++++++++++- 4 files changed, 143 insertions(+), 10 deletions(-) diff --git a/htdocs/custom/oblyon/CHANGELOG.md b/htdocs/custom/oblyon/CHANGELOG.md index e0f04e9..7bea49f 100644 --- a/htdocs/custom/oblyon/CHANGELOG.md +++ b/htdocs/custom/oblyon/CHANGELOG.md @@ -1,5 +1,9 @@ ## Changelog ## +### Version 2.2.8 - Compatibility 14.0.x - 18.0.x (2023/07/10) +- Add constant PROJECT_HIDE_MENU_TASKS_ACTIVITY to hide in project menu the link to manage activity +- Upgrade CSS + ### Version 2.2.7 - Compatibility 14.0.x - 18beta (2023/06/21) - Fix right access problem between personalized & tools menu - Compatibility with Dolibarr 18-beta diff --git a/htdocs/custom/oblyon/VERSION b/htdocs/custom/oblyon/VERSION index b539ade..eb430cb 100644 --- a/htdocs/custom/oblyon/VERSION +++ b/htdocs/custom/oblyon/VERSION @@ -1 +1 @@ -2.2.7 \ No newline at end of file +2.2.8 \ No newline at end of file diff --git a/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php b/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php index bf13b0d..96279f6 100644 --- a/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php +++ b/htdocs/custom/oblyon/core/menus/standard/oblyon.lib.php @@ -1588,14 +1588,16 @@ function print_left_oblyon_menu($db, $menu_array_before, $menu_array_after, &$ta } if (empty($conf->global->PROJECT_HIDE_TASKS)) { - // Project affected to user - $newmenu->add("/projet/activity/index.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0); - $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer); - $newmenu->add("/projet/tasks/list.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire); - $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire); - - $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks".($search_project_user ? '&search_project_user='.$search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', 'project', 'timespent', 0); - } + // Project affected to user + $newmenu->add("/projet/activity/index.php?leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $langs->trans("Activities"), 0, $user->rights->projet->lire, '', 'project', 'tasks', 0); + $newmenu->add("/projet/tasks.php?leftmenu=tasks&action=create", $langs->trans("NewTask"), 1, $user->rights->projet->creer); + $newmenu->add("/projet/tasks/list.php?leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $langs->trans("List"), 1, $user->rights->projet->lire); + $newmenu->add("/projet/tasks/stats/index.php?leftmenu=projects", $langs->trans("Statistics"), 1, $user->rights->projet->lire); + + if (empty($conf->global->PROJECT_HIDE_MENU_TASKS_ACTIVITY)) { + $newmenu->add("/projet/activity/perweek.php?leftmenu=tasks" . ($search_project_user ? '&search_project_user=' . $search_project_user : ''), $langs->trans("NewTimeSpent"), 0, $user->rights->projet->lire, '', 'project', 'timespent', 0); + } + } } } diff --git a/htdocs/theme/oblyon/global.inc.php b/htdocs/theme/oblyon/global.inc.php index 76842eb..20f8414 100644 --- a/htdocs/theme/oblyon/global.inc.php +++ b/htdocs/theme/oblyon/global.inc.php @@ -1532,7 +1532,8 @@ padding-left: 20px; } div.divsearchfield { - float: ; + /*float: ;*/ + display: inline-block; margin-: 12px; margin-: 2px; margin-top: 4px; @@ -1549,7 +1550,133 @@ overflow: auto; padding-bottom: 5px; opacity: 0.6; + font-size: small; +} +.divadvancedsearchfield:first-child { + margin-top: 3px; +} +.divadvancedsearchfield { + float: left; + padding-left: 15px; + padding-right: 15px; + padding-bottom: 2px; + padding-top: 2px; +} +.divadvancedsearchfield span.select2.select2-container.select2-container--default { + /* padding-bottom: 4px; */ +} +.search_component_params { + /*display: flex; */ + -webkit-flex-flow: row wrap; + flex-flow: row wrap; + background: #fff; + padding-top: 3px; + padding-bottom: 3px; + padding-: 0; + padding-: 0; + border-bottom: solid 1px var(--inputbordercolor); + height: 24px; + border-radius: 3px; +} +.search_component_searchtext { + padding-top: 2px; +} +.search_component_params_text, .search_component_params_text:focus { + border-bottom: none; + width: auto; + margin: 0 !important; + padding: 3px; +} +.tagsearch { + padding: 2px; + padding-right: 4px; + padding-bottom: 3px; + background: #ddd; + border-radius: 4px; +} +.tagsearchdelete { + color: #999; + cursor: pointer; + display: inline-block; + font-weight: bold; + margin-right: 2px; + padding-left: 4px; +} + +.caretleftaxis { + margin-left: -13px; + margin-top: -1px; + position: absolute; +} +.caretdownaxis { + margin-left: -12px; + margin-top: 0; + position: absolute; +} + +.a-filter, .a-mesure { + border-radius: 50px; + background: var(--colortexttitlenotab); + color: #fff; + padding: 8px 10px 8px 6px; +} +.a-filter:before { + content: "\f0b0"; +} +.a-mesure:before { + content: "\f080"; +} +.a-filter:before, .a-mesure:before { + font-family: "Font Awesome 5 Free"; + font-weight: 600; + padding-right: 5px; + padding-left: 5px; +} +.a-filter-disabled, .a-mesure-disabled { + border-radius: 50px; + background: var(--colorbacktitle1); + padding: 8px; + opacity: 0.6; +} + + +/* ============================================================================== */ +/* Styles for scan tool */ +/* ============================================================================== */ + +div.div-for-modal { + /* display: none; */ + position:absolute; + top:calc(50% - 200px); + left:calc(50% - 250px); + width:500px; /* adjust as per your needs */ + height:400px; /* adjust as per your needs */ + background: #fff; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 100; +} + +#scantoolmessage { + height: 3em; + border: none; + overflow-y: auto; } + +div.div-for-modal-topright { + /* display: none; */ + position: fixed; + top: 0; + right: 0; + width:50%; /* adjust as per your needs */ + height:320px; /* adjust as per your needs */ + background: #fff; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 1100; +} + + browser->layout == 'phone') {