Changeset 2640 for trunk/phpgwapi


Ignore:
Timestamp:
04/27/10 16:41:59 (14 years ago)
Author:
amuller
Message:

Ticket #1044 - Implementa compactador inicialmente só sendo chamado na api

Location:
trunk/phpgwapi
Files:
5 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpgwapi/inc/class.common.inc.php

    r2630 r2640  
    13261326                        // search for app specific css file 
    13271327                        if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) ) 
    1328                         { 
    1329                                 $css = "/%s/templates/%s/%s.css"; 
    1330  
    1331                                 global $path, $link, $template; 
    1332  
    1333                                 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css ); 
    1334  
    1335                                 $link = '<link href="%s" type="text/css" rel="StyleSheet" />'; 
    1336                                 $link = "\n\t\t" . sprintf( $link, 
    1337                                         "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}" 
    1338                                 ); 
    1339  
     1328                        {                
     1329                                require_once('class.css.inc.php'); 
     1330                                $cssObj = new css(); 
     1331 
     1332                                $path = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]; 
    13401333                                $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ]; 
    13411334 
    1342                                 function _css( $module, $css ) 
    1343                                 { 
    1344                                         global $link, $path, $template; 
    1345  
    1346                                         if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) ) 
    1347                                                 return sprintf( $link, $module, $template, $css ); 
    1348  
    1349                                         if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) ) 
    1350                                                 return sprintf( $link, $module, 'default', $css ); 
    1351  
    1352                                         return ''; 
    1353                                 } 
    1354  
    1355                                 $css = _css( 'phpgwapi', 'css/base' ); 
    1356                                 $css .= _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 
    1357                                 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" ); 
    1358                                 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' ); 
    1359  
    1360                                 if ( $css ) 
    1361                                         $tpl -> set_var( 'css_file', $css ); 
     1335                                $cssObj->validate_file($path."phpgwapi/templates/".$template."/css/base.css"); 
     1336                                $cssObj->validate_file($path."phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1337                                $cssObj->validate_file($path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css"); 
     1338                                $cssObj->validate_file($path.$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css"); 
     1339                                 
     1340                                $tpl -> set_var( 'css_file',  $cssObj->get_css() ); 
    13621341                        } 
    13631342 
  • trunk/phpgwapi/templates/default/css

    • Property svn:ignore set to
      *csspack.css
Note: See TracChangeset for help on using the changeset viewer.