]> source.dussan.org Git - nextcloud-server.git/commitdiff
Add CssImportFilter. More elegant fix for documents#348
authorVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 6 Oct 2014 16:39:02 +0000 (19:39 +0300)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Mon, 6 Oct 2014 16:39:02 +0000 (19:39 +0300)
lib/private/templatelayout.php

index 7ac0bd97abe9d90d01a8fac054685c65ce59e7c5..e9172fd2da551ea9f372739b587691cdbab637f1 100644 (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");