Changeset 3052 for branches/2.2


Ignore:
Timestamp:
07/14/10 17:19:29 (14 years ago)
Author:
amuller
Message:

Ticket #1044 - Aplica o compactador do css no branches 2.2

Location:
branches/2.2
Files:
6 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/templates/default/config.tpl

    r1517 r3052  
    77<!-- END header --> 
    88<!-- BEGIN body --> 
    9         <tr class="row_on"> 
     9        <tr class="row_off"> 
    1010    <td>{lang_Time_for_expire_inatives_accounts(0 for never expires)}:</td> 
    1111    <td><input size="8" name="newsettings[time_to_account_expires]" value="{value_time_to_account_expires}"></td> 
    1212   </tr> 
    13    <tr class="row_off"> 
     13   <tr class="row_on"> 
    1414    <td>{lang_Timeout_for_sessions_in_seconds_(default_14400_=_4_hours)}:</td> 
    1515    <td><input size="8" name="newsettings[sessions_timeout]" value="{value_sessions_timeout}"></td> 
    1616   </tr> 
    1717 
    18    <tr class="row_on"> 
     18   <tr class="row_off"> 
    1919    <td>{lang_Timeout_for_application_session_data_in_seconds_(default_86400_=_1_day)}:</td> 
    2020    <td><input size="8" name="newsettings[sessions_app_timeout]" value="{value_sessions_app_timeout}"></td> 
    2121   </tr> 
    2222 
    23    <tr class="row_off"> 
     23   <tr class="row_on"> 
    2424    <td>{lang_Would_you_like_to_show_each_application's_upgrade_status_?}:</td><td> 
    2525     <select name="newsettings[checkappversions]"> 
     
    3030    </td> 
    3131   </tr> 
    32    <tr class="row_on"> 
     32   <tr class="row_off"> 
    3333    <td>{lang_Would_you_like_to_automaticaly_load_new_langfiles_(at_login-time)_?}:</td> 
    3434    <td> 
     
    3939    </td> 
    4040   </tr> 
    41  
     41   <tr class="row_on">  
     42  <td>{lang_enable_stylesheet_packer_?}:</td><td>  
     43  <select name="newsettings[csspacker]">  
     44  <option value="False"{selected_csspacker_False}>{lang_No}</option>  
     45  <option value="True"{selected_csspacker_True}>{lang_Yes}</option>  
     46  </select>  
     47    </td>  
     48    </tr>  
    4249    <tr class="row_off"> 
    4350    <td>{lang_Should_the_login_page_include_a_language_selectbox_(useful_for_demo-sites)_?}:</td> 
  • branches/2.2/expressoMail1_2/index.php

    r3018 r3052  
    1212        $update_version = $GLOBALS['phpgw_info']['flags']['update_version']; 
    1313        $_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user']; 
    14         echo '<link rel="stylesheet" type="text/css" href="templates/'.$_SESSION['phpgw_info']['expressoMail1_2']['user']['preferences']['common']['template_set'].'/main.css">'; 
    15         echo '<link rel="stylesheet" type="text/css" href="../phpgwapi/js/dftree/dftree.css">'; 
     14        $GLOBALS['phpgw']->css->validate_file('expressoMail1_2/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] . '/main.css'); 
     15        $GLOBALS['phpgw']->css->validate_file('phpgwapi/js/dftree/dftree.css'); 
     16        echo $GLOBALS['phpgw']->css->get_css(); 
    1617        echo "<script type='text/javascript'>var template = '".$_SESSION['phpgw_info']['expressoMail1_2']['user']['preferences']['common']['template_set']."';</script>"; 
    1718        echo "<script src='js/modal/modal.js'></script>"; 
  • branches/2.2/phpgwapi/inc/class.common.inc.php

    r3018 r3052  
    12671267                        if ( @ isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] ) )  
    12681268                        {  
    1269                                 $css = "/%s/templates/%s/%s.css";  
    1270  
    1271                                 global $path, $link, $template;  
    1272  
    1273                                 $path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css );  
    1274  
    1275                                 $link = '<LINK href="%s" type="text/css" rel="StyleSheet">';  
    1276                                 $link = sprintf( $link,  
    1277                                         "{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}"  
    1278                                 );  
    1279  
    1280                                 $template = $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ];  
    1281  
    1282                                 function _css( $module, $css )  
    1283                                 {  
    1284                                         global $link, $path, $template;  
    1285  
    1286                                         if ( file_exists( sprintf( $path, $module, $template, str_replace( '/', SEP, $css ) ) ) )  
    1287                                                 return sprintf( $link, $module, $template, $css );  
    1288  
    1289                                         if ( file_exists( sprintf( $path, $module, 'default', str_replace( '/', SEP, $css ) ) ) )  
    1290                                                 return sprintf( $link, $module, 'default', $css );  
    1291  
    1292                                         return '';  
    1293                                 }  
    1294  
    1295                                 $css = _css( 'phpgwapi', 'css/base' );  
    1296                                 $css .= _css( 'phpgwapi', "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" );  
    1297                                 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], "css/{$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ]}" );  
    1298                                 $css .= _css( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ], 'app' );  
    1299  
    1300                                 if ( $css )  
    1301                                         $tpl -> set_var( 'css_file', $css );  
     1269                                $template = $GLOBALS['phpgw_info']['server']['template_set']; 
     1270                                $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/base.css");  
     1271                                $GLOBALS['phpgw']->css->validate_file( "phpgwapi/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css");  
     1272                                $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/".$GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'theme' ].".css");  
     1273                                $GLOBALS['phpgw']->css->validate_file( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]."/templates/".$template."/css/app.css");  
     1274 
     1275                                $tpl -> set_var( 'css_file',  $GLOBALS['phpgw']->css->get_css() );  
     1276 
    13021277                        }  
    13031278 
  • branches/2.2/phpgwapi/inc/functions.inc.php

    r3018 r3052  
    251251        $GLOBALS['phpgw']->preferences  = CreateObject('phpgwapi.preferences'); 
    252252        $GLOBALS['phpgw']->applications = CreateObject('phpgwapi.applications'); 
     253        $GLOBALS['phpgw']->css          = CreateObject('phpgwapi.css'); 
    253254        print_debug('main class loaded', 'messageonly','api'); 
    254255        if (! isset($GLOBALS['phpgw_info']['flags']['included_classes']['error']) || 
Note: See TracChangeset for help on using the changeset viewer.