parent
712d545f48
commit
9cea83242c
|
@ -93,14 +93,21 @@ class LessCompiler
|
|||
public function addModule($name, $module)
|
||||
{
|
||||
if ($module->hasCss()) {
|
||||
$this->source .= "\n/* CSS: modules/$name/module.less */\n"
|
||||
$contents = array();
|
||||
foreach ($module->getCssFiles() as $path) {
|
||||
if (file_exists($path)) {
|
||||
$contents[] = "/* CSS: modules/$name/$path */\n" . file_get_contents($path);
|
||||
}
|
||||
}
|
||||
|
||||
$this->source .= ''
|
||||
. '.icinga-module.module-'
|
||||
. $name
|
||||
. " {\n"
|
||||
. file_get_contents($module->getCssFilename())
|
||||
. "}\n\n"
|
||||
;
|
||||
. join("\n\n", $contents)
|
||||
. "}\n\n";
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,11 @@ class StyleSheet
|
|||
$files = $lessFiles;
|
||||
foreach ($app->getModuleManager()->getLoadedModules() as $name => $module) {
|
||||
if ($module->hasCss()) {
|
||||
$files[] = $module->getCssFilename();
|
||||
foreach ($module->getCssFiles() as $path) {
|
||||
if (file_exists($path)) {
|
||||
$files[] = $path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue