[7581] | 1 | <?php |
---|
[7664] | 2 | header("Content-Type: text/css"); |
---|
[7581] | 3 | use Assetic\Asset\AssetCache; |
---|
| 4 | use Assetic\Cache\FilesystemCache; |
---|
| 5 | use Assetic\Asset\AssetCollection; |
---|
| 6 | use Assetic\Asset\FileAsset; |
---|
| 7 | use Assetic\Asset\GlobAsset; |
---|
| 8 | use Assetic\Filter\Yui; |
---|
[7647] | 9 | use Assetic\FilterManager; |
---|
| 10 | use Assetic\Filter; |
---|
[7581] | 11 | |
---|
| 12 | spl_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 | |
---|
[7647] | 31 | $javaVersion = shell_exec("java -version 2>&1"); |
---|
| 32 | $filterManager = new FilterManager(); |
---|
[7581] | 33 | $compressor = new Yui\CssCompressorFilter('../prototype/library/yuicompressor/yuicompressor.jar'); |
---|
[7647] | 34 | $compressor->setCharset("ISO-8859-1"); |
---|
| 35 | |
---|
| 36 | $css = new AssetCollection(array( |
---|
[7581] | 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') |
---|
[7647] | 48 | ) |
---|
[7581] | 49 | ); |
---|
| 50 | |
---|
[7647] | 51 | if (strpos($javaVersion,"java version") !== false){ |
---|
| 52 | $filterManager->set('yui_css', $compressor); |
---|
| 53 | $css->ensureFilter($filterManager->get('yui_css')); |
---|
| 54 | } |
---|
[7581] | 55 | |
---|
[7647] | 56 | $cssCache = new AssetCache($css,new FilesystemCache('/tmp')); |
---|
| 57 | echo $cssCache->dump(); |
---|
| 58 | |
---|
[7581] | 59 | ?> |
---|