From 0fd8123606a082d75ce73ce0cef0f74fd2d0996e Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 26 Sep 2023 21:49:15 +0200 Subject: [PATCH] NEW FontAwesome - Add possibility to select another version --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/main.inc.php | 4 ++-- htdocs/takepos/css/pos.css.php | 2 +- htdocs/theme/eldy/dropdown.inc.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 8 ++++---- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 2 +- htdocs/theme/md/dropdown.inc.php | 4 ++-- htdocs/theme/md/main_menu_fa_icons.inc.php | 2 +- htdocs/theme/md/style.css.php | 6 +++--- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2928dd090a5..319f609587d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4293,7 +4293,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $fakey = $pictowithouttext; $facolor = ''; $fasize = ''; - $fa = 'fas'; + $fa = getDolGlobalString('MAIN_FONTAWESOME_ICON_STYLE', 'fas'); if (in_array($pictowithouttext, array('card', 'bell', 'clock', 'establishment', 'generic', 'minus-square', 'object_generic', 'pdf', 'plus-square', 'timespent', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { $fa = 'far'; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 4057397c6e5..2528d402810 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1802,8 +1802,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (!defined('DISABLE_FONT_AWSOME')) { print ''."\n"; - print ''."\n"; - print ''."\n"; + $fontawesome_directory = getDolGlobalString('MAIN_FONTAWESOME_DIRECTORY', '/theme/common/fontawesome-5'); + print ''."\n"; } print ''."\n"; diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index fe7a7aa53ac..281b3ec44e3 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -219,7 +219,7 @@ button.item_value.selected { div[aria-describedby="dialog-info"] button:before { content: "\f788"; - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 900; padding-right: 5px; } diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index ac0b25e8f82..d1445a929f0 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -132,7 +132,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af .dropdown-toggle::after { - font-family: "Font Awesome 5 Free"; + font-family: ""; font-size: 0.7em; font-weight: 900; font-style: normal; @@ -375,7 +375,7 @@ a.dropdown-item { .dropdown-item::before { /* font part */ - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 900; font-style: normal; font-variant: normal; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 850b145fd08..6fb0883087c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1198,7 +1198,7 @@ div.divsearchfield { content: "\f080"; } .a-filter:before, .a-mesure:before { - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 600; padding-right: 5px; padding-left: 5px; @@ -3470,7 +3470,7 @@ div.tabsElem { /* div.tabsElem a.tabactive::before, div.tabsElem a.tabunactive::before { content: "\f0da"; - font-family: "Font Awesome 5 Free"; + font-family: ""; padding-right: 2px; font-weight: 900; } @@ -7526,7 +7526,7 @@ a.phpdebugbar-tab.phpdebugbar-active { font-weight: 600 !important; } .phpdebugbar-fa-tags, .phpdebugbar-fa-tasks, .phpdebugbar-indicator .fa { - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 600; } div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before, @@ -7544,7 +7544,7 @@ div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before { - font-family: "Font Awesome 5 Free" !important; + font-family: "" !important; } /* ============================================================================== */ diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index 395ab219056..818233649ea 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -5,7 +5,7 @@ .mainmenu::before{ /* font part */ - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 900; font-style: normal; font-variant: normal; diff --git a/htdocs/theme/md/dropdown.inc.php b/htdocs/theme/md/dropdown.inc.php index 45551b36842..72337ffcaa9 100644 --- a/htdocs/theme/md/dropdown.inc.php +++ b/htdocs/theme/md/dropdown.inc.php @@ -145,7 +145,7 @@ div#topmenu-global-search-dropdown a::after, div#topmenu-quickadd-dropdown a::af .dropdown-toggle::after { /* font part */ - font-family: "Font Awesome 5 Free"; + font-family: ""; font-size: 0.7em; font-weight: 900; font-style: normal; @@ -386,7 +386,7 @@ a.dropdown-item { .dropdown-item::before { /* font part */ - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 900; font-style: normal; font-variant: normal; diff --git a/htdocs/theme/md/main_menu_fa_icons.inc.php b/htdocs/theme/md/main_menu_fa_icons.inc.php index f2f5e247e78..f171ebdaa50 100644 --- a/htdocs/theme/md/main_menu_fa_icons.inc.php +++ b/htdocs/theme/md/main_menu_fa_icons.inc.php @@ -5,7 +5,7 @@ .mainmenu::before{ /* font part */ - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 900; font-style: normal; font-variant: normal; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 315f3caafbf..6ed7ecdc69b 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1450,7 +1450,7 @@ if ($conf->browser->layout == 'phone') { content: "\f080"; } .a-filter:before, .a-mesure:before { - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 600; padding-right: 5px; padding-left: 5px; @@ -7452,7 +7452,7 @@ a.phpdebugbar-tab.phpdebugbar-active { background-image: unset !important; } .phpdebugbar-indicator .fa { - font-family: "Font Awesome 5 Free"; + font-family: ""; font-weight: 600; } div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before, @@ -7470,7 +7470,7 @@ div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before { - font-family: "Font Awesome 5 Free" !important; + font-family: "" !important; }