diff --git a/htdocs/core/bookmarks_page.php b/htdocs/core/bookmarks_page.php index 9915a259570..9c3b5abb266 100644 --- a/htdocs/core/bookmarks_page.php +++ b/htdocs/core/bookmarks_page.php @@ -55,6 +55,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); * View */ +// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. +if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) { + header('Cache-Control: max-age='.GETPOST('cache', 'int').', public'); + // For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server + header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT'); + // HTTP/1.0 + header('Pragma: token=public'); +} else { + // HTTP/1.0 + header('Cache-Control: no-cache'); +} + $title = $langs->trans("Bookmarks"); // URL http://mydolibarr/core/bookmarks_page?dol_use_jmobile=1 can be used for tests diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index e04971ce8c3..77b0416956b 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -81,6 +81,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); * View */ +// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. +if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) { + header('Cache-Control: max-age='.GETPOST('cache', 'int').', public, must-revalidate'); + // For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server + header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT'); + // HTTP/1.0 + header('Pragma: token=public'); +} else { + // HTTP/1.0 + header('Cache-Control: no-cache'); +} + $title = $langs->trans("Menu"); // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index a72479115c5..3e75f8efcd5 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -85,13 +85,9 @@ class modHRM extends DolibarrModules // Set this to 1 if module has its own theme directory (theme) 'theme' => 0, // Set this to relative path of css file if module has its own css file - 'css' => array( - '/hrm/css/radio_js_number.css', - ), + 'css' => array(), // Set this to relative path of js file if module must load a js on all pages - 'js' => array( - // '/hrm/js/hrm.js.php', - ), + 'js' => array(), // Set this to 1 if features of module are opened to external users 'moduleforexternal' => 0, diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index 0341c1116ef..4f6911497e4 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -55,6 +55,18 @@ $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); * View */ +// Important: Following code is to avoid page request by browser and PHP CPU at each Dolibarr page access. +if (empty($dolibarr_nocache) && GETPOST('cache', 'int')) { + header('Cache-Control: max-age='.GETPOST('cache', 'int').', public'); + // For a .php, we must set an Expires to avoid to have it forced to an expired value by the web server + header('Expires: '.gmdate('D, d M Y H:i:s', dol_now('gmt') + GETPOST('cache', 'int')).' GMT'); + // HTTP/1.0 + header('Pragma: token=public'); +} else { + // HTTP/1.0 + header('Cache-Control: no-cache'); +} + $title = $langs->trans("Search"); // URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests diff --git a/htdocs/hrm/css/radio_js_number.css b/htdocs/hrm/css/radio_js_number.css deleted file mode 100644 index 320b0ddc1f2..00000000000 --- a/htdocs/hrm/css/radio_js_number.css +++ /dev/null @@ -1,18 +0,0 @@ -.radio_js_bloc_number { - display:inline-block; - padding:5px 7px; - min-width:20px; - border-radius:3px; - border:1px solid #ccc; - background:#eee; - color:#555; - cursor:pointer; - margin:2px; - text-align:center; -} -.radio_js_bloc_number.selected { - transition:0.2s ease background; - background:#888; - color:#fff; - border-color:#555; -} \ No newline at end of file diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index fedb4f9d67e..d8bd4673d5c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -6967,6 +6967,29 @@ div.clipboardCPValue.hidewithsize { } +/* ============================================================================== */ +/* CSS style used for hrm skill/rank (may be we can remove this) */ +/* ============================================================================== */ + +.radio_js_bloc_number { + display:inline-block; + padding:5px 7px; + min-width:20px; + border-radius:3px; + border:1px solid #ccc; + background:#eee; + color:#555; + cursor:pointer; + margin:2px; + text-align:center; +} +.radio_js_bloc_number.selected { + transition:0.2s ease background; + background:#888; + color:#fff; + border-color:#555; +} + /* ============================================================================== */ /* CSS style used for small screen */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 79d7c929927..6805f2c620e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -6854,6 +6854,29 @@ div.clipboardCPValue.hidewithsize { } +/* ============================================================================== */ +/* CSS style used for hrm skill/rank (may be we can remove this) */ +/* ============================================================================== */ + +.radio_js_bloc_number { + display:inline-block; + padding:5px 7px; + min-width:20px; + border-radius:3px; + border:1px solid #ccc; + background:#eee; + color:#555; + cursor:pointer; + margin:2px; + text-align:center; +} +.radio_js_bloc_number.selected { + transition:0.2s ease background; + background:#888; + color:#fff; + border-color:#555; +} + /* ============================================================================== */ /* CSS style used for small screen */