parent
9cea83242c
commit
c7cc9e66df
|
@ -42,17 +42,6 @@ class JavaScript
|
|||
'js/vendor/jquery.tipsy'
|
||||
);
|
||||
|
||||
public static function listModuleFiles()
|
||||
{
|
||||
$list = array();
|
||||
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $name => $module) {
|
||||
if ($module->hasJs()) {
|
||||
$list[] = 'js/' . $name . '/module.js';
|
||||
}
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
public static function sendMinified()
|
||||
{
|
||||
return self::send(true);
|
||||
|
@ -86,7 +75,11 @@ class JavaScript
|
|||
|
||||
foreach (Icinga::app()->getModuleManager()->getLoadedModules() as $name => $module) {
|
||||
if ($module->hasJs()) {
|
||||
$jsFiles[] = $module->getJsFilename();
|
||||
foreach ($module->getJsFiles() as $path) {
|
||||
if (file_exists($path)) {
|
||||
$jsFiles[] = $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$files = array_merge($vendorFiles, $jsFiles);
|
||||
|
@ -114,7 +107,7 @@ class JavaScript
|
|||
}
|
||||
|
||||
foreach ($jsFiles as $file) {
|
||||
$js .= file_get_contents($file);
|
||||
$js .= file_get_contents($file) . "\n\n\n";
|
||||
}
|
||||
|
||||
if ($minified) {
|
||||
|
|
Loading…
Reference in New Issue