From 6daa262779ed99961ac2ffae78dd2890e9443425 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 Mar 2019 20:32:25 +0100 Subject: [PATCH] Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming convention of extension .inc.php for files to be included. --- ChangeLog | 2 ++ htdocs/adherents/stats/geo.php | 2 +- htdocs/comm/action/index.php | 2 +- htdocs/comm/action/pertype.php | 2 +- htdocs/comm/action/peruser.php | 2 +- htdocs/core/class/dolgraph.class.php | 2 +- .../eldy/{_badges.css.php => badges.inc.php} | 0 .../eldy/{_global.css.php => global.inc.php} | 6 ++-- ...ons.css.php => main_menu_fa_icons.inc.php} | 0 htdocs/theme/eldy/style.css.php | 12 +++---- .../{theme_vars.php => theme_vars.inc.php} | 16 ++++++--- htdocs/theme/md/graph-color.php | 33 ------------------- htdocs/theme/md/style.css.php | 26 ++++----------- .../graph-color.php => md/theme_vars.inc.php} | 30 ++++++++++++++--- 14 files changed, 58 insertions(+), 77 deletions(-) rename htdocs/theme/eldy/{_badges.css.php => badges.inc.php} (100%) rename htdocs/theme/eldy/{_global.css.php => global.inc.php} (99%) rename htdocs/theme/eldy/{_main_menu_fa_icons.css.php => main_menu_fa_icons.inc.php} (100%) rename htdocs/theme/eldy/{theme_vars.php => theme_vars.inc.php} (77%) delete mode 100644 htdocs/theme/md/graph-color.php rename htdocs/theme/{eldy/graph-color.php => md/theme_vars.inc.php} (55%) diff --git a/ChangeLog b/ChangeLog index 4d9f8b012cc..c931f9ea865 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,8 @@ Following changes may create regressions for some external modules, but were nec * Method GetUrlTrackingStatus were renamed into getUrlTrackingStatus for consistency with naming rules. * API getListOfCivility has been renamed into getListOfCivilities for consistency with naming rules. * Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.; +* Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming + convention of extension .inc.php for files to be included. ***** ChangeLog for 9.0.1 compared to 9.0.0 ***** diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index 79aa5ab6a82..568c8ea6af9 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -244,7 +244,7 @@ else // Show graphics if (count($arrayjs) && $mode == 'memberbycountry') { - $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; + $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; if (is_readable($color_file)) include_once $color_file; // Assume we've already included the proper headers so just call our script inline diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index d47f1709b28..de7c43092b6 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1017,7 +1017,7 @@ $cachecontacts=array(); $cacheusers=array(); // Define theme_datacolor array -$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; +$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; if (is_readable($color_file)) { include_once $color_file; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index da5b1346fc2..b52635b80d4 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -555,7 +555,7 @@ $cachethirdparties=array(); $cachecontacts=array(); // Define theme_datacolor array -$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; +$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; if (is_readable($color_file)) { include_once $color_file; diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 33199f2dd6c..2ed25c9dd55 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -599,7 +599,7 @@ $cachecontacts=array(); $cacheusers=array(); // Define theme_datacolor array -$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php"; +$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; if (is_readable($color_file)) { include_once $color_file; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 386b378abdd..514ae0369ed 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -116,7 +116,7 @@ class DolGraph $this->datacolor = array(array(120,130,150), array(160,160,180), array(190,190,220)); $this->bgcolor = array(235,235,224); - $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; + $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; if (is_readable($color_file)) { include_once $color_file; diff --git a/htdocs/theme/eldy/_badges.css.php b/htdocs/theme/eldy/badges.inc.php similarity index 100% rename from htdocs/theme/eldy/_badges.css.php rename to htdocs/theme/eldy/badges.inc.php diff --git a/htdocs/theme/eldy/_global.css.php b/htdocs/theme/eldy/global.inc.php similarity index 99% rename from htdocs/theme/eldy/_global.css.php rename to htdocs/theme/eldy/global.inc.php index b9eb5a79d4b..aaecf23dd44 100644 --- a/htdocs/theme/eldy/_global.css.php +++ b/htdocs/theme/eldy/global.inc.php @@ -427,7 +427,7 @@ textarea.centpercent { cursor: not-allowed; } - + .borderrightlight { @@ -1488,7 +1488,7 @@ a.tmenuimage:hover{ global->MAIN_USE_FONT_AWESOME_5)) { ?> - + div.mainmenu.home{ background-image: url(); @@ -3578,7 +3578,7 @@ div.ui-tooltip.mytooltip { -o-box-shadow: 0.5px 0.5px 4px 0px rgba(0, 0, 0, 0.5); box-shadow: 0.5px 0.5px 4px 0px rgba(0, 0, 0, 0.5); filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=134, Strength=5); - background: !important; + background: !important; color : ; } diff --git a/htdocs/theme/eldy/_main_menu_fa_icons.css.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php similarity index 100% rename from htdocs/theme/eldy/_main_menu_fa_icons.css.php rename to htdocs/theme/eldy/main_menu_fa_icons.inc.php diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index bb03fd73520..8087c955592 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -24,7 +24,7 @@ * \file htdocs/theme/eldy/style.css.php * \brief File for CSS style sheet Eldy */ - + //if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Not disabled because need to load personalized language //if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Not disabled to increase speed. Language code is found on url. if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); @@ -39,12 +39,11 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); define('ISLOADEDBYSTEELSHEET', '1'); -require_once __DIR__ . '/theme_vars.php'; - - +require __DIR__ . '/theme_vars.inc.php'; if (defined('THEME_ONLY_CONSTANT')) return; + session_cache_limiter('public'); require_once __DIR__.'/../../main.inc.php'; // __DIR__ allow this script to be included in custom themes @@ -236,10 +235,7 @@ print 'toolTipFontColor='.$toolTipFontColor."\n"; print '*/'."\n"; - - -require_once __DIR__ . '/_global.css.php'; - +require __DIR__ . '/global.inc.php'; if (is_object($db)) $db->close(); diff --git a/htdocs/theme/eldy/theme_vars.php b/htdocs/theme/eldy/theme_vars.inc.php similarity index 77% rename from htdocs/theme/eldy/theme_vars.php rename to htdocs/theme/eldy/theme_vars.inc.php index 64910c0d96e..f8451f3e56f 100644 --- a/htdocs/theme/eldy/theme_vars.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -21,12 +21,20 @@ */ /** - * \file htdocs/theme/eldy/theme_vars.css.php - * \brief File for CSS style sheet Eldy + * \file htdocs/theme/eldy/theme_vars.inc.php + * \brief File to declare variables of CSS style sheet + * \ingroup core + * + * To include file, do this: + * $var_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + * if (is_readable($var_file)) include $var_file; */ -if (defined('THEME_ONLY_CONSTANT')) return; - +global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; +$theme_bordercolor = array(235,235,224); +$theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); +$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); +$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); // Colors $colorbackhmenu1='60,70,100'; // topmenu diff --git a/htdocs/theme/md/graph-color.php b/htdocs/theme/md/graph-color.php deleted file mode 100644 index 78a621ada1d..00000000000 --- a/htdocs/theme/md/graph-color.php +++ /dev/null @@ -1,33 +0,0 @@ - - * Copyright (C) 2004-2012 Laurent Destailleur - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -/** - * \file htdocs/theme/md/graph-color.php - * \brief File to declare colors to use to build graphics with theme Material Design - * \ingroup core - * - * To include file, do this: - * $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; - * if (is_readable($color_file)) include_once $color_file; - */ - -global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; -$theme_bordercolor = array(235,235,224); -$theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); -$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); -$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 3675ef0427e..56fdc017604 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -37,31 +37,17 @@ if (! defined('NOLOGIN')) define('NOLOGIN', 1); // File must be if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -// Colors -$colorbackhmenu1='90,50,120'; // topmenu -$colorbackvmenu1='255,255,255'; // vmenu -$colortopbordertitle1=''; // top border of tables-lists title. not defined = default to colorbackhmenu1 -$colorbacktitle1='240,240,240'; // title of tables-lists -$colorbacktabcard1='255,255,255'; // card -$colorbacktabactive='234,234,234'; -$colorbacklineimpair1='255,255,255'; // line impair -$colorbacklineimpair2='255,255,255'; // line impair -$colorbacklinepair1='248,248,248'; // line pair -$colorbacklinepair2='246,246,246'; // line pair -$colorbacklinepairhover='230,237,244'; // line pair -$colorbacklinebreak='214,218,220'; -$colorbackbody='248,248,248'; -$colortexttitlenotab='90,90,90'; -$colortexttitle='20,20,20'; -$colortext='0,0,0'; -$colortextlink='0,0,120'; -$fontsize='14'; -$fontsizesmaller='11'; +define('ISLOADEDBYSTEELSHEET', '1'); + + +require __DIR__ . '/theme_vars.inc.php'; if (defined('THEME_ONLY_CONSTANT')) return; + session_cache_limiter('public'); + require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; diff --git a/htdocs/theme/eldy/graph-color.php b/htdocs/theme/md/theme_vars.inc.php similarity index 55% rename from htdocs/theme/eldy/graph-color.php rename to htdocs/theme/md/theme_vars.inc.php index 49091d810b1..47b8d93fdbb 100644 --- a/htdocs/theme/eldy/graph-color.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -17,13 +17,13 @@ */ /** - * \file htdocs/theme/eldy/graph-color.php - * \brief File to declare colors to use to build graphics with theme Eldy + * \file htdocs/theme/md/theme_vars.inc.php + * \brief File to declare variables of CSS style sheet * \ingroup core * * To include file, do this: - * $color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php'; - * if (is_readable($color_file)) include_once $color_file; + * $var_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + * if (is_readable($var_file)) include $var_file; */ global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet; @@ -31,3 +31,25 @@ $theme_bordercolor = array(235,235,224); $theme_datacolor = array(array(136,102,136), array(0,130,110), array(140,140,220), array(190,120,120), array(190,190,100), array(115,125,150), array(100,170,20), array(250,190,30), array(150,135,125), array(85,135,150), array(150,135,80), array(150,80,150)); $theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4')); $theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC')); + + +// Colors +$colorbackhmenu1='90,50,120'; // topmenu +$colorbackvmenu1='255,255,255'; // vmenu +$colortopbordertitle1=''; // top border of tables-lists title. not defined = default to colorbackhmenu1 +$colorbacktitle1='240,240,240'; // title of tables-lists +$colorbacktabcard1='255,255,255'; // card +$colorbacktabactive='234,234,234'; +$colorbacklineimpair1='255,255,255'; // line impair +$colorbacklineimpair2='255,255,255'; // line impair +$colorbacklinepair1='248,248,248'; // line pair +$colorbacklinepair2='246,246,246'; // line pair +$colorbacklinepairhover='230,237,244'; // line pair +$colorbacklinebreak='214,218,220'; +$colorbackbody='248,248,248'; +$colortexttitlenotab='90,90,90'; +$colortexttitle='20,20,20'; +$colortext='0,0,0'; +$colortextlink='0,0,120'; +$fontsize='14'; +$fontsizesmaller='11';