Changeset 42


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

Vide arquivo change_log.txt

Location:
trunk/calendar
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/calendar/doc/change_log.txt

    r41 r42  
    11Esse arquivo descreve todas as correções, alterações e novas implementações do  
    2 módulo Agenda de Eventos, e a partir da versão 29/11/2006 [0.9.17] 
     2módulo Agenda de Eventos, e a partir da versão 29/11/2006 [calendar 0.9.17] 
    33Nilton Emilio Buhrer Neto. 
     4 
     527/07/2007 - [0.9.2] 
     6- Implementação de funcionalidade no hook_admin. O administrador poderá  
     7escolher entre 2 tipos de visualização da árvore ldap, na seleção de usuários  
     8em um compromisso: o primeiro mostra o 1º nível de OUs somente, com busca  
     9recursiva. Já o segundo, mostra todos os N níveis com busca no mesmo nível. 
    410 
    51104/07/2007 - [0.9.2] 
  • 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?> 
  • trunk/calendar/templates/celepar/config.tpl

    r2 r42  
    4848    </td> 
    4949   </tr> 
     50    <tr bgcolor="{row_off}"> 
     51    <td>{lang_Select_type_tree_view}</td> 
     52    <td> 
     53     <select name="newsettings[cal_type_tree_participants]">       
     54      <option value="2" {selected_cal_type_tree_participants_2}>{lang_first_level_with_recursive_search}</option> 
     55      <option value="1" {selected_cal_type_tree_participants_1}>{lang_all_levels_with_not_recursive_search}</option>       
     56     </select> 
     57    </td> 
     58   </tr> 
    5059<!-- END body --> 
    5160 
  • trunk/calendar/templates/celepar/js/edit_exmail.js

    r36 r42  
    4141}        
    4242                 
    43 function get_available_users(path,context) 
     43function get_available_users(path,context,type) 
    4444{ 
    4545        var handler_get_available_users = function(data) 
     
    7676 
    7777        document.getElementById('combo_org').value = context; 
    78         cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type=search', handler_get_available_users); 
     78        cExecute (path+'.ldap_functions.get_available_users&context='+context+'&type='+type, handler_get_available_users); 
    7979} 
    8080function add_user() 
Note: See TracChangeset for help on using the changeset viewer.