Ignore:
Timestamp:
07/27/07 16:54:47 (17 years ago)
Author:
niltonneto
Message:

Vide arquivo change_log.txt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/inc/class.uicalendar.inc.php

    r36 r42  
    40174017                                                                $user_ou = explode(",",str_replace($context,"",implode(",",$user_context)));                                                             
    40184018                                                                $user_context = trim(strtolower($user_ou[count($user_ou) - 2].",".$context)); 
    4019                                                                 // Fim 
    4020                                                                 $combo_org = $this->get_sectors(trim(strtolower($user_context))); 
     4019                                                                // Fim           
     4020                                                                // Verifica o tipo da visualização da árvore LDAP, configurado no admin da Agenda 
     4021                                                                $recursive = $GLOBALS['phpgw_info']['server']['cal_type_tree_participants'] == '1' ? true : false; 
     4022                                                                $combo_org = $this->get_organizations(trim(strtolower($context)),$user_context, $recursive); 
    40214023                                                                $footer_ext_participantes = lang("Tip: To search in the <b>Global Catalog</b>, type the <b>F9</b> key, like the ExpressoMail."); 
    40224024                                                                 
     
    40404042                                                                                        '<td valign="bottom">'. 
    40414043                                                                                        '       '.lang("Organization").': '. 
    4042                                                                                         '       <select name="org_context" id="combo_org" onchange="javascript:get_available_users(\''.$module_name.'\',this.value);">'.$combo_org.'</select>'. 
     4044                                                                                        '       <select name="org_context" id="combo_org" onchange="javascript:get_available_users(\''.$module_name.'\',this.value,\''.($recursive ? "" : "search").'\');">'.$combo_org.'</select>'. 
    40434045                                                                                        '       <br>'. 
    40444046                                                                                        '       <font color="red"><span id="cal_span_searching">&nbsp;</span></font>'.                                                                   
     
    40574059                                                                                        "<script type='text/javascript'>var DEFAULT_URL = '".$module_name."/controller.php?action=';</script> ".                                                                                         
    40584060                                                                                        "<script type='text/javascript'>" . 
    4059                                                                                         "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\')',1000);".  
     4061                                                                                        "setTimeout('get_available_users(\"".$module_name."\",\'".$user_context."\',\'".($recursive ? "" : "search")."\')',1000);".  
    40604062                                                                                        "</script> " 
    40614063                                                                                                 
     
    46414643                        return $daily; 
    46424644                } 
    4643  
    4644                 function get_sectors($selected='') 
     4645                 
     4646                function get_organizations($context, $selected='', $recursive = false) 
    46454647                { 
    46464648                        $s = CreateObject('phpgwapi.sector_search_ldap'); 
    4647                         $sectors_info = $s->get_sectors($selected, false, false); 
    4648                         return $sectors_info; 
    4649                 } 
    4650                  
    4651                 /* 
    4652                 function get_organizations($context, $selected='') 
    4653                 { 
    4654                         $first_sector_ufn = ldap_dn2ufn($context); 
    4655                         $first_sector_string = split(",", $first_sector_ufn); 
    4656  
    4657                         $s = CreateObject('phpgwapi.sector_search_ldap'); 
    4658                         $sectors_info = $s->sector_search($context); 
    4659  
    4660                         $sector_select = ""; 
    4661                         $sector_select .= "<option value='" .$context . "'"; 
    4662                         $sector_select .= ">".$first_sector_string[0]."</option>\n"; 
    4663                          
    4664                         foreach($sectors_info as $sector) 
    4665                         { 
    4666                                 if ($sector->sector_level == 1) 
    4667                                 { 
    4668                                         $sector->sector_name = '+ '.$sector->sector_name; 
    4669                                 } 
    4670                                 else 
    4671                                 { 
    4672                                         $sector_space = ''; 
    4673                                         for ($i=1; $i < $sector->sector_level; $i++) 
    4674                                                 $sector_space = '---'.$sector_space; 
    4675                                         $sector->sector_name = $sector_space.' '.$sector->sector_name; 
    4676                                 } 
    4677                                 $sector_select .= '<option value="' . $sector->sector_context . '"'; 
    4678                                  
    4679                                 if (trim(strtolower($sector->sector_context)) == $selected) 
    4680                                         $sector_select .= ' selected>' . $sector->sector_name . "</option>\n"; 
    4681                                 else 
    4682                                         $sector_select .= '>' . $sector->sector_name . "</option>\n"; 
    4683                         } 
    4684                         //$sector_select .= "</select>"; 
    4685                         return $sector_select;   
    4686                 } 
    4687                 */ 
     4649                                                 
     4650                        return ($recursive ?  
     4651                                $s->get_organizations($context, $selected, false ,false) : 
     4652                                $s->get_sectors($selected, false, false)); 
     4653                }                
    46884654        } 
    46894655?> 
Note: See TracChangeset for help on using the changeset viewer.