From f89c8cfb0339f548cb689ab74ec68cc43dedf25b Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 19 Apr 2021 16:02:41 -0600 Subject: [PATCH] Add hrules to sidebox menus --- addressbook/inc/class.addressbook_hooks.inc.php | 1 + api/src/Framework/Ajax.php | 6 ++++++ api/templates/default/etemplate2.css | 5 +++++ filemanager/inc/class.filemanager_hooks.inc.php | 3 ++- infolog/inc/class.infolog_hooks.inc.php | 1 + timesheet/inc/class.timesheet_hooks.inc.php | 1 + 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index ff4d1134f2..fd39c71b41 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -61,6 +61,7 @@ class addressbook_hooks 'Advanced search' => "javascript:egw_openWindowCentered2('". Egw::link('/index.php',array('menuaction' => 'addressbook.addressbook_ui.extSearch'),false). "','_blank',870,610,'yes')", + ['text'=>'--'], 'Placeholders' => Egw::link('/index.php','menuaction=api.EGroupware\\Api\\Contacts\\Merge.show_replacements') ); display_sidebox($appname,lang('Addressbook menu'),$file); diff --git a/api/src/Framework/Ajax.php b/api/src/Framework/Ajax.php index c9c55243ec..7fd74239f1 100755 --- a/api/src/Framework/Ajax.php +++ b/api/src/Framework/Ajax.php @@ -700,6 +700,12 @@ abstract class Ajax extends Api\Framework $var['lang_item'] = lang($item_text); $var['item_link'] = $item_link; } + if($var['lang_item'] == '--') + { + unset($var['icon_or_star']); + $var['item_link'] = ''; + $var['lang_item'] = '
'; + } $current_menu['entries'][] = $var; } diff --git a/api/templates/default/etemplate2.css b/api/templates/default/etemplate2.css index d6481828d0..3ba9b1bff6 100644 --- a/api/templates/default/etemplate2.css +++ b/api/templates/default/etemplate2.css @@ -3246,6 +3246,11 @@ tr.disableIfNoEPL { opacity: 0.5; pointer-events: none; } +.egw_fw_ui_sidemenu_entry_content hr { + /* HR in sidebox */ + border-top: 1px solid black; + margin: 3px 5px 0px 5px; +} .inactive_blur > * {opacity: 0.4; filter:blur(2px); pointer-events: none;} .et2_editable { diff --git a/filemanager/inc/class.filemanager_hooks.inc.php b/filemanager/inc/class.filemanager_hooks.inc.php index 93970c3b7f..201fd32a15 100644 --- a/filemanager/inc/class.filemanager_hooks.inc.php +++ b/filemanager/inc/class.filemanager_hooks.inc.php @@ -77,8 +77,9 @@ class filemanager_hooks { $file['Startfolder']= Egw::link('/index.php',array('menuaction'=>self::$appname.'.filemanager_ui.index','path'=>$file_prefs['startfolder'],'ajax'=>'true')); } - $file['Placeholders'] = Egw::link('/index.php','menuaction=filemanager.filemanager_merge.show_replacements'); $file['Shared files'] = Egw::link('/index.php','menuaction=filemanager.filemanager_shares.index&ajax=true'); + $file[] = ['text'=>'--']; + $file['Placeholders'] = Egw::link('/index.php','menuaction=filemanager.filemanager_merge.show_replacements'); display_sidebox(self::$appname,$title,$file); } if ($GLOBALS['egw_info']['user']['apps']['admin']) self::admin(self::$appname); diff --git a/infolog/inc/class.infolog_hooks.inc.php b/infolog/inc/class.infolog_hooks.inc.php index a1cd42fd56..f7837b217b 100644 --- a/infolog/inc/class.infolog_hooks.inc.php +++ b/infolog/inc/class.infolog_hooks.inc.php @@ -165,6 +165,7 @@ class infolog_hooks 'no_lang' => true, 'link' => "javascript:app.infolog.add_link_sidemenu();" ), + ['text'=>'--'], 'Placeholders' => Egw::link('/index.php','menuaction=infolog.infolog_merge.show_replacements') ); display_sidebox($appname,$GLOBALS['egw_info']['apps']['infolog']['title'].' '.lang('Menu'),$file); diff --git a/timesheet/inc/class.timesheet_hooks.inc.php b/timesheet/inc/class.timesheet_hooks.inc.php index b83d6add86..c08fd99c58 100644 --- a/timesheet/inc/class.timesheet_hooks.inc.php +++ b/timesheet/inc/class.timesheet_hooks.inc.php @@ -126,6 +126,7 @@ class timesheet_hooks 'link' => "javascript:egw.open('','$appname','add')" ), ); + $file[] = ['text'=>'--']; $file['Placeholders'] = Egw::link('/index.php','menuaction=timesheet.timesheet_merge.show_replacements'); display_sidebox($appname,$GLOBALS['egw_info']['apps'][$appname]['title'].' '.lang('Menu'),$file); }