Merge pull request #11437 from owncloud/add-import-filter

Add CssImportFilter. More elegant fix for documents#348
This commit is contained in:
Morris Jobke 2014-10-07 08:28:08 +02:00
commit 6323d5fb3a
1 changed files with 10 additions and 1 deletions

View File

@ -3,6 +3,7 @@ use Assetic\Asset\AssetCollection;
use Assetic\Asset\FileAsset;
use Assetic\AssetWriter;
use Assetic\Filter\CssRewriteFilter;
use Assetic\Filter\CssImportFilter;
/**
* Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl>
@ -167,7 +168,15 @@ class OC_TemplateLayout extends OC_Template {
$assetPath = $root . '/' . $file;
$sourceRoot = \OC::$SERVERROOT;
$sourcePath = substr($assetPath, strlen(\OC::$SERVERROOT));
return new FileAsset($assetPath, array(new CssRewriteFilter()), $sourceRoot, $sourcePath);
return new FileAsset(
$assetPath,
array(
new CssRewriteFilter(),
new CssImportFilter()
),
$sourceRoot,
$sourcePath
);
}, $cssFiles);
$cssCollection = new AssetCollection($cssFiles);
$cssCollection->setTargetPath("assets/$cssHash.css");