11960-Fix url import datatables node/meta

This commit is contained in:
Pablo Aragon 2023-08-28 14:10:03 +02:00
parent 85c2cc507f
commit 17bfcba735
2 changed files with 13 additions and 18 deletions

View File

@ -4165,11 +4165,7 @@ function ui_print_datatable(array $parameters)
$parameters['dataElements'] = json_encode($parameters['data_element']);
// * START JAVASCRIPT.
if (is_metaconsole() === false) {
$file_path = 'include/javascript/datatablesFunction.js';
} else {
$file_path = '../../include/javascript/datatablesFunction.js';
}
$file_path = $config['homedir'].'/include/javascript/datatablesFunction.js';
$file_content = file_get_contents($file_path);
$json_data = json_encode($parameters);
@ -4229,18 +4225,17 @@ function ui_print_datatable(array $parameters)
false
);
$output .= '?v='.$config['current_package'].'"/>';
if (is_metaconsole() === true) {
// Load meta_tables.css.
$output .= '<link rel="stylesheet" href="';
$output .= ui_get_full_url(
ENTERPRISE_DIR.'/include/styles/meta_tables.css',
false,
false,
false
);
$output .= '?v='.$config['current_package'].'"/>';
}
// if (is_metaconsole() === true) {
// Load meta_tables.css.
// $output .= '<link rel="stylesheet" href="';
// $output .= ui_get_full_url(
// ENTERPRISE_DIR.'/include/styles/meta_tables.css',
// false,
// false,
// false
// );
// $output .= '?v='.$config['current_package'].'"/>';
// }
// Load datatables.js.
$output .= '<script src="';
$output .= ui_get_full_url(

View File

@ -39,7 +39,7 @@ function include_javascript_dependencies_flot_graph($return=false, $mobile=false
$output .= '
<script type="text/javascript">
var phpTimezone = "'.date_default_timezone_get().'";
var configHomeurl = "'.$config['homeurl'].'";
var configHomeurl = "'.((is_metaconsole() === false) ? $config['homeurl'] : '../../').'";
</script>';
// NOTE: jquery.flot.threshold is not te original file. Is patched to allow multiple thresholds and filled area