[7643] | 1 | <?php |
---|
[7664] | 2 | header("Content-Type: text/css"); |
---|
[7643] | 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; |
---|
| 9 | use Assetic\FilterManager; |
---|
| 10 | use Assetic\Filter; |
---|
| 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 = '../../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 | define( 'MODULESURL' , '../../modules/calendar' ); |
---|
| 32 | define( 'PLUGINSURL' , '../../plugins' ); |
---|
| 33 | $javaVersion = shell_exec("java -version 2>&1"); |
---|
| 34 | $filterManager = new FilterManager(); |
---|
| 35 | $compressor = new Yui\CssCompressorFilter('../../library/yuicompressor/yuicompressor.jar'); |
---|
| 36 | $compressor->setCharset("ISO-8859-1"); |
---|
| 37 | |
---|
| 38 | $css = new AssetCollection(array( |
---|
| 39 | //new FileAsset(MODULESURL.'/css/reset.css'), |
---|
[7680] | 40 | //new FileAsset(PLUGINSURL.'/fullcalendar/fullcalendar.css'), |
---|
| 41 | //new FileAsset(PLUGINSURL.'/fullcalendar/fullcalendar.print.css'), |
---|
[7643] | 42 | //new FileAsset(PLUGINSURL.'/jquery/jquery-ui.css'), |
---|
| 43 | new FileAsset(PLUGINSURL.'/icalendar/jquery.icalendar.css'), |
---|
| 44 | //new FileAsset(PLUGINSURL.'/fgmenu/fg.menu.css'), |
---|
| 45 | new FileAsset(PLUGINSURL.'/fileupload/jquery.fileupload-ui.css'), |
---|
| 46 | new FileAsset(PLUGINSURL.'/jquery.pagination/pagination.css'), |
---|
| 47 | new FileAsset(PLUGINSURL.'/jpicker/css/jPicker-1.1.6.min.css'), |
---|
| 48 | new FileAsset(PLUGINSURL.'/jpicker/jPicker.css'), |
---|
[7692] | 49 | //new FileAsset(PLUGINSURL.'/farbtastic/farbtastic.css'), |
---|
[7643] | 50 | new FileAsset(PLUGINSURL.'/timepicker/jquery-ui-timepicker-addon.css'), |
---|
| 51 | //new FileAsset(PLUGINSURL.'/zebradialog/css/zebra_dialog.css'), |
---|
| 52 | new FileAsset(PLUGINSURL.'/jquery.spinner/jquery.spinner.css') |
---|
| 53 | //new FileAsset(MODULESURL.'/css/layout.css'), |
---|
| 54 | //new FileAsset(MODULESURL.'/css/style.css') |
---|
| 55 | ) |
---|
| 56 | ); |
---|
| 57 | |
---|
| 58 | if (strpos($javaVersion,"java version") !== false){ |
---|
[7680] | 59 | $filterManager->set('yui_css', $compressor); |
---|
| 60 | $css->ensureFilter($filterManager->get('yui_css')); |
---|
[7643] | 61 | } |
---|
| 62 | |
---|
[7680] | 63 | $cssCache = new AssetCache($css, new FilesystemCache('/tmp')); |
---|
[7643] | 64 | echo $cssCache->dump(); |
---|
| 65 | |
---|
| 66 | ?> |
---|