Web\StyleSheet: outer #layout access for modules

fixes #7093
This commit is contained in:
Thomas Gelf 2014-09-05 10:55:25 +02:00
parent b14e7f5696
commit 4c8407e2b6
1 changed files with 10 additions and 1 deletions

View File

@ -45,6 +45,15 @@ class StyleSheet
self::send(true);
}
protected static function fixModuleLayoutCss($css)
{
return preg_replace(
'/(\.icinga-module\.module-[^\s]+) (#layout\.[^\s]+)/m',
'\2 \1',
$css
);
}
public static function send($minified = false)
{
$app = Icinga::app();
@ -84,7 +93,7 @@ class StyleSheet
if ($minified) {
$less->compress();
}
$out = $less->compile();
$out = self::fixModuleLayoutCss($less->compile());
$cache->store($cacheFile, $out);
echo $out;
}