Changeset 7647


Ignore:
Timestamp:
12/12/12 15:34:10 (7 years ago)
Author:
angelo
Message:

Ticket #3197 - Reduzir tempo de carregamento do modulo Expresso Mail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoMail1_2/assetic_css.php

    r7583 r7647  
    66use Assetic\Asset\GlobAsset; 
    77use Assetic\Filter\Yui; 
     8use Assetic\FilterManager; 
     9use Assetic\Filter; 
    810 
    911spl_autoload_register( 
     
    2628); 
    2729 
     30$javaVersion = shell_exec("java -version 2>&1"); 
     31$filterManager = new FilterManager(); 
    2832$compressor = new Yui\CssCompressorFilter('../prototype/library/yuicompressor/yuicompressor.jar'); 
    29 $css = new AssetCache(new AssetCollection(array( 
     33$compressor->setCharset("ISO-8859-1"); 
     34 
     35$css = new AssetCollection(array( 
    3036            new FileAsset('../prototype/plugins/freeow/style/freeow/freeow.css'), 
    3137            new FileAsset('../phpgwapi/js/dftree/dftree.css'), 
     
    4046            new FileAsset('../prototype/plugins/jquery.jrating/jRating.jquery.css'), 
    4147            new FileAsset('../prototype/plugins/timepicker/jquery-ui-timepicker-addon.css')   
    42         ),array($compressor) 
    43     ),new FilesystemCache('/tmp') 
     48    ) 
    4449); 
    4550 
    46 echo $css->dump(); 
     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(); 
    4758 
    4859?> 
Note: See TracChangeset for help on using the changeset viewer.