Ignore:
Timestamp:
05/30/12 11:35:44 (12 years ago)
Author:
gustavo
Message:

Ticket #2768 - Melhorias na inserção de destinatários na criacao de mensagem

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.4.1-3/home.php

    r5042 r6352  
    9898                echo parse_navbar(); 
    9999        } 
    100         // Default Applications (Home Page)  
    101         $default_apps = Array(                   
    102                         'workflow',                      
    103                         'expressoMail1_2', 
    104                         'calendar', 
    105                         'news_admin' 
    106                 ); 
    107         $sorted_apps = array(); 
    108         $user_apps = $GLOBALS['phpgw_info']['user']['apps'];  
    109         @reset($user_apps);      
    110         for($i = 0; $i < count($default_apps);$i++) { 
    111                 if(array_key_exists($default_apps[$i], $user_apps)){ 
    112                         $sorted_apps[] = $default_apps[$i]; 
    113                 }                
    114         } 
    115          
    116         foreach($GLOBALS['phpgw_info']['user']['apps'] as $i => $p) { 
    117                 $sorted_apps[] = $p['name']; 
    118         } 
    119          
     100 
     101/* 
     102//ESSE TRECHO DE CÓDIGO DEVE SER INSERIDO NOVAMENTE POSTERIORMENTE !!!!!!!!!!! 
     103 
     104        // Default Applications (Home Page)  
     105        $default_apps = Array(                   
     106                        'workflow',                      
     107                        'expressoMail1_2', 
     108                        'calendar', 
     109                        'news_admin' 
     110                ); 
     111        $sorted_apps = array(); 
     112        $user_apps = $GLOBALS['phpgw_info']['user']['apps'];  
     113        @reset($user_apps);      
     114        for($i = 0; $i < count($default_apps);$i++) { 
     115                if(array_key_exists($default_apps[$i], $user_apps)){ 
     116                        $sorted_apps[] = $default_apps[$i]; 
     117                }                
     118        } 
     119         
     120        foreach($GLOBALS['phpgw_info']['user']['apps'] as $i => $p) { 
     121                $sorted_apps[] = $p['name']; 
     122        } 
     123 
    120124        $portal_oldvarnames = array('mainscreen_showevents', 'homeShowEvents','homeShowLatest','mainscreen_showmail','mainscreen_showbirthdays','mainscreen_show_new_updated'); 
    121         $done = array(); 
    122         // Display elements, within appropriate table cells      
    123         @reset($sorted_apps); 
    124         $idx = 1; 
    125         echo "<table width='100%' cellpadding=5>"; 
    126         foreach($sorted_apps as $appname) 
    127         { 
    128                 if((int)$done[$appname] == 1 || empty($appname)){ 
    129                         continue; 
    130                 }                
    131                 $varnames = $portal_oldvarnames; 
    132                 $varnames[] = 'homepage_display'; 
    133                 $thisd = 0; 
    134                 $tmp = ''; 
    135                  
    136                 foreach($varnames as $varcheck) 
    137                 { 
    138                                                                          
    139                         /*if($appname == 'expressoMail1_2') { 
    140                                 $tmp = $appname; 
    141                                 $appname = 'expressoMail'; 
    142                         }*/                              
    143  
    144                         if(array_search($appname, $default_apps) !== False){ 
    145                                 $thisd = 1; 
    146                                 break; 
    147                         } 
    148                         if($GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]=='True') { 
    149                                 $thisd = 1; 
    150                                 break; 
    151                         } 
    152                         else  { 
    153                                 $_thisd = (int)$GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]; 
    154                                 if($_thisd > 0) { 
    155                                         $thisd = $_thisd; 
    156                                         break; 
    157                                 } 
    158                         } 
    159                 } 
    160  
    161                 if($thisd > 0) 
    162                 { 
    163                         if($tmp) { 
    164                 $appname = $tmp; 
    165                                 $tmp = ''; 
    166                         } 
    167                         if($idx == 0) {                          
    168                                 print '<tr>'; 
    169                         } 
    170                         print '<td style="vertical-align:top;" width="45%">'; 
    171                         $GLOBALS['phpgw']->hooks->single('home',$appname);                       
    172                         print '</td>'; 
    173                          
    174                         if($idx == 2){ 
    175                                 $idx = 0; 
    176                                 print '</tr>'; 
    177                         }                        
    178                         $idx++; 
    179                         $neworder[] = $appname; 
    180                 } 
    181                 $done[$appname] = 1; 
    182         } 
    183         print '</table>'; 
     125        $done = array(); 
     126        // Display elements, within appropriate table cells      
     127        @reset($sorted_apps); 
     128        $idx = 1; 
     129        echo "<table width='100%' cellpadding=5>"; 
     130        foreach($sorted_apps as $appname) 
     131        { 
     132                if((int)$done[$appname] == 1 || empty($appname)){ 
     133                        continue; 
     134                } 
     135                $varnames = $portal_oldvarnames; 
     136                $varnames[] = 'homepage_display'; 
     137                $thisd = 0; 
     138                $tmp = ''; 
     139 
     140                foreach($varnames as $varcheck) 
     141                { 
     142 
     143                        /*if($appname == 'expressoMail1_2') { 
     144                                $tmp = $appname; 
     145                                $appname = 'expressoMail'; 
     146                        }*/ 
     147/* 
     148                        if(array_search($appname, $default_apps) !== False){ 
     149                                $thisd = 1; 
     150                                break; 
     151                        } 
     152                        if($GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]=='True') { 
     153                                $thisd = 1; 
     154                                break; 
     155                        } 
     156                        else  { 
     157                                $_thisd = (int)$GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]; 
     158                                if($_thisd > 0) { 
     159                                        $thisd = $_thisd; 
     160                                        break; 
     161                                } 
     162                        } 
     163                } 
     164 
     165               if($thisd > 0) 
     166                { 
     167                        if($tmp) { 
     168                $appname = $tmp; 
     169                                $tmp = ''; 
     170                        } 
     171                        if($idx == 0) { 
     172                                print '<tr>'; 
     173                        } 
     174                        print '<td style="vertical-align:top;" width="45%">'; 
     175                        $GLOBALS['phpgw']->hooks->single('home',$appname); 
     176                        print '</td>'; 
     177 
     178                        if($idx == 2){ 
     179                                $idx = 0; 
     180                                print '</tr>'; 
     181                        } 
     182                        $idx++; 
     183                        $neworder[] = $appname; 
     184                } 
     185                $done[$appname] = 1; 
     186        } 
     187        print '</table>'; 
     188*/ 
     189 
     190 
     191 
     192//Inicio         
     193        echo ' 
     194            <link rel="Stylesheet" type="text/css" href="prototype/plugins/jquery/jquery-ui.css" />                                      
     195     
     196            <script type="text/javascript" src="prototype/plugins/jquery/jquery.min.js"></script> 
     197         
     198            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.min.js"></script> 
     199            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.custom.min.js"></script> 
     200            <script src="prototype/plugins/json2/json2.js" language="javascript"></script> 
     201            <script src="prototype/plugins/ejs/ejs.js" language="javascript"></script> 
     202            <script src="prototype/plugins/store/jquery.store.js" language="javascript"></script> 
     203             
     204            <script src="prototype/api/datalayer.js" language="javascript"></script>     
     205            
     206            <script type="text/javascript" src="prototype/plugins/datejs/date-pt-BR.js"></script> 
     207            <script type="text/javascript" src="prototype/plugins/datejs/sugarpak.js"></script> 
     208            <script type="text/javascript" src="prototype/plugins/datejs/parser.js"></script> 
     209 
     210            <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown.min.js"></script> 
     211            <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown-pt-BR.js"></script> 
     212 
     213            <script type="text/javascript" src="prototype/modules/home/js/home.js"></script> 
     214            <link rel="Stylesheet" type="text/css" href="prototype/modules/home/css/home.css" />         
     215        '; 
     216 
     217        echo' 
     218            <tr> 
     219                <td> 
     220                    <div class="portlets" style="width: 100%;"></div> 
     221                <td> 
     222            </tr>'; 
     223 
     224//Fim    
    184225        $GLOBALS['phpgw']->common->phpgw_footer(); 
    185226?> 
Note: See TracChangeset for help on using the changeset viewer.