diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index 203834ebb..5d197e3be 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -149,6 +149,31 @@ function generateJSsInclude($JSs) } } +/** + * Generates tags for the javascript modules you want to include, the parameter could by a string or an array of strings + */ +function generateJSModulesInclude($JSModules) +{ + $jsInclude = ''; + + $ci =& get_instance(); + $cachetoken = '?'.$ci->config->item('fhcomplete_build_version'); + + if (isset($JSModules)) + { + $tmpJSs = is_array($JSModules) ? $JSModules : array($JSModules); + + for ($tmpJSsCounter = 0; $tmpJSsCounter < count($tmpJSs); $tmpJSsCounter++) + { + $toPrint = sprintf($jsInclude, base_url($tmpJSs[$tmpJSsCounter].$cachetoken)).PHP_EOL; + + if ($tmpJSsCounter > 0) $toPrint = "\t\t".$toPrint; + + echo $toPrint; + } + } +} + /** * Generates all the includes needed by the Addons */ @@ -180,3 +205,4 @@ function generateBackwardCompatibleJSMsIe($js) echo ' '."\n"; echo "\n"; } + diff --git a/application/views/system/logs/logsViewer.php b/application/views/system/logs/logsViewer.php index 9f3e0a75b..4accde521 100644 --- a/application/views/system/logs/logsViewer.php +++ b/application/views/system/logs/logsViewer.php @@ -14,7 +14,7 @@ 'global' => array('mailAnXversandt'), 'ui' => array('bitteEintragWaehlen') ), - 'customJSs' => array('public/js/apps/LogsViewer.js') + 'customJSModules' => array('public/js/apps/LogsViewer.js') ); $this->load->view('templates/FHC-Header', $includesArray); @@ -36,6 +36,50 @@