source: trunk/expressoMail1_2/assetic_css.php @ 7724

Revision 7724, 2.3 KB checked in by angelo, 11 years ago (diff)

Ticket #3277 - Contagem de estrelas nao funciona no firefox

Line 
1<?php
2header("Content-Type: text/css");
3use Assetic\Asset\AssetCache;
4use Assetic\Cache\FilesystemCache;
5use Assetic\Asset\AssetCollection;
6use Assetic\Asset\FileAsset;
7use Assetic\Asset\GlobAsset;
8use Assetic\Filter\Yui;
9use Assetic\FilterManager;
10use Assetic\Filter;
11
12spl_autoload_register(
13    function($className)
14    {
15        $className = str_replace("_", "\\", $className);
16        $className = ltrim($className, '\\');
17        $fileName = '';
18        $namespace = '';
19        if ($lastNsPos = strripos($className, '\\'))
20        {
21            $namespace = substr($className, 0, $lastNsPos);
22            $className = substr($className, $lastNsPos + 1);
23            $fileName = '../prototype/library/' . str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
24        }
25        $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
26
27        require $fileName;
28    }
29);
30
31$javaVersion = shell_exec("java -version 2>&1");
32$filterManager = new FilterManager();
33$compressor = new Yui\CssCompressorFilter('../prototype/library/yuicompressor/yuicompressor.jar');
34$compressor->setCharset("ISO-8859-1");
35
36$css = new AssetCollection(array(
37            new FileAsset('../prototype/plugins/freeow/style/freeow/freeow.css'),
38            new FileAsset('../phpgwapi/js/dftree/dftree.css'),
39            new FileAsset('../prototype/plugins/farbtastic/farbtastic.css'),
40            new FileAsset('../prototype/plugins/jqgrid/themes/prognusone/jquery-ui-1.8.2.custom.css'),
41            new FileAsset('../prototype/modules/mail/css/foldertree.css'),
42            new FileAsset('../prototype/modules/calendar/css/layout.css'),
43            new FileAsset('../prototype/plugins/jquery.spinner/jquery.spinner.css'),
44            new FileAsset('../prototype/plugins/fullcalendar/fullcalendar.css'),
45            new FileAsset('../prototype/plugins/fullcalendar/fullcalendar.print.css'),
46            new FileAsset('../prototype/plugins/icalendar/jquery.icalendar.css'),
47            new FileAsset('../prototype/plugins/timepicker/jquery-ui-timepicker-addon.css') 
48    )
49);
50
51if (strpos($javaVersion,"java version") !== false){
52    $filterManager->set('yui_css', $compressor);   
53    $css->ensureFilter($filterManager->get('yui_css'));   
54}
55
56$cssCache = new AssetCache($css,new FilesystemCache('/tmp'));
57echo $cssCache->dump();
58
59?>
Note: See TracBrowser for help on using the repository browser.