mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Merge pull request #32974 from FHenry/dev_DISABLED_JQUERY_UI
NEW: add const to not include default CSS in top_htmlhead with DISABLE_JQUERY_UI
This commit is contained in:
commit
aea8e51bc3
|
|
@ -2012,14 +2012,16 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||
|
||||
if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) {
|
||||
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
|
||||
$jquerytheme = 'base';
|
||||
if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) {
|
||||
$jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME');
|
||||
}
|
||||
if (constant('JS_JQUERY_UI')) {
|
||||
print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // Forced JQuery
|
||||
} else {
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext ? '?'.$ext : '').'">'."\n"; // JQuery
|
||||
if (!defined('DISABLE_JQUERY_UI')) {
|
||||
$jquerytheme = 'base';
|
||||
if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) {
|
||||
$jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME');
|
||||
}
|
||||
if (constant('JS_JQUERY_UI')) {
|
||||
print '<link rel="stylesheet" type="text/css" href="' . JS_JQUERY_UI . 'css/' . $jquerytheme . '/jquery-ui.min.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // Forced JQuery
|
||||
} else {
|
||||
print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/css/' . $jquerytheme . '/jquery-ui.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // JQuery
|
||||
}
|
||||
}
|
||||
if (!defined('DISABLE_JQUERY_JNOTIFY')) {
|
||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // JNotify
|
||||
|
|
@ -2120,10 +2122,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
|
|||
} else {
|
||||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
}
|
||||
if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
|
||||
print '<script nonce="'.getNonce().'" src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
} else {
|
||||
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
|
||||
if (!defined('DISABLE_JQUERY_UI')) {
|
||||
if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
|
||||
print '<script nonce="' . getNonce() . '" src="' . JS_JQUERY_UI . 'jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
|
||||
} else {
|
||||
print '<script nonce="' . getNonce() . '" src="' . DOL_URL_ROOT . '/includes/jquery/js/jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
|
||||
}
|
||||
}
|
||||
// jQuery jnotify
|
||||
if (!getDolGlobalString('MAIN_DISABLE_JQUERY_JNOTIFY') && !defined('DISABLE_JQUERY_JNOTIFY')) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user